SN8P2602B
8-Bit Micro-Controller
SN8P2602B
USER’S MANUAL
Preliminary Specification Version 0.4
SONiX 8-Bit Micro-Controller
SONIX reserves the right to make change without further notice to any products herein to improve reliability, function or design. SONIX does not
assume any liability arising out of the application or use of any product or circuit described herein; neither does it convey any license under its patent
rights nor the rights of others. SONIX products are not designed, intended, or authorized for us as components in systems intended, for surgical
implant into the body, or other applications intended to support or sustain life, or for any other application in which the failure of the SONIX product
could create a situation where personal injury or death may occur. Should Buyer purchase or use SONIX products for any such unintended or
unauthorized application. Buyer shall indemnify and hold SONIX and its officers, employees, subsidiaries, affiliates and distributors harmless against
all claims, cost, damages, and expenses, and reasonable attorney fees arising out of, directly or indirectly, any claim of personal injury or death
associated with such unintended or unauthorized use even if such claim alleges that SONIX was negligent regarding the design or manufacture of
the part.
SONiX TECHNOLOGY CO., LTD
Page 1
Preliminary Version 0.4
SN8P2602B
8-Bit Micro-Controller
AMENDMENT HISTORY
Version
VER 0.1
VER 0.2
Date
Jun 2005
Nov. 2005
Dec 2005
Description
First issue
ADD Brown-Out reset circuit.
1.
Modify Topr value.
2.
Modify Brown-Out Reset description
3.
Remove power consumption(Pc).
4.
Add Fcpu limitation by noise filter enable.
5.
Modify ELECTRICAL CHARACTERISTIC.
1.
Add Marking Definition.
2.
Modify ELECTRICAL CHARACTERISTIC.
3.
Modify RST/P1.5/VPP PIN DISCRIPTION.
1.
Add Instruction Table.
VER 0.3
VER 0.4
Jan.2007
Mar.2007
SONiX TECHNOLOGY CO., LTD
Page 2
Preliminary Version 0.4
SN8P2602B
8-Bit Micro-Controller
Table of Content
AMENDMENT HISTORY ............................................................................................................................ 2
1
1
PRODUCT OVERVIEW......................................................................................................................... 7
1.1
1.2
1.3
1.4
1.5
2
2
FEATURES ........................................................................................................................................ 7
SYSTEM BLOCK DIAGRAM .......................................................................................................... 8
PIN ASSIGNMENT ........................................................................................................................... 9
PIN DESCRIPTIONS....................................................................................................................... 10
PIN CIRCUIT DIAGRAMS............................................................................................................. 11
CENTRAL PROCESSOR UNIT (CPU) .............................................................................................. 12
2.1
MEMORY MAP............................................................................................................................... 12
2.1.1
PROGRAM MEMORY (ROM) ................................................................................................. 12
2.1.1.1 RESET VECTOR (0000H) .................................................................................................. 13
2.1.1.2 INTERRUPT VECTOR (0008H)......................................................................................... 14
2.1.1.3 LOOK-UP TABLE DESCRIPTION.................................................................................... 16
2.1.1.4 JUMP TABLE DESCRIPTION ........................................................................................... 18
2.1.1.5 CHECKSUM CALCULATION........................................................................................... 20
2.1.2
CODE OPTION TABLE ........................................................................................................... 21
2.1.3
DATA MEMORY (RAM)........................................................................................................... 22
2.1.4
SYSTEM REGISTER................................................................................................................. 23
2.1.4.1 SYSTEM REGISTER TABLE ............................................................................................ 23
2.1.4.2 SYSTEM REGISTER DESCRIPTION ............................................................................... 23
2.1.4.3 BIT DEFINITION of SYSTEM REGISTER....................................................................... 24
2.1.4.4 ACCUMULATOR ............................................................................................................... 25
2.1.4.5 PROGRAM FLAG ............................................................................................................... 26
2.1.4.6 PROGRAM COUNTER....................................................................................................... 27
2.1.4.7 Y, Z REGISTERS................................................................................................................. 30
2.1.4.8 R REGISTERS ..................................................................................................................... 31
2.2
ADDRESSING MODE .................................................................................................................... 32
2.2.1
IMMEDIATE ADDRESSING MODE....................................................................................... 32
2.2.2
DIRECTLY ADDRESSING MODE .......................................................................................... 32
2.2.3
INDIRECTLY ADDRESSING MODE ...................................................................................... 32
2.3
STACK OPERATION...................................................................................................................... 33
2.3.1
2.3.2
2.3.3
3
3
OVERVIEW .............................................................................................................................. 33
STACK REGISTERS ................................................................................................................. 34
STACK OPERATION EXAMPLE............................................................................................. 35
RESET ..................................................................................................................................................... 36
SONiX TECHNOLOGY CO., LTD
Page 3
Preliminary Version 0.4
SN8P2602B
8-Bit Micro-Controller
3.1
3.2
3.3
3.4
OVERVIEW..................................................................................................................................... 36
POWER ON RESET......................................................................................................................... 37
WATCHDOG RESET...................................................................................................................... 37
BROWN OUT RESET ..................................................................................................................... 38
BROWN OUT DESCRIPTION ................................................................................................. 38
3.4.1
3.4.2
THE SYSTEM OPERATING VOLTAGE DECSRIPTION........................................................ 39
3.4.3
BROWN OUT RESET IMPROVEMENT.................................................................................. 39
3.5
EXTERNAL RESET ........................................................................................................................ 42
3.6
EXTERNAL RESET CIRCUIT ....................................................................................................... 42
3.6.1
3.6.2
3.6.3
3.6.4
3.6.5
4
4
Simply RC Reset Circuit ........................................................................................................... 42
Diode & RC Reset Circuit ........................................................................................................ 43
Zener Diode Reset Circuit ........................................................................................................ 43
Voltage Bias Reset Circuit........................................................................................................ 44
External Reset IC...................................................................................................................... 45
SYSTEM CLOCK .................................................................................................................................. 46
4.1
4.2
4.3
4.4
OVERVIEW..................................................................................................................................... 46
CLOCK BLOCK DIAGRAM .......................................................................................................... 46
OSCM REGISTER ........................................................................................................................... 47
SYSTEM HIGH CLOCK ................................................................................................................. 48
4.4.1
EXTERNAL HIGH CLOCK...................................................................................................... 48
4.4.1.1 CRYSTAL/CERAMIC......................................................................................................... 49
4.4.1.2 RC......................................................................................................................................... 49
4.4.1.3 EXTERNAL CLOCK SIGNAL........................................................................................... 50
4.5
SYSTEM LOW CLOCK .................................................................................................................. 51
4.5.1
5
5
SYSTEM CLOCK MEASUREMENT ........................................................................................ 52
SYSTEM OPERATION MODE ........................................................................................................... 53
5.1
5.2
5.3
OVERVIEW..................................................................................................................................... 53
SYSTEM MODE SWITCHING....................................................................................................... 54
WAKEUP ......................................................................................................................................... 56
OVERVIEW .............................................................................................................................. 56
WAKEUP TIME........................................................................................................................ 56
P1W WAKEUP CONTROL REGISTER ................................................................................... 57
5.3.1
5.3.2
5.3.3
6
6
INTERRUPT........................................................................................................................................... 58
6.1
6.2
6.3
6.4
6.5
OVERVIEW..................................................................................................................................... 58
INTEN INTERRUPT ENABLE REGISTER................................................................................... 59
INTRQ INTERRUPT REQUEST REGISTER ................................................................................ 60
GIE GLOBAL INTERRUPT OPERATION .................................................................................... 60
PUSH, POP ROUTINE .................................................................................................................... 61
Page 4
SONiX TECHNOLOGY CO., LTD
Preliminary Version 0.4
SN8P2602B
8-Bit Micro-Controller
6.6
6.7
6.8
6.9
7
7
INT0 (P0.0) INTERRUPT OPERATION......................................................................................... 62
T0 INTERRUPT OPERATION ....................................................................................................... 63
TC0 INTERRUPT OPERATION..................................................................................................... 64
MULTI-INTERRUPT OPERATION............................................................................................... 65
I/O PORT ................................................................................................................................................ 66
7.1
7.2
7.3
7.4
I/O PORT MODE ............................................................................................................................. 66
I/O PULL UP REGISTER ................................................................................................................ 67
I/O OPEN-DRAIN REGISTER........................................................................................................ 68
I/O PORT DATA REGISTER .......................................................................................................... 69
8
8
TIMERS .................................................................................................................................................. 70
8.1
8.2
8.2.1
WATCHDOG TIMER...................................................................................................................... 70
TIMER 0 (T0) ................................................................................................................................... 72
OVERVIEW .............................................................................................................................. 72
8.2.2
T0M MODE REGISTER........................................................................................................... 72
8.2.3
T0C COUNTING REGISTER................................................................................................... 73
8.2.4
T0 TIMER OPERATION SEQUENCE ..................................................................................... 74
8.3
TIMER/COUNTER 0 (TC0) ............................................................................................................ 75
8.3.1
OVERVIEW .............................................................................................................................. 75
8.3.2
TC0M MODE REGISTER ........................................................................................................ 76
8.3.3
TC0C COUNTING REGISTER ................................................................................................ 77
8.3.4
TC0R AUTO-LOAD REGISTER .............................................................................................. 78
8.3.5
TC0 CLOCK FREQUENCY OUTPUT (BUZZER) .................................................................. 79
8.3.6
TC0 TIMER OPERATION SEQUENCE .................................................................................. 80
8.4
PWM0 MODE .................................................................................................................................. 82
8.4.1
8.4.2
8.4.3
8.4.4
9
9
10
10
10.1
10.2
11
11
OVERVIEW .............................................................................................................................. 82
TCxIRQ and PWM Duty ........................................................................................................... 83
PWM Duty with TCxR Changing.............................................................................................. 84
PWM PROGRAM EXAMPLE .................................................................................................. 85
INSTRUCTION TABLE ....................................................................................................................... 86
ELECTRICAL CHARACTERISTIC .............................................................................................. 87
ABSOLUTE MAXIMUM RATING ................................................................................................ 87
ELECTRICAL CHARACTERISTIC............................................................................................... 87
OTP PROGRAMMING PIN............................................................................................................. 88
11.1.1
11.1.2
The pin assignment of Easy Writer transition board socket: ................................................... 88
Programming Pin Mapping: .................................................................................................... 89
12
12
PACKAGE INFORMATION ........................................................................................................... 90
Page 5
SONiX TECHNOLOGY CO., LTD
Preliminary Version 0.4