HT46R002/HT46R003
Cost-Effective A/D 8-Bit OTP MCU
Oscillator ........................................................................................................ 22
System Oscillator Overview .................................................................................................. 22
System Clock Configurations................................................................................................ 22
Internal RC Oscillator – HIRC ............................................................................................... 22
Internal 12kHz Oscillator – LIRC........................................................................................... 22
Power Down Mode and Wake-up.................................................................. 23
Power Down Mode................................................................................................................ 23
Entering the Power Down Mode ........................................................................................... 23
Standby Current Considerations........................................................................................... 23
Wake-up................................................................................................................................ 24
Watchdog Timer............................................................................................. 25
Watchdog Timer Clock Source.............................................................................................. 25
Watchdog Timer Control Registers ....................................................................................... 25
Watchdog Timer Operation ................................................................................................... 26
Reset and Initialization.................................................................................. 27
Reset Functions .................................................................................................................... 27
Reset Initial Conditions ......................................................................................................... 30
Input/Output Ports......................................................................................... 33
Pull-high Resistors ................................................................................................................ 33
Port A Wake-up ..................................................................................................................... 34
I/O Port Control Registers..................................................................................................... 35
Pin-shared Functions ............................................................................................................ 36
I/O Pin Structures.................................................................................................................. 37
Programming Considerations................................................................................................ 38
Timer/Event Counter ..................................................................................... 39
Configuring the Timer/Event Counter Input Clock Source .................................................... 39
Timer Register – TMR0......................................................................................................... 40
Timer Control Register – TMR0C.......................................................................................... 40
Timer Mode ........................................................................................................................... 41
Event Counter Mode ............................................................................................................. 42
Pulse Width Capture Mode ................................................................................................... 43
Prescaler............................................................................................................................... 44
PFD Function (for HT46R003) .............................................................................................. 44
I/O Interfacing........................................................................................................................ 44
Programming Considerations................................................................................................ 45
Timer Program Example ....................................................................................................... 46
Pulse Width Modulator.................................................................................. 47
PWM Operation..................................................................................................................... 47
6+2 PWM Mode .................................................................................................................... 47
7+1 PWM Mode .................................................................................................................... 48
PWM Output Control............................................................................................................. 49
Rev. 1.21
3
April 11, 2017