Wire protocol
The format is verified on hardware with the 20 mm pad and the 190 mm pad.
Transport
Section titled “Transport”- A serial port at 2 000 000 baud, 8 data bits, no parity, 1 stop bit.
- The 20 mm board has a native USB CDC port. USB CDC ignores the baud rate.
- The 190 mm board has a CH340 USB-to-UART bridge (USB ID
1A86:7523). It sends correct data only at 2 000 000 baud. - The board sends frames continuously from power-on. The computer sends nothing.
One frame is 4612 bytes.
| Offset | Size | Content |
|---|---|---|
| 0 | 2 | Header AA AA |
| 2 | 4608 | 2304 × int16, little-endian, row-major: index = row * 48 + column |
| 4610 | 2 | Trailer BB BB |
There is no sequence number, no timestamp and no checksum.
Synchronisation
Section titled “Synchronisation”FrameParser.feed() accepts chunks of any length and keeps the incomplete rest.
- If the buffer does not start with the header, the parser searches for the next
AA AAand drops the bytes before it. - If the two bytes 4610 bytes after the header are not
BB BB, the parser moves forward by one byte and searches again. - Otherwise it decodes the 4608 payload bytes and continues after the trailer.
Each skip adds 1 to FrameParser.resyncs.
The byte pair AA AA can also occur inside the payload. The trailer check rejects such a false header in most cases.
A damaged frame that keeps a correct header and trailer is not detected.
Measured values
Section titled “Measured values”| 20 mm pad | 190 mm pad | |
|---|---|---|
| Frame rate | about 56 frames/s | about 31 frames/s |
| Data rate | about 258 kB/s | about 145 kB/s |
| Value step | 20 | 1 |
| Resting noise (raw) | a small number of taxels with a constant offset | up to about 180 counts |
The counts are capacitance readings in arbitrary units. The readout board does the signal processing; the computer gets one number for each taxel.