English
Language : 

SM59R02G1 Datasheet, PDF (52/57 Pages) SyncMOS Technologies,Inc – Instruction-set compatible with MCS-51
SM59R02G1
8-Bit Micro-controller
8KB with ISP Flash
& 256B RAM embedded
13. In-System Programming (Internal ISP)
The SM59R02G1 can generate flash control signal by internal hardware circuit. Users utilize flash control register, flash
address register and flash data register to perform the ISP function without removing the SM59R02G1 from the system.
The SM59R02G1 provides internal flash control signals which can do flash program/chip erase/page erase/protect
functions. User need to design and use any kind of interface which SM59R02G1 can input data. User then utilize ISP
service program to perform the flash program/chip erase/page erase/protect functions.
13.1. ISP service program
The ISP service program is a user developed firmware program which resides in the ISP service program space.
After user developed the ISP service program, user then determine the size of the ISP service program. User need
to program the ISP service program in the SM59R02G1 for the ISP purpose.
The ISP service programs were developed by user so that it should includes any features which relates to the flash
memory programming function as well as communication protocol between SM59R02G1 and host device which
output data to the SM59R02G1. For example, if user utilize UART interface to receive/transmit data between
SM59R02G1 and host device, the ISP service program should include baud rate, checksum or parity check or any
error-checking mechanism to avoid data transmission error.
The ISP service program can be initiated under SM59R02G1 active or idle mode. It can not be initiated under power
down mode.
13.2. Lock Bit (N)
The Lock Bit N has two functions: one is for service program size configuration and the other is to lock the ISP
service program space from flash erase function.
The ISP service program space address range $1C00 to $1FFF. It can be divided as blocks of N*256 byte. (N=0 to
4). When N=0 means no ISP function, all of 8K byte flash memory can be used as program memory. When N=1
means ISP service program occupies 256 byte while the rest of 7.75K byte flash memory can be used as program
memory. The maximum ISP service program allowed is 1K byte when N=4. Under such configuration, the usable
program memory space is 7K byte.
After N determined, SM59R02G1 will reserve the ISP service program space downward from the top of the program
address $1FFF. The start address of the ISP service program located at $1x00 while x is depending on the lock bit N.
As shown in Table 13-1.
The lock bit N function is different from the flash protect function. The flash erase function can erase all of the flash
memory except for the locked ISP service program space. If the flash not has been protected, the content of ISP
service program still can be read. If the flash has been protected, the overall content of flash program memory space
including ISP service program space can not be read.
Table 13.1 ISP code area.
N
ISP service program address
0
No ISP service program
1
256 bytes ($1F00h ~ $1FFFh)
2
512 bytes ($1E00h ~ $1FFFh)
3
768 bytes ($1D00h ~ $1FFFh)
4
1.0 K bytes ($1C00h ~ $1FFFh)
ISP service program configurable in N*256 byte (N= 0 ~ 4)
13.3. Program the ISP Service Program
After Lock Bit N is set and ISP service program been programmed, the ISP service program memory will be
protected (locked) automatically. The lock bit N has its own program/erase timing. It is different from the flash
Specifications subject to change without notice contact your sales representatives for the most recent information.
ISSFD-M061
52
Ver.G SM59R02G1 09/2015