Rev. 1.00 2 June 19, 2014 Rev. 1.00 3 June 19, 2014
HT46R003B
Cost-Effective A/D 8-bit OTP MCU
HT46R003B
Cost-Effective A/D 8-bit OTP MCU
Power Down Mode and Wake-up .................................................................. 22
Power Down Mode ................................................................................................................ 22
Standby Current Considerations ........................................................................................... 22
Wake-up ................................................................................................................................ 22
Watchdog Timer ............................................................................................. 24
Watchdog Timer Clock Source .............................................................................................. 24
Watchdog Timer Control Registers ....................................................................................... 24
Watchdog Timer Operation ................................................................................................... 25
Reset and Initialization .................................................................................. 26
Reset Functions .................................................................................................................... 26
Reset Initial Conditions ......................................................................................................... 28
Input/Output Ports ......................................................................................... 30
Port A Wake-up ..................................................................................................................... 31
I/O Port Control Registers
..................................................................................................... 31
Pin-shared Functions ............................................................................................................ 32
I/O Pin Structures .................................................................................................................. 33
Programming Considerations
................................................................................................ 34
Timer/Event Counter ..................................................................................... 35
Conguring the Timer/Event Counter Input Clock Source .................................................... 35
Timer Register – TMR
........................................................................................................... 36
Timer Control Register – TMRC
............................................................................................ 36
Timer Mode
........................................................................................................................... 37
Event Counter Mode ............................................................................................................. 38
Pulse Width Capture Mode ................................................................................................... 38
Prescaler
............................................................................................................................... 39
PFD Function ........................................................................................................................ 40
I/O Interfacing ........................................................................................................................ 40
Programming Considerations ................................................................................................ 40
Timer Program Example ....................................................................................................... 41
Time Base ............................................................................................................................. 42
Pulse Width Modulator .................................................................................. 42
PWM Operation ..................................................................................................................... 42
6+2 PWM Mode .................................................................................................................... 42
7+1 PWM Mode .................................................................................................................... 43
PWM Output Control ............................................................................................................. 44
Analog to Digital Converter ......................................................................... 45
A/D Overview ........................................................................................................................ 45
A/D Converter Data Registers – ADRL, ADRH ..................................................................... 45
A/D Converter Control Registers – ADCR, ACSR, ADPCR .................................................. 46
A/D Operation ....................................................................................................................... 48
A/D Input Pins ....................................................................................................................... 49
Summary of A/D Conversion Steps ....................................................................................... 49