17.1.
17.2.
ADC Structure ............................................................................................................106
ADC Operation...........................................................................................................106
ADC Input Channels ...........................................................................................................106
Starting a Conversion .........................................................................................................107
Sample Code for ADC ........................................................................................................107
ADC Conversion Time ........................................................................................................107
I/O Pins Used with ADC Function.......................................................................................107
Idle and Power-Down Mode................................................................................................107
ADC Register .............................................................................................................108
ADC Sample Code .....................................................................................................110
17.2.1.
17.2.2.
17.2.3.
17.2.4.
17.2.5.
17.2.6.
17.3.
17.4.
18.Watch Dog Timer (WDT) ........................................................................... 112
18.1.
18.2.
18.3.
18.4.
WDT Structure............................................................................................................112
WDT Register.............................................................................................................112
WDT Hardware Option ...............................................................................................113
WDT Sample Code.....................................................................................................114
19.Reset......................................................................................................... 115
19.1.
19.2.
19.3.
19.4.
19.5.
19.6.
19.7.
19.8.
Reset Source..............................................................................................................115
Power-On Reset.........................................................................................................115
WDT Reset.................................................................................................................116
Software Reset...........................................................................................................116
External Reset............................................................................................................117
Brown-Out Reset........................................................................................................117
Illegal Address Reset..................................................................................................118
Reset Sample Code ...................................................................................................119
20.Power Management................................................................................... 120
20.1.
Power Saving Mode ...................................................................................................120
Idle Mode ............................................................................................................................120
Power-down Mode..............................................................................................................120
Interrupt Recovery from Power-down .................................................................................120
Reset Recovery from Power-down .....................................................................................120
KBI wakeup Recovery from Power-down ...........................................................................121
Power Monitor Module................................................................................................121
Power Control Register...............................................................................................121
Power Control Sample Code ......................................................................................123
20.1.1.
20.1.2.
20.1.3.
20.1.4.
20.1.5.
20.2.
20.3.
20.4.
21.System Clock............................................................................................. 124
21.1.
21.2.
21.3.
Clock Structure...........................................................................................................124
Clock Control Register................................................................................................125
Sample code for switching internal RC-OSC Clock to External XTAL.........................127
22.In System Programming (ISP) ................................................................... 128
22.1.
ISP (IAP) Control Register..........................................................................................128
23.In Application Programming (IAP).............................................................. 131
23.1.
ISP/IAP Sample Code ................................................................................................132
24.Auxiliary SFRs ........................................................................................... 135
25.Hardware Option........................................................................................ 139
26.Absolute Maximum Rating......................................................................... 141
27.Electrical Characteristics............................................................................ 142
27.1.
27.2.
DC Characteristics......................................................................................................142
AC Characteristics......................................................................................................143
28.Instruction Set............................................................................................ 144
29.Package Dimension................................................................................... 147
30.Revision History......................................................................................... 150
MEGAWIN
MG82FE/L532 Data Sheet
7