ccd4b1e26b
Move all extra documentation files into doc/ and move reverse engineering related notes to a separate directory, to keep things tidy.
41 lines
1.2 KiB
Plaintext
41 lines
1.2 KiB
Plaintext
STC89
|
|
|
|
This is the first generation protocol of STC MCUs.
|
|
|
|
Differences to STC12:
|
|
|
|
* Uses NONE parity instead of EVEN parity.
|
|
|
|
* Status packet is sent without frame start magic.
|
|
|
|
* Checksum calculations are different: a single-byte modular sum is used.
|
|
|
|
* Baudrate handshake isn't initiated with a type 0x50 packet; this is simply
|
|
skipped.
|
|
|
|
* After the handshake a special ping-pong sequence of 0x80 type packets needs
|
|
to be sent.
|
|
This doesn't appear to serve any purpose - possibly this is just done to
|
|
verify that the connection works reliably. STC12 doesn't require it anymore
|
|
because parity and the improved checksum ensure correct operation.
|
|
|
|
* Erase is acknowledged with type 0x80 packet instead of type 0x00
|
|
|
|
* After flash programming, there is no finish packet, type 0x69, sent; this
|
|
is simply skipped.
|
|
|
|
* Baudrate handshake
|
|
- Uses normal speed (/32) UART timing in 12T mode and double speed (/16)
|
|
in 6T mode
|
|
- IAP delay has some differences (see datasheet)
|
|
|
|
* Erase procedure
|
|
- A different magic sequence is used
|
|
(6 bytes with value 0x33)
|
|
- Only a single size is supplied
|
|
- response code has type 0x80
|
|
|
|
* Options
|
|
- Only a single option byte exists
|
|
|