AP160 AMICC [AMIC Technology], AP160 Datasheet - Page 9

no-image

AP160

Manufacturer Part Number
AP160
Description
8-BIT MICROCONTROLLER WITH 8KB OTP
Manufacturer
AMICC [AMIC Technology]
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
AP1601M10LA
Manufacturer:
DIODES/美台
Quantity:
20 000
Part Number:
AP1601M8LA
Manufacturer:
DIODES/美台
Quantity:
20 000
Part Number:
AP1602
Manufacturer:
DIODES/美台
Quantity:
20 000
Part Number:
AP1603WA
Manufacturer:
DIODES
Quantity:
9 000
Part Number:
AP1603WA
Manufacturer:
DIODES/美台
Quantity:
20 000
Part Number:
AP1603WL-7
Manufacturer:
DIDOES
Quantity:
6 000
Part Number:
AP1604AWA
Manufacturer:
DIODES/美台
Quantity:
20 000
Part Number:
AP1604AWG-7
Manufacturer:
DIDOES
Quantity:
6 000
Part Number:
AP1604AWL-7
Manufacturer:
DIDOES
Quantity:
9 000
Part Number:
AP1609SG-13
Manufacturer:
TI
Quantity:
12 500
Company:
Part Number:
AP1609SG-13
Quantity:
5 000
In this mode, two options are selected by bit EXEN2 in T2CON. If EXEN2=0, Timer2 counts up to 0FFFFH and then sets
the TF2 bit upon overflow. The overflow also causes the timer registers to be reloaded with the 16-bit value in RCAP2H and
RCAP2L. The values in Timer in Capture Mode RCAP2H and RCAP2L are preset by software.
If EXEN2=1, a 16-bit reload can be triggered either by an overflow or by a 1-to-0 transition at external input T2EX. This
transition also sets the EXF2 bit. Both the TF2 and EXF2 bits can generate an interrupt if enabled. Setting the DCEN bit
enables Timer2 to count up or down, as shown in Figure 3. In the mode, the T2EX pin controls the direction of the count. A
logic 1 at T2EX makes Timer 2 count up. The timer will overflow at 0FFFFH and set the TF2 bit. The overflow also causes
the 16-bit value in RCAP2H and RCAP2L to be reloaded into the timer registers, TH2 and TL2, respectively. A logic 0 at
T2EX makes Timer 2 count down. The timer underflows when TH2 and Tl2 equal the values stored in RCAP2H and
RACP2L. The underflow sets the TF2 bit and causes 0FFFFH to be reloaded into the timer registers. The EXF2 bit toggles
whenever Timer 2 overflows or underflows and can be used as a 17
not flag an interrupt.
Table 3. T2MOD (Timer 2 Mode Control Register)
T2Mod Address = 0C9H
Not bit addressable
Version 0.0
Symbol
OSC
Bit
Symbol
DCEN
T2OE
-
7
T2 PIN
-
12
Not implemented, reserved for future
Timer 2 Output Enable bit.
When set, this bit allows Timer 2 to be configured as an up/down counter.
6
-
C/T2=0
C/T2=1
Figure 3. Timer 2 Auto Reload Mode (DCEN=1)
TR2
(DOWN COUNTING RELOAD VALUE)
CONTROL
5
-
(UP COUNTING RELOAD VALUE)
RCAP2H
0FFH
TH2
9
4
-
RCAP2L
0FFH
TL2
th
bit of resolution. In this operating mode, EXF2 does
Function
OVERFLOW
3
-
T2EX PIN
2
COUNT
DIRECTION
1=UP
0=DOWN
-
AMIC Technology, Inc.
Reset Value = XXXX XX00B
TOGGLE
T2OE
INTERRUPT
TIMER 2
1
TF2
AP160
DCEN
EXF2
0

Related parts for AP160