Electronic Components Datasheet Search
  English  ▼
ALLDATASHEET.NET

X  

UPD17062 Datasheet(PDF) 119 Page - Renesas Technology Corp

Part # UPD17062
Description  MOS INTEGRATED CIRCUIT
PDF  298 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  RENESAS [Renesas Technology Corp]
Direct Link  http://www.renesas.com
Logo RENESAS - Renesas Technology Corp

UPD17062 Datasheet(HTML) 119 Page - Renesas Technology Corp

Back Button UPD17062 Datasheet HTML 115Page - Renesas Technology Corp UPD17062 Datasheet HTML 116Page - Renesas Technology Corp UPD17062 Datasheet HTML 117Page - Renesas Technology Corp UPD17062 Datasheet HTML 118Page - Renesas Technology Corp UPD17062 Datasheet HTML 119Page - Renesas Technology Corp UPD17062 Datasheet HTML 120Page - Renesas Technology Corp UPD17062 Datasheet HTML 121Page - Renesas Technology Corp UPD17062 Datasheet HTML 122Page - Renesas Technology Corp UPD17062 Datasheet HTML 123Page - Renesas Technology Corp Next Button
Zoom Inzoom in Zoom Outzoom out
 119 / 298 page
background image
117
µPD17062
11.6
INTERRUPT PROCESSING ROUTINE
An interrupt is accepted in a program area that permits interrupts regardless of the program being executed.
Therefore, to return control to the original program after interrupt processing, return the program to the
state it is in when it is not processing an interrupt.
For example, if an arithmetic operation is performed during interrupt processing, the contents of the carry
flag may differ from those before interrupt acceptance. This content change may cause a decision error in
the program to which control has returned.
A system or control register that can at least operate within the interrupt processing routine should be saved
or restored within the interrupt processing routine.
See Section 11.9 for processing that permits an interrupt while another interrupt is being processed
(multiple interrupts).
11.6.1
Save Processing
This section describes how to save the contents of registers using the interrupt routine as an example.
Only the contents of bank register and index enable flag of system registers are automatically saved by
the hardware. Use the program to save another system register as described in the example if necessary.
The PEEK and POKE instructions can be used to save or restore the contents of the system registers or other
registers as described in the example.
To save the contents of a register, a transfer instruction (LD r, LD m, ST m, or ST r) can be used in addition
to PEEK and POKE. If a transfer instruction is used to save the contents of a register when the row address
of the general-purpose register is not defined at interrupt acceptance, the data memory address is hard to
specify.
If the general-purpose register address is not defined when the transfer instruction is used to save the
contents of the general-purpose register, the address to be saved also becomes undefined. In this case, use
of the general-purpose register should be fixed at least in the interrupt permission routine.
However, because the address of the register file controlled by the PEEK or POKE instruction is specified
regardless of the contents of the general-purpose register and because addresses 40H-7FH of the register file
overlap with the bank data memory, each system register can be saved only by specifying the bank.
In the example, the PEEK or POKE instruction is used to save the contents of the window register and
general-purpose register pointer. Then, the general-purpose register is respecified to row address 07H of
BANK0 and the ST instruction is used to save another system register.
Fig. 11-4 illustrates register content saving using the PEEK and POKE instructions.
11.6.2
Restoration Processing
This section describes an example of restoration.
To restore the contents of a register, reverse the procedures for register saving explained in Section 11.6.1.
Because an interrupt is always accepted in an interrupt permitted state (EI state), the EI instruction must
be executed before the RETI instruction.
The EI instruction sets the interrupt enable flip-flop to 1 after the next RETI instruction is executed.
Therefore, control is returned to the program before an interrupt is accepted, then the program enters an
interrupt permitted state.



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100  ...More


Datasheet Download

Go To PDF Page


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


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
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