BS85B12-3 HOLTEK [Holtek Semiconductor Inc], BS85B12-3 Datasheet - Page 72

no-image

BS85B12-3

Manufacturer Part Number
BS85B12-3
Description
Touch Key Flash Type 8-Bit MCU with LCD/LED Driver
Manufacturer
HOLTEK [Holtek Semiconductor Inc]
Datasheet
Rev. 1.00
Bit 2~0
Bit 7~6
Bit 5~4
Name
POR
R/W
Bit
TMnC1 Register
TnRP2~TnRP0: TMn CCRP 3-bit register, compared with the TMn Counter bit 9~bit 7
Comparator P Match Period
These three bits are used to setup the value on the internal CCRP 3-bit register, which are then
compared with the internal counter's highest three bits. The result of this comparison can be
selected to clear the internal counter if the TnCCLR bit is set to zero. Setting the TnCCLR bit to
zero ensures that a compare match with the CCRP values will reset the internal counter. As the
CCRP bits are only compared with the highest three counter bits, the compare values exist in 128
clock cycle multiples. Clearing all three bits to zero is in effect allowing the counter to overflow at
its maximum value.
TnM1~TnM0: Select TMn Operating Mode
These bits setup the required operating mode for the TM. To ensure reliable operation the TM
should be switched off before any changes are made to the TnM1 and TnM0 bits. In the
Timer/Counter Mode, the TM output pin control must be disabled.
TnIO1~TnIO0: Select TPn_0, TPn_1 output function
Compare Match Output Mode
PWM Mode
Timer/counter Mode
These two bits are used to determine how the TM output pin changes state when a certain
condition is reached. The function that these bits select depends upon in which mode the TM is
running.
In the Compare Match Output Mode, the TnIO1 and TnIO0 bits determine how the TM output
pin changes state when a compare match occurs from the Comparator A. The TM output pin can
be setup to switch high, switch low or to toggle its present state when a compare match occurs
from the Comparator A. When the bits are both zero, then no change will take place on the
output. The initial value of the TM output pin should be setup using the TnOC bit in the TMnC1
register. Note that the output level requested by the TnIO1 and TnIO0 bits must be different from
the initial value setup using the TnOC bit otherwise no change will occur on the TM output pin
when a compare match occurs. After the TM output pin changes state it can be reset to its initial
level by changing the level of the TnON bit from low to high.
TnM1
R/W
000: 1024 TMn clocks
001: 128 TMn clocks
010: 256 TMn clocks
011: 384 TMn clocks
100: 512 TMn clocks
101: 640 TMn clocks
110: 768 TMn clocks
111: 896 TMn clocks
00: Compare Match Output Mode
01: Undefined
10: PWM Mode
11: Timer/Counter Mode
00: No change
01: Output low
10: Output high
11: Toggle output
00: PWM output inactive state
01: PWM output active state
10: PWM output
11: Undefined
unused
7
0
Touch Key Flash MCU with LCD/LED Driver
TnM0
R/W
6
0
TnIO1
R/W
5
0
TnIO0
66
R/W
4
0
TnOC
R/W
BS85B12-3/BS85C20-3
3
0
TnPOL
R/W
2
0
TnDPX
R/W
1
0
February 1, 2011
TnCCLR
R/W
0
0

Related parts for BS85B12-3