|
7220 Datasheet, PDF (178/303 Pages) Renesas Technology Corp – 8-BIT SINGLE-CHIP MICROCOMPUTER | |||
|
◁ |
APPLICATION
5.1 Example of multi-line display
(3) CRT interrupt processing routine
The CRT interrupt processing routine executes the display character data setup routine for each line,
in order to perform multi-line display. The line to be displayed is determined by the line counter value.
ICON1, ICON2: Interrupt control registers 1, 2
CS : Character size register
HR : Horizontal position register
Line counter : Counter RAM for line counting
CV1,CV2 : Vertical position registers 1, 2
CRT_ICON1, CRT_ICON2 : Back up RAM for interrupt control
CRT interrupt processing routine
registers 1, 2 during CRT interrupt
A : Accumulator
X : Index register X
T
D
CRT_ICON1
ââ0â
ââ0â
âICON1
Y : Index register Y
T : X modified operation mode flag
D : Decimal operation mode flag
CRT_ICON2
âICON2
ICON1 (address 00FE 16) ââ001000012â â Enable Timer 1 interrupt and
ICON2 (address 00FF 16) ââ000000002â VSYNC interrupt
I
ââ0â
Push registers X, Y, A
â Specify jump destination by
Line counter value
Line counter = 0
Block 1 display RAM â
Display character of block 1 (the 1st line)
Character color of block 1 (the 1st line)
CV1 â Vertical display start position
of the 1st line (block 1)
Set CS, HR
=1
Block 2 display RAM â
Display character of block 2 (the 2nd line)
Character color of block 2 (the 2nd line)
CV2 â Vertical display start position
of the 2nd line (block 2)
Set CS, HR
= 11
Block 2 display RAM â
Display character of block 2 (the 12th line)
Character color of block 2 (the 12th line)
CV2 â Vertical display start position
of the 12th line (block 2)
Set CS, HR
Line counter +1
â 12
Line counter =12
=12
Line counter â â0â
Save the value of Line counter
in internal RAM
Pop registers X, Y, A
I
ICON1
ICON2
ââ1â
âCRT_ICON1
âCRT_ICON2
âDisable all interrupts
âPop ICON 1 and 2 contents during
CRT interrupt (Refer to â5.1.7 (2)â)
RETURN
Note: The multiple interrupt priority of
this system is as below.
Timer 1 > VSYNC > CRT
Fig. 5.1.5 Flowchart of CRT interrupt processing routine
7220 Group Userâs Manual
5-5
|
▷ |