SN8P2740 Series
ADC, OP-amp, Comparator 8-Bit Micro-Controller
4.3.3
4.3.4
EXTERNAL HIGH-SPEED OSCILLATOR ........................................................................................................ 45
EXTERNAL OSCILLATOR APPLICATION CIRCUIT ..................................................................................... 45
SYSTEM LOW-SPEED CLOCK.................................................................................................................................... 46
OSCM REGISTER.......................................................................................................................................................... 47
SYSTEM CLOCK MEASUREMENT ............................................................................................................................ 47
SYSTEM CLOCK TIMING............................................................................................................................................ 48
4.4
4.5
4.6
4.7
5
SYSTEM OPERATION MODE............................................................................................................................................ 51
OVERVIEW.................................................................................................................................................................... 51
NORMAL MODE ........................................................................................................................................................... 52
SLOW MODE ................................................................................................................................................................. 52
POWER DOWN MODE ................................................................................................................................................. 52
GREEN MODE ............................................................................................................................................................... 53
OPERATING MODE CONTROL MACRO ................................................................................................................... 54
WAKEUP........................................................................................................................................................................ 55
5.1
5.2
5.3
5.4
5.5
5.6
5.7
5.7.1
5.7.2
5.7.3
OVERVIEW .......................................................................................................................................................... 55
WAKEUP TIME.................................................................................................................................................... 55
P1W WAKEUP CONTROL REGISTER.............................................................................................................. 56
6
INTERRUPT ........................................................................................................................................................................... 57
OVERVIEW.................................................................................................................................................................... 57
INTEN INTERRUPT ENABLE REGISTER .................................................................................................................. 58
INTRQ INTERRUPT REQUEST REGISTER................................................................................................................ 59
GIE GLOBAL INTERRUPT OPERATION.................................................................................................................... 60
PUSH, POP ROUTINE.................................................................................................................................................... 61
EXTERNAL INTERRUPT OPERATION (INT0).......................................................................................................... 62
T0 INTERRUPT OPERATION....................................................................................................................................... 63
TC0 INTERRUPT OPERATION.................................................................................................................................... 64
ADC INTERRUPT OPERATION................................................................................................................................... 65
6.1
6.2
6.3
6.4
6.5
6.6
6.7
6.8
6.9
6.10
6.11
COMPARATOR INTERRUPT OPERATION (CMP0~CMP2) ..................................................................................... 66
MULTI-INTERRUPT OPERATION.............................................................................................................................. 67
7
8
I/O PORT................................................................................................................................................................................. 68
OVERVIEW.................................................................................................................................................................... 68
I/O PORT MODE ............................................................................................................................................................ 69
I/O PULL UP REGISTER ............................................................................................................................................... 70
I/O PORT DATA REGISTER ......................................................................................................................................... 71
PORT 4 ADC SHARE PIN.............................................................................................................................................. 72
TIMERS................................................................................................................................................................................... 75
WATCHDOG TIMER..................................................................................................................................................... 75
T0 8-BIT BASIC TIMER ................................................................................................................................................ 77
7.1
7.2
7.3
7.4
7.5
8.1
8.2
8.2.1
8.2.2
8.2.3
8.2.4
8.2.5
OVERVIEW .......................................................................................................................................................... 77
T0 TIMER OPERATION ...................................................................................................................................... 77
T0M MODE REGISTER....................................................................................................................................... 78
T0C COUNTING REGISTER............................................................................................................................... 78
T0 TIMER OPERATION EXPLAME................................................................................................................... 79
TC0 8-BIT TIMER/COUNTER ...................................................................................................................................... 80
OVERVIEW .......................................................................................................................................................... 80
TC0 TIMER OPERATION.................................................................................................................................... 81
PULSE WIDTH MODULATION (PWM) ............................................................................................................ 82
TC0 Pulse Generator Function............................................................................................................................... 83
TC0M MODE REGISTER .................................................................................................................................... 85
TC0C COUNTING REGISTER ............................................................................................................................ 85
TC0R AUTO-RELOAD REGISTER .................................................................................................................... 86
TC0D PWM DUTY REGISTER ........................................................................................................................... 86
TC0 TIMER OPERATION EXPLAME................................................................................................................ 87
8.3
8.3.1
8.3.2
8.3.3
8.3.4
8.3.5
8.3.6
8.3.7
8.3.8
8.3.9
9
ANALOG COMPARAOTR 0................................................................................................................................................ 89
OVERVIEW.................................................................................................................................................................... 89
NORMAL COMPARATOR MODE............................................................................................................................... 90
COMPARATOR 0 SPECIAL FUCNITON..................................................................................................................... 92
COMPARATOR MODE REGISTER ............................................................................................................................. 93
COMPARATOR APPLICATION NOTICE ................................................................................................................... 93
COMPARATOR 0 OPERATION EXPLAME................................................................................................................ 94
ANALOG COMPARAOTR 1........................................................................................................................................... 95
9.1
9.2
9.3
9.4
9.5
9.6
10
10.1
OVERVIEW.................................................................................................................................................................... 95
SONiX TECHNOLOGY CO., LTD
Page 4
Version 2.0