Rainbow Electronics AT89C5131 User Manual
Page 44

44
AT89C5131
4136A–USB–03/03
03
Miscellaneous Write Functions
:nnxxxx03ffssddcc
Where:
nn = number of bytes (hex) in record
xxxx = required field, but value is a “don’t care”
03 = Write Function
ff = subfunction code
ss = selection code
dd = data input (as needed)
cc = checksum
Subfunction Code = 01 (Erase Block)
ff = 01
ss = block number in bits 7:5, Bits 4:0 = zeros
Example:
:0200000301A05A erase block 5
Subfunction Code = 04 (Reset Boot Vector and Status Byte)
ff = 04
ss = don’t care
dd = don’t care
Example:
:020000034500F8 Reset boot vector (FCh) and status byte (FFh)
Subfunction Code = 05 (Program Software Security Bits)
ff = 05
ss = 00 program software security bit 1 (Level 2 inhibit writing to Flash)
ss = 01 program software security bit 2 (Level 3 inhibit Flash verify)
ss = 02 program security bit 3 (No effect, left for Philips compatibility; disable external
memory is already set in the default hardware security byte)
Example:
:020000030501F6 program security bit 2
Subfunction Code = 06 (Program Boot Status Byte, Boot Vector, X2 bit, Osc bit or BLJB
fuse bit)
ff = 06
ss = 00 program Boot Status byte
ss = 01 program Software Boot vector
ss = 02 program X2 bit
ss = 03 program Osc bit
ss = 04 program BLJB
Example:
:03000003060100F5 program boot vector with 00
Subfunction Code = 07 (Full chip erase)
ff = 07
ss = don’t care
dd = don’t care
Example:
:03000007F5 program boot vector with 00
Table 40. Intel-Hex Records Used by In-System Programming (Continued)
Record Type
Command/Data Function