Enter programming mode, Chip erase, Programming the flash – Rainbow Electronics AT90S1200 User Manual
Page 39: Table 15, Table 16

39
AT90S1200
0838H–AVR–03/02
.
Enter Programming Mode
The following algorithm puts the device in Parallel Programming mode:
1.
Apply supply voltage according to Table 13, between V
CC
and GND.
2.
Set the RESET and BS pin to “0” and wait at least 100 ns.
3.
Apply 11.5 - 12.5V to RESET. Any activity on BS within 100 ns after +12V has
been applied to RESET, will cause the device to fail entering Programming
mode.
Chip Erase
The Chip Erase command will erase the Flash and EEPROM memories, and the Lock
bits. The Lock bits are not Reset until the Flash and EEPROM have been completely
erased. The Fuse bits are not changed. Chip Erase must be performed before the Flash
or EEPROM is reprogrammed.
Load Command “Chip Erase”
1.
Set XA1, XA0 to “10”. This enables command loading.
2.
Set BS to “0”.
3.
Set DATA to “1000 0000”. This is the command for Chip Erase.
4.
Give XTAL1 a positive pulse. This loads the command.
5.
Give WR a
t
WLWH_CE
wide negative pulse to execute Chip Erase,
t
WLWH_CE
is found
in Table 17. Chip Erase does not generate any activity on the RDY/BSY pin.
Programming the Flash
A: Load Command “Write Flash”
1.
Set XA1, XA0 to “10”. This enables command loading.
2.
Set BS to “0”.
3.
Set DATA to “0001 0000”. This is the command for Write Flash.
Table 15. XA1 and XA0 Coding
XA1
XA0
Action when XTAL1 is Pulsed
0
0
Load Flash or EEPROM Address (High or low address byte for Flash
determined by BS).
0
1
Load Data (High or low data byte for Flash determined by BS).
1
0
Load Command
1
1
No Action, Idle
Table 16. Command Byte Coding
Command Byte
Command Executed
1000 0000
Chip Erase
0100 0000
Write Fuse Bits
0010 0000
Write Lock Bits
0001 0000
Write Flash
0001 0001
Write EEPROM
0000 1000
Read Signature Bytes
0000 0100
Read Fuse and Lock Bits
0000 0010
Read Flash
0000 0011
Read EEPROM