Media: UART
Speed: 9600 bod
Data bits: 8
Stop bits: 1
Parity: none
Handshake: XON/XOFF

Commands:
---------

H:
Hello.
Responce: 2051Prog
Example:
>H
2051Prog

S:
Read signature.
Responce: signature bytes in HEX (prefixed by ':'), followed by operation status.
Example:
>S
:1E2100
00 OK

R:
Read flash.
Responce: flash contents in Intel HEX, mixed/followed by operation status.
Example:
>R
:01000000FF00
30 Read error
:00000001FF
00 OK

W:
Write flash. Should be followed by firmware data in Intel HEX.
Responce: operation status.
Note: Erase chip NOT performed before writing
Example:
>W
>:01000000FF00
>:00000002FE
20 Unknown HEX command
>:00000001FF
00 OK

L<bits: HEX>:
Write lock bits. High half-byte represents bit 2 (0 for unprogram, 1-F for program), low half-byte represents bit 1.
Responce: operation status.
Example:
>L11
00 OK

P:
Chip erase.
Responce: operation status.
Example:
>P
00 OK

Operation status:
-----------------
<Error code:HEX> <Description>
Example:
00 OK

Error codes:
------------
00: OK
10: Unknown command
2x: Write errors
20: Unknown HEX command
21: Buffer write error
3x: Read errors
30: Read error
31: Line encode error