| Electronic Components Datasheet Search |
|
UPD17062 Datasheet(PDF) 133 Page - Renesas Technology Corp |
|
|
|||||||||||||||||||||||||||||
UPD17062 Datasheet(HTML) 133 Page - Renesas Technology Corp |
|
133 / 298 page ![]() 131 µPD17062 11.9.4 Saving the Contents of System and Control Registers The contents of system and control registers must be saved before using the multiple interrupt function. The contents of these registers change during interrupt processing. An area must be obtained for these contents for each interrupt source. An interrupt being accepted and interrupts with lower priorities must be inhibited, and interrupts with higher priorities must be permitted. Because an interrupt with a high priority is an emergency interrupt, it should have first priority. Therefore, the contents of system and control registers should be saved after permitting an interrupt with a high priority. The following example describes processing of the interrupt processing routine to enable an interrupt with a high priority and to save the contents of system and control registers: Example Example of permitting an interrupt and saving register contents at multiple interrupts Use the INTNC pin, VSYNC pin, and timer interrupts with the following software priorities: VSYNC pin > timer > INTNC pin A timer interrupt is assumed to be accepted in the first level. The figure below shows an example program and flowchart for this processing. Flowchart Program example # $ % & ( ) * + , EI RETI EI EI DI MOV POKE BANK1 POKE PEEK POKE MOV POKE PEEK POKE PEEK POKE PEEK POKE PEEK WR, INTPM, #0111B WR WR INTPM WR #0100B WR WR, M3, WR, INTPM, M2 WR M1 WR, INTPM, WR, M3 WR RPL WR M1, WR, M2, WR, INTPM, VSYNC, INTNC, and timer interrupt permission ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; (built-in macro) ; Bank specification Window register saving Interrupt permission flag saving Permission of interrupt with high priority System register saving Interrupt processing System register restoration Interrupt permission flag restoration Window register restoration Permit timer, INTNC pin, and VSYNC pin interrupts using the interrupt permission register. The contents of the bank register, index enable flag, and program counter are automatically saved. Restore the contents of the interrupt permission register. Restores the contents of the window register. Restore the contents of system and control registers other than window and interrupt permission registers. Save the contents of system and control registers other than window and interrupt permission registers. Saves the window register. Save the interrupt permission register in data memory M2. Permit a VSYNC pin interrupt using the interrupt permission register. Specifies that the data is saved in BANK1. Timer interrupt Main routine |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |