Qdatasheet_Logo
Integrated circuits, Transistor, Semiconductors Search and Datasheet PDF Download Site

GL603USB View Datasheet(PDF) - Genesys Logic

Part Name
Description
MFG CO.
GL603USB
Genesys-Logic
Genesys Logic Genesys-Logic
'GL603USB' PDF : 41 Pages View PDF
GL603USB/GL603USB-A/GL603USB-B
5.6 Timer Interrupt
Because CPU may enter timer interrupt routine at any time, the timer interrupt routine should
backup all special registers at its entry point and restore them before return.
(Address 0x004)
TIMER_ENTRY: MOV
SWAPR
BCR
MOV
MOV
MOV
;
; Execute interrupt service routine
;
MOV
MOV
SWAPR
MOV
SWAPR
SWAPR
BCR
RETI
A_TEMP, A
A, STATUS
STATUS, BS
S_TEMP, A
A, INDAR
I_TEMP, A
A, I_TEMP
INDAR, A
A, S_TEMP
STATUS, A
A_TEMP
A, A_TEMP
INTEN, TMROF
5.7 Conditional Branch
Example: Conditional branch can be according to value of Accumulator. Firmware can use this
method to return value for lookahead table. Because Accumulator is only 8 bits wide, the higher 3
bits of Program Counter should be load into PCHBUF before the conditional branch executed.
(Address 0x540)
LOOKAHEAD:
MOVIA
MOV
MOVIA
ADDAR
RETIA
RETIA
RETIA
.
.
.
0x05
PCHBUF, A
LOOKAHEAD_VAL
PCL, A
0
; Acc = 0
1
; Acc = 1
2
; Acc = 2
.
.
.
5.8 Change Register Bank
Usually keeps BS = 0. If firmware want to access register address 0x80 to 0x8F, set BS = 1. After
process register address 0x80 to 0x8F complete, clear BS = 0 to address 0x00 to 0x7F.
BSR
MOV
BCR
STATUS, BS
PORT1CON, A
STATUS, BS
5.9 Read Photo Sensor Input
32
09/22/00
Revision 1.4
Share Link: GO URL

All Rights Reserved © qdatasheet.com  [ Privacy Policy ] [ Contact Us ]