-
Notifications
You must be signed in to change notification settings - Fork 1
Debugging IO
Joel Ray Holveck edited this page Dec 17, 2018
·
2 revisions
There’s a debugging port that you can connect to while developing. This uses SPI on pins that are shared with by the programmer. It’s safe to leave the debugging port connected during programming.
A logic analyzer can be used to read the data, but you also can read the debugging output and send it to a USB port with an Arduino using the software at https://github.com/piquan/christmas-tree/blob/master/software/spi-slave/spi-slave.ino. You’ll need the following connections between the programming port and the debugging Arduino:
- Reset (debugger to device, active low): Programmer pin 5, debugging host pin 8
- Data (device to debugger): Programmer pin 1, debugging host pin 7. Data is on rising edge, MSB-first
- Clock (device to debugger): Programmer pin 3, debugging host pin 6. Shared with a capacitive sensor, so clock invalidation is important for rejection. The tree circuit clocks at 5kHz (100us per clock transition); resync on delays over 10ms (50Hz).
The specific contents aren’t described in this document; search the source code for Debugger.
Output is \r\n-terminated ASCII, and a byte 0x0c is sent if a sensor is touched or an error is detected.