PMS150C
8bit OTP Type IO Controller
Data Sheet
Version 0.04 – Jan. 24, 2018
Copyright
2018 by PADAUK Technology Co., Ltd., all rights reserved
6F-6, No.1, Sec. 3, Gongdao 5th Rd., Hsinchu City 30069, Taiwan, R.O.C.
TEL: 886-3-572-8688
www.padauk.com.tw
PMS150C
8 bit IO-Type Controller
IMPORTANT NOTICE
PADAUK Technology reserves the right to make changes to its products or to terminate
production of its products at any time without notice. Customers are strongly
recommended to contact PADAUK Technology for the latest information and verify
whether the information is correct and complete before placing orders.
PADAUK Technology products are not warranted to be suitable for use in life-support
applications or other critical applications. PADAUK Technology assumes no liability for
such applications. Critical applications include, but are not limited to, those that may
involve potential risks of death, personal injury, fire or severe property damage.
PADAUK Technology assumes no responsibility for any issue caused by a customer’s
product design. Customers should design and verify their products within the ranges
guaranteed by PADAUK Technology. In order to minimize the risks in customers’ products,
customers should design a product with adequate operating safeguards.
PMS150C is NOT designed for AC RC step-down powered, high power ripple or high EFT
requirement application, please do NOT apply PMS150C to those application products.
©Copyright 2018, PADAUK Technology Co. Ltd
Page 2 of 67
PDK-DS-PMS150C-EN-V004 – Jan. 24, 2018
PMS150C
8 bit IO-Type Controller
Table of Contents
1.
Features ............................................................................................................................... 8
1.1.
1.2.
1.3.
System Features ...................................................................................................................8
CPU Features .......................................................................................................................8
Package Information .............................................................................................................8
2.
3.
4.
General Description and Block Diagram .......................................................................... 9
Pin Functional Description .............................................................................................. 10
Device Characteristics ..................................................................................................... 12
4.1.
4.2.
4.3.
4.4.
4.5.
4.6.
4.7.
4.8.
4.9.
4.10.
4.11.
4.12.
DC/AC Characteristics ........................................................................................................12
Absolute Maximum Ratings .................................................................................................13
Typical IHRC Frequency vs. VDD (calibrated to 16MHz) .....................................................14
Typical ILRC Frequency vs. VDD ........................................................................................14
Typical IHRC Frequency vs. Temperature (calibrated to 16MHz) ........................................15
Typical ILRC Frequency vs. Temperature ...........................................................................15
Typical Operating Current vs. VDD and CLK=IHRC/n .........................................................16
Typical Operating Current vs. VDD and CLK=ILRC/n..........................................................16
Typical IO pull high resistance .............................................................................................17
Typical IO driving current (I
OH
) and sink current (I
OL
) ...........................................................17
Typical IO input high/low threshold voltage (V
IH
/V
IL
) ............................................................18
Typical power down current (I
PD
) and power save current (I
PS
) ............................................19
5.
Functional Description ..................................................................................................... 20
5.1.
5.2.
Program Memory – OTP .....................................................................................................20
Boot Procedure ...................................................................................................................20
5.2.1. Timing charts for reset conditions ...........................................................................21
5.3.
5.4.
Data Memory – SRAM ........................................................................................................22
Oscillator and clock .............................................................................................................22
5.4.1. Internal High RC oscillator and Internal Low RC oscillator ......................................22
5.4.2. IHRC calibration .....................................................................................................22
5.4.3. IHRC Frequency Calibration and System Clock ......................................................23
5.4.4. System Clock and LVR levels .................................................................................24
5.5.
Comparator .........................................................................................................................25
Page 3 of 67
PDK-DS-PMS150C-EN-V004 – Jan. 24, 2018
©Copyright 2018, PADAUK Technology Co. Ltd
PMS150C
8 bit IO-Type Controller
5.5.1. Internal reference voltage (V
internal R
) ........................................................................26
5.5.2. Using the comparator .............................................................................................28
5.5.3. Using the comparator and band-gap 1.20V ............................................................29
5.6.
5.7.
16-bit Timer (Timer16).........................................................................................................30
8-bit timer (Timer2) with PWM generation ...........................................................................31
5.7.1. Using the Timer2 to generate periodical waveform .................................................32
5.7.2. Using the Timer2 to generate 8-bit PWM waveform ................................................33
5.7.3. Using the Timer2 to generate 6-bit PWM waveform ................................................34
5.8.
5.9.
5.10.
Watchdog Timer ..................................................................................................................36
Interrupt...............................................................................................................................37
Power-Save and Power-Down ............................................................................................40
5.10.1. Power-Save mode (“stopexe”) ................................................................................40
5.10.2. Power-Down mode (“stopsys”)................................................................................41
5.10.3. Wake-up .................................................................................................................42
5.11.
5.12.
IO Pins ................................................................................................................................43
Reset ..................................................................................................................................44
6.
IO Registers ....................................................................................................................... 44
6.1.
6.2.
6.3.
6.4.
6.5.
6.6.
6.7.
6.8.
6.9.
6.10.
6.11.
6.12.
6.13.
6.14.
6.15.
6.16.
6.17.
ACC Status Flag Register (flag), IO address = 0x00 ...........................................................44
Stack Pointer Register (sp), IO address = 0x02 ...................................................................44
Clock Mode Register (clkmd), IO address = 0x03................................................................44
Interrupt Enable Register
(inten),
IO address = 0x04...........................................................45
Interrupt Request Register (intrq), IO address = 0x05 .........................................................45
Timer 16 mode Register (t16m), IO address = 0x06 ............................................................45
External Oscillator setting Register (eoscr,
write only),
IO address = 0x0a ..........................46
Interrupt Edge Select Register (integs), IO address = 0x0c .................................................46
Port A Digital Input Enable Register (padier), IO address = 0x0d ........................................46
Port A Data Registers (pa), IO address = 0x10 ...................................................................46
Port A Control Registers (pac), IO address = 0x11 ..............................................................46
Port A Pull-High Registers (paph), IO address = 0x12 .........................................................46
MISC Register (misc), IO address = 0x1b ...........................................................................47
Comparator Control Register (gpcc), IO address = 0x1A.....................................................47
Comparator Selection Register (gpcs), IO address = 0x1E .................................................48
Timer2 Control Register (tm2c), IO address = 0x1C ............................................................48
Timer2 Counter Register (tm2ct), IO address = 0x1D ..........................................................48
Page 4 of 67
PDK-DS-PMS150C-EN-V004 – Jan. 24, 2018
©Copyright 2018, PADAUK Technology Co. Ltd
PMS150C
8 bit IO-Type Controller
6.18.
6.19.
Timer2 Bound Register (tm2b), IO address = 0x09 .............................................................49
Timer2 Scalar Register (tm2s), IO address = 0x17 ..............................................................49
7.
Instructions ....................................................................................................................... 50
7.1.
7.2.
7.3.
7.4.
7.5.
7.6.
7.7.
7.8.
7.9.
Data Transfer Instructions ...................................................................................................51
Arithmetic Operation Instructions ........................................................................................54
Shift Operation Instructions .................................................................................................55
Logic Operation Instructions ................................................................................................56
Bit Operation Instructions ....................................................................................................58
Conditional Operation Instructions.......................................................................................58
System control Instructions .................................................................................................59
Summary of Instructions Execution Cycle ...........................................................................61
Summary of affected flags by Instructions ...........................................................................62
8.
9.
Code Options .................................................................................................................... 63
Special Notes .................................................................................................................... 64
9.1.
9.2.
Warning ...............................................................................................................................64
Using IC ..............................................................................................................................64
9.2.1. IO pin usage and setting .........................................................................................64
9.2.2. Interrupt ..................................................................................................................64
9.2.3. System clock switching ...........................................................................................65
9.2.4. Power down mode, wakeup and watchdog .............................................................65
9.2.5. TIMER time out.......................................................................................................65
9.2.6. IHRC.......................................................................................................................65
9.2.7. LVR ........................................................................................................................66
9.2.8. Instructions .............................................................................................................66
9.2.9. RAM definition ........................................................................................................66
9.2.10. Program writing ......................................................................................................66
9.3.
Using ICE ............................................................................................................................67
©Copyright 2018, PADAUK Technology Co. Ltd
Page 5 of 67
PDK-DS-PMS150C-EN-V004 – Jan. 24, 2018