SN8P2711A
8-Bit Micro-Controller
SONiX TECHNOLOGY CO., LTD
Page 5
Version 0.1
6.6 INT0
(P0.0)
INTERRUPT
OPERATION......................................................................................... 65
6.7 INT1
(P0.1)
INTERRUPT
OPERATION......................................................................................... 67
6.8 TC0
INTERRUPT
OPERATION..................................................................................................... 68
6.9 TC1
INTERRUPT
OPERATION..................................................................................................... 69
6.10 ADC
INTERRUPT
OPERATION ................................................................................................... 71
6.11 MULTI-INTERRUPT
OPERATION............................................................................................... 72
7
7
7
I/O PORT ........................................................................................................................................ 73
7.1 I/O
PORT
MODE ............................................................................................................................. 73
7.2 I/O
PULL
UP
REGISTER ................................................................................................................ 74
7.3 I/O
PORT
DATA
REGISTER .......................................................................................................... 75
7.4 PORT
4
ADC
SHARE
PIN............................................................................................................... 76
8
8
8
TIMERS .......................................................................................................................................... 80
8.1 WATCHDOG
TIMER...................................................................................................................... 80
8.2 TIMER/COUNTER
0
(TC0) ............................................................................................................ 83
8.2.1 OVERVIEW............................................................................................................................. 83
8.2.2
TC0M MODE REGISTER....................................................................................................... 84
8.2.3
TC1X8, TC0X8, TC0GN FLAGS............................................................................................ 85
8.2.4
TC0C COUNTING REGISTER .............................................................................................. 85
8.2.5 TC0R
AUTO-LOAD
REGISTER............................................................................................ 87
8.2.6
TC0 CLOCK FREQUENCY OUTPUT (BUZZER)................................................................ 88
8.2.7
TC0 TIMER OPERATION SEQUENCE ................................................................................ 89
8.3 TIMER/COUNTER
1
(TC1) ............................................................................................................ 91
8.3.1 OVERVIEW............................................................................................................................. 91
8.3.2
TC1M MODE REGISTER....................................................................................................... 92
8.3.3 TC1X8
FLAG........................................................................................................................... 92
8.3.4
TC1C COUNTING REGISTER .............................................................................................. 93
8.3.5 TC1R
AUTO-LOAD
REGISTER............................................................................................ 95
8.3.6
TC1 CLOCK FREQUENCY OUTPUT (BUZZER)................................................................ 96
8.3.7
TC1 TIMER OPERATION SEQUENCE ................................................................................ 97
8.4 PWM
MODE .................................................................................................................................... 99
8.4.1 OVERVIEW............................................................................................................................. 99
8.4.2
TCnIRQ and PWM Duty........................................................................................................ 100
8.4.3
PWM Duty with TCnR Changing .......................................................................................... 101
8.4.4
PWM PROGRAM EXAMPLE .............................................................................................. 102
9
9
9
5+1 CHANNEL ANALOG TO DIGITAL CONVERTER....................................................... 103
9.1 OVERVIEW................................................................................................................................... 103
9.2 ADM
REGISTER ........................................................................................................................... 104
9.3 ADR
REGISTERS.......................................................................................................................... 105