|
4524_M Datasheet, PDF (217/310 Pages) Renesas Technology Corp – 4-BIT CISC SINGLE-CHIP MICROCOMPUTER 720 FAMILY / 4500 SERIES | |||
|
◁ |
4524 Group
APPLICATION
2.4 A/D converter
â Disable Interrupts
A/D interrupt is temporarily disabled.
Interrupt enable flag INTE
Interrupt control register V2
0
b3
b0
â0 ââ
All interrupts disabled [DI]
b2: A/D interrupt occurrence disabled [TV2A]
â
â Set A/D Converter
A/D conversion mode is selected to A/D operation mode.
Analog input pin AIN0 is selected.
A/D control register Q2
b3
b0
âââ 1
b3
b0
A/D control register Q1 0 0 0 0
b0: AIN0 pin function selected [TQ2A]
A/D conversion selected, AIN0 selected [TQ1A]
â Clear Interrupt Request
A/D interrupt activated condition is cleared.
A/D conversion completion flag ADF 0
â
A/D interrupt activated condition cleared [SNZAD]
â
( ) 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]
â
When interrupt is used
â Set Interrupt
A/D interrupt temporarily disabled is enabled.
b3
b0
Interrupt control register V2 â 1 â â
b2: A/D interrupt occurrence enabled [TV2A]
Interrupt enable flag INTE 1
All interrupt enabled [EI]
â
â
â
â Start A/D Conversion
A/D conversion operation is started [ADST]
â
â
â
When interrupt is not used
â
Check A/D Interrupt Request
A/D conversion completion flag is checked [SNZAD]
When interrupt is used
â
A/D Interrupt Occur
â
â Execute A/D Conversion
High-order 8 bits of register AD
Low-order 2 bits of register AD
â
â
â
Register A and register B [TABAD]
â
High-order 2 bits of register A [TALA]
â0â is set to low-order 2 bits of register A
â
When A/D conversion is executed by the same channel, repeat â to â.
When A/D conversion is executed by another channel, repeat â to â.
âââ: it can be â0â or â1.â
â[ ]â: instruction
Fig. 2.4.2 A/D conversion mode setting example
Rev.2.00 Aug, 06 2004
REJ09B0107-0200Z
2-53
|
▷ |