TOSHIBA CORPORATION
143
TMP96C141AF
3.12.1 Operation
(1)
Analog Reference Voltage
High analog reference voltage is applied to the VREF
pin, and low analog reference voltage is applied to
AGND pin.
The reference voltage between VREG and AGND is
divided by 1024 using ladder resistance, and com-
pared with the analog input voltage for A/D conversion.
(2)
Analog Input Channels
Analog input channel is selected by ADMOD <ADCH1,
0>. However, which channel to select depends on the
operation mode of the A/D converter.
In fixed analog input mode, one channel is selected by
ADMOD <ADCH1, 0> among four pins: AN0 to AN3.
In analog input channel scan mode, the number of
channels to be scanned from AN0 is specified by
ADMOD <ADCH1, 0>, such as AN0
→
AN1, AN0
→
AN1
→
AN2, and AN0
→
AN1
→
AN2
→
AN3.
When reset, A/D conversion channel register will be ini-
tialized to ADMOD <ADCH1, 0> = 00, so that AN0 pin
will be selected.
The pins which are not used as analog input channel
can be used as ordinary input port P5.
(3)
Starting A/D Conversion
A/D conversion starts when A/D conversion register
ADMOD <ADS> is written “1". When A/D conversion
starts, A/D conversion busy flag ADMOD <ADBF>
which indicates “A/D conversion is in progress” will be
set to “1".
(4)
A/D Conversion Mode
Both fixed A/D conversion channel mode and A/D
conversion channel scan mode have two conversion
modes, i.e., single and repeat conversion modes.
In fixed channel repeat mode, conversion of specified
one channel is executed repeatedly.
In scan repeat mode, scanning from AN0,
…
→
AN3 is
executed repeatedly.
A/D conversion mode is selected by ADMOD <REPET,
SCAN>.
(5)
A/D Conversion Speed Selection
There are two A/D conversion speed modes: high
speed mode and low speed mode. The selection is
executed by ADMOD <ADCS> register.
When reset, ADMOD <ADCS> will be initialized to “0,”
so that high speed conversion mode will be selected.
(6)
A/D Conversion End and Interrupt
• A/D conversion single mode
ADMOD <EOCF> for A/D conversion end will be
set to “1,” ADMOD <ADBF> flag will be reset to “0,”
and INTAD interrupt will be enabled when A/D conver-
sion of specified channel ends in fixed conversion
channel mode or when A/D conversion of the last
channel ends in channel scan mode.
• A/D conversion repeat mode
For both fixed conversion channel mode and con-
version channel scan mode, INTAD should be disabled
when in repeat mode. Always set the INTE0AD at
“000,” that disables the interrupt request.
Write “0” to ADMOD <REPET> to end the repeat
mode. Then, the repeat mode will be exited as soon as
the conversion in progress is completed.
(7)
Storing the A/D Conversion Result
The results of A/D conversion are stored in ADREG0 to
ADREG3 registers for each channel. In repeat mode,
the registers are updated whenever conversion ends.
ADREG0 to ADREG3 are read-only registers.
(8)
Reading the A/D Conversion Result
The results of A/D conversion are stored in ADREG0 to
ADREG3 registers. When the contents of one of
ADREG0 to ADREG3 registers are read, ADMOD
<EOCF> will be cleared to “0".
Setting example:
When the analog input voltage of the
AN3 pin is A/D converted and the
result is stored in the memory
address FF10H by A/D interrupt
INTAD routine.
Содержание TLCS-900 Series
Страница 2: ...2 TOSHIBA CORPORATION TMP96C141AF Figure 1 TMP96C141AF Block Diagram ...
Страница 10: ...10 TOSHIBA CORPORATION TMP96C141AF Figure 3 3 1 Interrupt Processing Flowchart ...
Страница 17: ...TOSHIBA CORPORATION 17 TMP96C141AF Figure 3 3 3 1 Block Diagram of Interrupt Controller ...
Страница 18: ...18 TOSHIBA CORPORATION TMP96C141AF 1 Interrupt Priority Setting Register ...
Страница 19: ...TOSHIBA CORPORATION 19 TMP96C141AF 2 External Interrupt Control ...
Страница 26: ...26 TOSHIBA CORPORATION TMP96C141AF Port 0 Register Figure 3 5 3 Registers for Ports 0 and 1 ...
Страница 28: ...28 TOSHIBA CORPORATION TMP96C141AF Figure 3 5 5 Registers for Port 2 ...
Страница 30: ...30 TOSHIBA CORPORATION TMP96C141AF Figure 3 5 6 Port 3 P30 P31 P32 P35 P36 P37 ...
Страница 31: ...TOSHIBA CORPORATION 31 TMP96C141AF Figure 3 5 7 Port 3 P33 P34 ...
Страница 34: ...34 TOSHIBA CORPORATION TMP96C141AF Figure 3 5 9 Port 4 ...
Страница 38: ...38 TOSHIBA CORPORATION TMP96C141AF Port 6 Register Figure 3 5 14 Registers for Port 6 ...
Страница 40: ...40 TOSHIBA CORPORATION TMP96C141AF Figure 3 5 16 Registers for Port 7 ...
Страница 43: ...TOSHIBA CORPORATION 43 TMP96C141AF Figure 3 5 19 Registers for Port 8 ...
Страница 47: ...TOSHIBA CORPORATION 47 TMP96C141AF Figure 3 5 24 Registers for Port 9 ...
Страница 55: ...TOSHIBA CORPORATION 55 TMP96C141AF Figure 3 7 1 Block Diagram of 8 Bit Timers Timers 0 and 1 ...
Страница 58: ...58 TOSHIBA CORPORATION TMP96C141AF Figure 3 7 4 Timer Operation Control Register TRUN ...
Страница 59: ...TOSHIBA CORPORATION 59 TMP96C141AF Figure 3 7 5 Timer Mode Control Register TMOD ...
Страница 60: ...60 TOSHIBA CORPORATION TMP96C141AF Figure 3 7 6 Timer Flip Flop Control Register TFFCR ...
Страница 74: ...74 TOSHIBA CORPORATION TMP96C141AF Figure 3 8 4 8 Bit PWM0 Mode Control Register ...
Страница 75: ...TOSHIBA CORPORATION 75 TMP96C141AF Figure 3 8 5 8 Bit PWM1 Mode Control Register ...
Страница 76: ...76 TOSHIBA CORPORATION TMP96C141AF Figure 3 8 6 8 Bit PWM F F Control Register ...
Страница 77: ...TOSHIBA CORPORATION 77 TMP96C141AF Figure 3 8 7 Timer Operation Control Register TRUN ...
Страница 85: ...TOSHIBA CORPORATION 85 TMP96C141AF Figure 3 9 1 Block Diagram of 16 Bit Timer Timer 4 ...
Страница 86: ...86 TOSHIBA CORPORATION TMP96C141AF Figure 3 9 2 Block Diagram of 16 Bit Timer Timer 5 ...
Страница 87: ...TOSHIBA CORPORATION 87 TMP96C141AF Figure 3 9 3 16 Bit Timer Mode Controller Register T4MOD 1 2 ...
Страница 88: ...88 TOSHIBA CORPORATION TMP96C141AF Figure 3 9 4 16 Bit Controller Register T4MOD 2 2 ...
Страница 89: ...TOSHIBA CORPORATION 89 TMP96C141AF Figure 3 9 5 16 Bit Timer 4 F F Control T4FFCR ...
Страница 90: ...90 TOSHIBA CORPORATION TMP96C141AF Figure 3 9 6 16 Bit Timer Mode Control Register T5MOD 1 2 ...
Страница 91: ...TOSHIBA CORPORATION 91 TMP96C141AF Figure 3 9 7 16 Bit Timer Control Register T5MOD 2 2 ...
Страница 104: ...104 TOSHIBA CORPORATION TMP96C141AF Figure 3 10 2a Pattern Generation Control Register PG01CR ...
Страница 105: ...TOSHIBA CORPORATION 105 TMP96C141AF Figure 3 10 2b Pattern Generation Control Register PG01CR ...
Страница 107: ...TOSHIBA CORPORATION 107 TMP96C141AF Figure 3 10 5 16 bit Timer Trigger Control Register T45CR ...
Страница 121: ...TOSHIBA CORPORATION 121 TMP96C141AF Figure 3 11 6 Serial Mode Control Register Channel 1 SC1MOD ...
Страница 140: ...140 TOSHIBA CORPORATION TMP96C141AF Figure 3 12 2 A D Control Register ...
Страница 148: ...148 TOSHIBA CORPORATION TMP96C141AF Figure 3 13 4 Watchdog Timer Mode Register ...
Страница 149: ...TOSHIBA CORPORATION 149 TMP96C141AF Figure 3 13 5 Watchdog Timer Control Register ...
Страница 153: ...TOSHIBA CORPORATION 153 TMP96C141AF 1 Read Cycle ...
Страница 154: ...154 TOSHIBA CORPORATION TMP96C141AF 2 Write Cycle ...
Страница 157: ...TOSHIBA CORPORATION 157 TMP96C141AF 4 8 Timing Chart for I O Interface Mode ...
Страница 159: ...TOSHIBA CORPORATION 159 TMP96C141AF 4 10 Interrupt Operation Vcc 5V Ta 25 C unless otherwise noted ...
Страница 171: ...TOSHIBA CORPORATION 171 TMP96C141AF 8 Interrupt Control 1 2 ...
Страница 175: ...TOSHIBA CORPORATION 175 TMP96C141AF P42 CS2 CAS2 P5 AN0 3 P87 INT0 P90 TXD0 P93 TXD1 ...
Страница 176: ...176 TOSHIBA CORPORATION TMP96C141AF NMI WDTOUT CLK EA AM8 16 ALE RESET ...
Страница 177: ...TOSHIBA CORPORATION 177 TMP96C141AF X1 X2 VREF AGND ...