English
Language : 

SM39R04G1 Datasheet, PDF (1/47 Pages) SyncMOS Technologies,Inc – 4K Bytes on-chip flash program memory
SM39R04G1
8-Bit Micro-controller
4KB with ISP Flash
& 256B RAM embedded
Description ..........................................................................................................................................................................3
Features .............................................................................................................................................................................. 3
Pin Configuration ................................................................................................................................................................4
Pin Description....................................................................................................................................................................6
Special Function Register (SFR) ........................................................................................................................................8
Function Description .........................................................................................................................................................10
1. General Features .....................................................................................................................................................10
1.1. Embedded Flash .........................................................................................................................................10
1.2. IO Pads .......................................................................................................................................................10
1.3. Instruction timing Selection .........................................................................................................................10
1.4. RESET ........................................................................................................................................................ 11
1.4.1. Hardware RESET function ............................................................................................................. 11
1.4.2. Software RESET function .............................................................................................................. 11
1.4.3. Time Access Key register (TAKEY)................................................................................................12
1.4.4. Software Reset register (SWRES).................................................................................................12
1.4.5. Example of software reset .............................................................................................................12
1.5. Clocks .........................................................................................................................................................12
2. Instruction Set ..........................................................................................................................................................13
3. Memory Structure.....................................................................................................................................................17
3.1. Program Memory ........................................................................................................................................17
3.2. Data Memory...............................................................................................................................................18
3.2.1. Data memory - lower 128 byte (00h to 7Fh) ..................................................................................18
3.2.2. Data memory - higher 128 byte (80h to FFh) ................................................................................18
4. CPU Engine .............................................................................................................................................................19
4.1. Accumulator ................................................................................................................................................19
4.2. B Register ...................................................................................................................................................19
4.3. Program Status Word..................................................................................................................................20
4.4. Stack Pointer ...............................................................................................................................................20
4.5. Data Pointer ................................................................................................................................................20
4.6. Data Pointer 1 .............................................................................................................................................21
4.7. Interface control register .............................................................................................................................21
5. GPIO ........................................................................................................................................................................22
6. Timer 0 and Timer 1 .................................................................................................................................................23
6.1. Timer/counter mode control register (TMOD) .............................................................................................23
6.2. Timer/counter control register (TCON) .......................................................................................................24
6.3. T0、T1 signal swapping: ..........................................................................................................................24
7. Serial interface 0 ......................................................................................................................................................25
7.1. Mode 0 ........................................................................................................................................................26
7.2. Mode 1 ........................................................................................................................................................26
7.3. Mode 2 ........................................................................................................................................................27
7.4. Mode 3 ........................................................................................................................................................27
7.5. Multiprocessor communication of Serial Interface 0 ...................................................................................27
7.6. Baud rate generator ....................................................................................................................................28
7.6.1. Serial interface 0 modes 1 and 3 ...................................................................................................28
7.7. Clock source for baud rate ..........................................................................................................................28
8. Watchdog timer ........................................................................................................................................................29
9. Interrupt ....................................................................................................................................................................32
9.1. Priority level structure..................................................................................................................................34
10.
Power Management Unit .................................................................................................................................36
10.1.
Idle mode ................................................................................................................................................36
10.2.
Stop mode...............................................................................................................................................36
11.
IIC function ......................................................................................................................................................37
12.
LVI – Low Voltage Interrupt .............................................................................................................................41
13.
In-System Programming (Internal ISP) ...........................................................................................................42
13.1.
ISP service program ...............................................................................................................................42
13.2.
Lock Bit (N) .............................................................................................................................................42
13.3.
Program the ISP Service Program .........................................................................................................43
Specifications subject to change without notice contact your sales representatives for the most recent information.
ISSFD-M053
1
Ver.H SM39R04G1 08/2013