That's supposed to be a rectangle. But I made it 8 pixel tall instead of 7. And this small detail bricked the Arduino Micro 😅
The reason is that in my Arduino sketch I defined a framebuffer made of 7 byte arrays. Then I defined a couple graphics functions like `drawHorizontalLine` that would set the corresponding bits in the arrays. I didn't care for checking the boundaries, so when the sketch ran `drawHorizontalLine(y = 7)` it actually wrote somewhere outside the memory allocated for the framebuffer. That somewhere happened to be something related to the USB communication used by the Arduino Micro libraries, messing it up and making it incapable to talk with my PC. Repeated resets + upload lead to nothing. My only option left is reprogramming the MCU via the ICSP pins.
A couple notable things before reaching this point:
- To drive an entire row, you have to send an 87-bits string to the shift registers. The first 4 bits will be ignored. This leads you to 83 visible bits. If you look at the PCB, there are actually 85 columns: the first and last are never used (they'd be covered by the chassis anyway).
- The red rows follow the numbering: 0 is topmost, 7 is bottom. But the green rows are rotated by one: 0 is bottom, 1 is top, 7 is last but one bottom.
Next steps: reprogram the Arduino Micro before I put it back in the drawer, forget about it, pick it up months later, think it's broken and throw it away. Then, thinking that I'd like to try driving the LEDs straight from an embedded Linux machine:
- insert a few logic level converters, just to be sure that a 3.3V logic can drive the 5V drivers
- experiment with 1000Hz Linux kernel to be sure I can obtain the right update frequency without flickering and loading the CPU too much.