SM39R08A3
8-Bit Micro-controller
with 8KB+1KB ISP Flash
& 512B RAM embedded
OB39R08A3
SM39R08A3
Product List ................................................................................................................................................................. 3
Description .................................................................................................................................................................. 3
Ordering Information.................................................................................................................................................... 3
Features...................................................................................................................................................................... 3
Pin Configuration......................................................................................................................................................... 4
Block Diagram ............................................................................................................................................................. 6
Pin Description ............................................................................................................................................................ 7
Special Function Register (SFR) .................................................................................................................................. 8
Function Description.................................................................................................................................................. 12
1.
General Features .............................................................................................................................................. 12
1.1
Embedded Flash....................................................................................................................................... 12
IO Pads..................................................................................................................................................... 12
Instruction timing Selection........................................................................................................................ 12
The Clock Out Selection............................................................................................................................ 13
RESET...................................................................................................................................................... 13
1.2
1.3
1.4
1.5
1.5.1 Hardware RESET function .................................................................................................................... 13
1.5.2 Software RESET function...................................................................................................................... 13
1.5.3 Reset status.......................................................................................................................................... 14
1.5.4 Time Access Key register (TAKEY)........................................................................................................ 14
1.5.5 Software Reset register (SWRES)......................................................................................................... 14
1.5.6 Example of software reset..................................................................................................................... 15
1.6
Clocks....................................................................................................................................................... 15
Instruction Set ................................................................................................................................................... 16
Memory Structure.............................................................................................................................................. 20
2.
3.
3.1
Program Memory ...................................................................................................................................... 20
Data Memory ............................................................................................................................................ 21
Data memory - lower 128 byte (00h to 7Fh)............................................................................................... 21
Data memory - higher 128 byte (80h to FFh) ............................................................................................. 21
Data memory - Expanded 256 bytes ($00 到 $FF)..................................................................................... 21
3.2
3.3
3.4
3.5
4.
CPU Engine ...................................................................................................................................................... 22
4.1
Accumulator.............................................................................................................................................. 22
B Register................................................................................................................................................. 22
Program Status Word................................................................................................................................ 23
Stack Pointer............................................................................................................................................. 23
Data Pointer.............................................................................................................................................. 23
Data Pointer 1........................................................................................................................................... 24
Clock control register................................................................................................................................. 24
Interface control register............................................................................................................................ 25
4.2
4.3
4.4
4.5
4.6
4.7
4.8
5.
6.
GPIO................................................................................................................................................................. 26
Timer 0 and Timer 1........................................................................................................................................... 28
6.1
Timer/counter mode control register (TMOD)............................................................................................. 28
Timer/counter control register (TCON)....................................................................................................... 29
Peripheral Frequency control register........................................................................................................ 30
Mode 0 (13-bit Counter/Timer)................................................................................................................... 30
Mode 1 (16-bit Counter/Timer)................................................................................................................... 31
Mode 2 (8-bit auto-reload Counter/Timer).................................................................................................. 32
Mode 3 (Timer 0 acts as two independent 8 bit Timers / Counters) ............................................................ 32
6.2
6.3
6.4
6.5
6.6
6.7
7.
Timer 2 and Capture Compare Unit ................................................................................................................... 33
7.1
Timer 2 function ........................................................................................................................................ 36
7.1.1 Timer mode........................................................................................................................................... 36
7.1.2 Event counter mode.............................................................................................................................. 36
7.1.3 Gated timer mode................................................................................................................................. 37
7.1.4 Reload of Timer 2.................................................................................................................................. 37
7.2
Compare function...................................................................................................................................... 37
7.2.1 Compare Mode 0.................................................................................................................................. 38
7.2.2 Compare Mode 1.................................................................................................................................. 38
Specifications subject to change without notice contact your sales representatives for the most recent information.
ISSFD-M063 Ver C SM39R08A3 04/20/2013
- 1 -