|
Post by Admin on Dec 22, 2016 17:06:58 GMT
based on brandon wilson's class we can make simple C# programs to interact with the microcontroller over USB. Essentially it openes the drive letter as a file, creating ability to IO via read and writes to it. The basic principle of data exchange, as we are the host device, is like this: Command: 1.Send X Command Bytes 2.Send Y Data Bytes 3.Read Z Data Bytes Y and/or Z can be 0 Known Commands: Description | Command Bytes | Send Data Bytes | Read Data Bytes | Known chip support | Gets Chip Information 1 | "06 05 00 00 00 00 00 00 01" | 0 Bytes | 528 Bytes | 2251-68 | Gets Chip Information 2 | "06 56 00 00 00 00 00 00 00" | 0 Bytes | 512 Bytes | 2251-68 | Gets Chip Information 3 | "06 05 49 4E 46 4F 00 00 80" | 0 Bytes | 528 Bytes | 2251-68 | Get firmware upload status -first byte in response is the result -valid responses after sending header: 0x55, 0x12 -valid responses after sending body: 0xA5, 0x0E | "06 B0 00 00 08 00 00 00 00 00 00 00 00 00 00 00" | 0 Bytes | 8 Bytes | 2251-68 | Send Image Header (first 512 bytes) -XX = Header Type, for most images its 03 | "06 B1 XX 00 00 00 00 00 01 00 00 00 00 00 00 00" | 512 Bytes | 512 Bytes | 2251-68 | Send Image Body (all after first 512 bytes) -XX = Body Type, for most images its 02 | "06 B1 XX 00 00 00 00 00 3E 00 00 00 00 00 00 00" | (Image Size - 0x200) Bytes | (Image Size - 0x200) Bytes | 2251-68 |
|
|