PFS122
8bit MTP MCU with 12-bit R-Type ADC
5.4.5. System Clock and LVR level......................................................................................33
5.4.6. System Clock Switching ............................................................................................34
Comparator...........................................................................................................................35
5.5.1 Internal reference voltage (Vinternal R)...........................................................................36
5.5.2 Using the comparator ................................................................................................38
5.5.3 Using the comparator and bandgap 1.20V.................................................................39
16-bit Timer (Timer16) ..........................................................................................................40
8-bit Timer (Timer2/Timer3) with PWM generation................................................................42
5.7.1 Using the Timer2 to generate periodical waveform....................................................43
5.7.2 Using the Timer2 to generate 8-bit PWM waveform...................................................45
5.7.3 Using the Timer2 to generate 6-bit PWM waveform...................................................46
5.7.4 Complementary PWM with Dead Zones....................................................................47
WatchDog Timer...................................................................................................................50
Interrupt ................................................................................................................................50
5.5.
5.6
5.7
5.8
5.9
5.10 Power-Save and Power-Down ..............................................................................................53
5.10.1 Power-Save mode (“stopexe”)...................................................................................53
5.10.2 Power-Down mode (“stopsys”) ..................................................................................54
5.10.3 Wake-up....................................................................................................................55
5.11 IO Pins..................................................................................................................................56
5.12 Reset and LVR......................................................................................................................57
5.12.1 Reset.........................................................................................................................57
5.12.2 LVR reset ..................................................................................................................57
5.13 Analog-to-Digital Conversion (ADC) module .........................................................................57
5.13.1 The input requirement for AD conversion...................................................................58
5.13.2 ADC clock selection...................................................................................................59
5.13.3 Configure the analog pins..........................................................................................59
5.13.4 Using the ADC...........................................................................................................59
5.13.5 How to calculate ADC input voltage VIN .....................................................................60
6. IO Registers ........................................................................................................................61
6.1.
6.2.
6.3.
6.4.
6.5.
6.6.
6.7.
6.8.
ACC Status Flag Register (flag), IO address = 0x00 .............................................................61
Stack Pointer Register (sp), IO address = 0x02.....................................................................61
Clock Mode Register (clkmd), IO address = 0x03 .................................................................61
Interrupt Enable Register (inten), IO address = 0x04.............................................................62
Interrupt Request Register (intrq), IO address = 0x05 ...........................................................62
Timer16 mode Register (t16m), IO address = 0x06...............................................................63
External Oscillator setting Register (eoscr), IO address = 0x0a.............................................63
Interrupt Edge Select Register (integs), IO address = 0x0c...................................................64
©Copyright 2020, PADAUK Technology Co. Ltd
Page 4 of 93
PDK-DS-PFS122-EN_V000-May 28, 2020