|
7220 Datasheet, PDF (176/303 Pages) Renesas Technology Corp – 8-BIT SINGLE-CHIP MICROCOMPUTER | |||
|
◁ |
APPLICATION
5.1 Example of multi-line display
5.1.3 General flowchart
The multi-line display processing routine consists of initialization processing routine, VSYNC interrupt processing
routine, and CRT interrupt processing routine.
(1) Initialization processing routine
This routine is used to initialize to cause a CRT interrupt.
CRTE : Bit 4 of interrupt control register 1
<CRT interrupt enable bit>
CRTR : Bit 4 of interrupt request register 1
<CRT interrupt request bit>
CS : Character size register
HR : Horizontal position register
Multi-line display start
Line counter : Counter RAM for line counting
CV1, CV2 : Vertical position registers 1, 2
P5D : Port P5 direction register
CRTP : CRT port control register
CC : CRT control register
CO0 to CO3 : Color registers 0 to 3
F_VSYNC : VSYNC flag
MD : Border selection register
CK : CRT clock selection register
Initialization
CRTE (bit4 at address 00FE 16) ââ0â
CC (address 00EA 16) ââ000000002â
P5D (address 00CB 16) ââ000000002â
CRTP (address 00EC 16) ââ000000002â
CO0 (address 00E6 16)
CO1 (address 00E7 16)
CO2 (address 00E8 16)
CO3 (address 00E9 16)
ââ000010002â (red)
ââ000000102â (blue)
ââ000011102â (white)
ââ000001102â (cyan)
Disable only CRT interrupt
All blocks display off
Select R/G/B/OUT1
HSYNC/VSYNC input polarity : positive polarity input
R/G/B/OUT1 output polarity : positive polarity output
Color register 0 : red
Color register 1 : blue
Color register 2 : white
Color register 3 : cyan
Block 1 display RAM â
Display character (blank) of block 1 (addresses 0600 16 to 061716)
Character color (no output) of block 1 (addresses 0680 16 to 069716)
CV1 (address 00E1 16)â
Vertical display start position of the 11th line (block 1)
Block 2 display RAM â
Display character (blank) of block 2 (addresses 0620 16 to 063716)
Character color (no output) of block 2 (addresses 06A0 16 to 06B716)
CV2 (address 00E2 16)â
Vertical display start position of the 12th line (block 2)
CS (address 00E4 16)
MD (address 00E5 16)
HR (address 00E0 16)
CK (address 00ED 16)
ââ00000000 2â
ââ00000101 2â
ââXXXXXXXX 2â
ââ00000010 2â
Character size : minimum size
Border output
Set a horizontal display start position
Set display clock
Line counter
F_VSYNC
ââ0â
ââ1â
END
Enable CRT interrupt in synchronized
with the next V SYNC
Note: This routine is not interrupt
processing routine.
Fig. 5.1.3 Flowchart of initialization processing routine
7220 Group Userâs Manual
5-3
|
▷ |