English
Language : 

4507_M Datasheet, PDF (151/216 Pages) Renesas Technology Corp – 4-BIT CISC SINGLE-CHIP MICROCOMPUTER 4500 SERIES
4507 Group
APPLICATION
2.4 A/D converter
➀ Disable Interrupts
A/D interrupt is temporarily disabled.
Interrupt enable flag INTE “0”
All interrupts disabled (DI instruction)
Interrupt control register V2
b3
✕
0
b0
✕✕
A/D interrupt occurrence
(TV2A instruction)
disabled
➁ Set A/D Converter
A/D conversion mode is selected to A/D operation mode.
Analog input pin AIN0 is selected.
b3
b0
A/D control register Q1 0 ✕ 0 0 A/D conversion mode, AIN0 selected
(TQ1A instruction)
➂ Clear Interrupt Request
A/D interrupt activated condition is cleared.
A/D conversion completion flag ADF “0”
A/D conversion interrupt activated condition cleared
(SNZAD instruction)
Note when the interrupt request is cleared
When ➂ is executed, considering the skip of the next instruction according to the
flag ADF, insert the NOP instruction after the SNZAD instruction.
When interrupt is
not used
➃ Set Interrupt
Interrupts except A/D conversion is
enabled (EI instruction)
When interrupt is used
➃ Set Interrupt
A/D conversion interrupt temporarily disabled is enabled.
Interrupt control register V2
b3
✕
b0
1✕✕
A/D interrupt occurrence enabled
(TV2A instruction)
Interrupt enable flag INTE “1”
All interrupts enabled
(EI instruction)
➄ Start A/D Conversion
A/D conversion operation is started (ADST instruction).
When interrupt is not used
➅ Check A/D Interrupt Request
A/D conversion completion flag is
checked (SNZAD instruciton)
When interrupt is used
➅ A/D Conversion Interrupt Occur
➆ Execute A/D Conversion
High-order 8 bits of register AD → Register A and register B (TABAD instruction)
Low-order 2 bits of register AD → High-order 2 bits of register A (TALA instruction)
“0” is set to low-order 2 bits of register A
When A/D conversion is executed by the same channel, ➄ to ➆ is repeated.
When A/D conversion is executed by the another channel, ➀ to ➆ is repeated.
“✕”: it can be “0” or “1.”
Fig. 2.4.2 A/D conversion mode setting example
Rev.2.01 Feb 04, 2005
REJ09B0195-0201
2-36