Holtek HT66F20-1 Manual page 88

Flash mcu with eeprom
Table of Contents

Advertisement

If the T0CCLR bit in the TM0C1 register is high then the counter will be cleared when a compare
match occurs from Comparator A. However, here only the T0AF interrupt request flag will be
generated even if the value of the CCRP bits is less than that of the CCRA registers. Therefore when
T0CCLR is high no T0PF interrupt request flag will be generated. If the CCRA bits are all zero, the
counter will overflow when its reaches its maximum 10-bit, 3FF Hex, value, however here the T0AF
interrupt request flag will not be generated.
As the name of the mode suggests, after a comparison is made, the TM output pin will change
state. The TM output pin condition however only changes state when a T0AF interrupt request flag
is generated after a compare match occurs from Comparator A. The T0PF interrupt request flag,
generated from a compare match occurs from Comparator P, will have no effect on the TM output
pin. The way in which the TM output pin changes state are determined by the condition of the
T0IO1 and T0IO0 bits in the TM0C1 register. The TM output pin can be selected using the T0IO1
and T0IO0 bits to go high, to go low or to toggle from its present condition when a compare match
occurs from Comparator A. The initial condition of the TM output pin, which is setup after the
T0ON bit changes from low to high, is setup using the T0OC bit. Note that if the T0IO1 and T0IO0
bits are zero then no pin change will take place.
Counte� Value
Counte� ove�flow
CCRP=0
0x�FF
CCRP
CCRA
TnO�
TnPAU
TnPOL
CCRP Int.
Flag TnPF
CCRA Int.
Flag TnAF
TM O/P Pin
Output pin set to
Output Toggle with
initial Level Low
if TnOC=0
He�e TnIO [1:0] = 11
Toggle Output select
Note: 1. With TnCCLR=0, a Comparator P match will clear the counter
2. The TM output pin is controlled only by the TnAF flag
3. The output pin is reset to its initial state by a TnON bit rising edge
4. n=0
Rev. 1.40
HT66F20-1/HT66F30-1/HT68F20-1/HT68F30-1
CCRP > 0
Counte� clea�ed �y CCRP value
CCRP > 0
Pause
Output not affected �y TnAF
flag. Re�ains High until �eset
�y TnO� �it
TnAF flag
�ote TnIO [1:0] = 10
Active High Output select
Compare Match Output Mode – TnCCLR=0
88
Flash MCU with EEPROM
TnCCLR = 0; TnM [1:0] = 00
Counte�
Resu�e
Resta�t
Stop
Output Inve�ts
when TnPOL is high
Output Pin
Reset to Initial value
Output cont�olled �y
othe� pin-sha�ed function
�ove��e� ��� �01�
Ti�e

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the HT66F20-1 and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Ht66f30-1Ht68f20-1Ht68f30-1

Table of Contents