Close

Debug LEDs

A project log for MHF-002 (Mega Home FORTH)

ATmega2560 based SBC with VGA, PS/2 and SD cards - meant to run FORTH now and serve as graphic card later.

gilhadGilhad 11/18/2025 at 19:010 Comments

As I need feedback while testing things, I usually use LEDs on Arduino, but LEDs needs IO pins and forgotten code may affect function later, so I decided to use one pin (PD4) for 6 Neopixel WS2812B which are serial driven. Setting different colors may indicate different states and should I accidentally forget somewhere some testing code, it will reveal soon and in non harmfull way.

They share pin with X_SHARE_GRANTED signal, but it should not be problem, as this signal is input for MCU and LEDs are output and both are separated by resistor. GLUE, which set this signal does not read it, so it will not be bothered with data for LEDs and LEDs need some specific protocol, so they will ignore ocassional changing in the signal.

My plan it to dedicate some RAM for the values of these LEDs and simply let system resend it after each screen (60 times per second), so programs will just put values there and forgot it (like with videoRAM),

Here is the scheme

Debug LEDs are only on top of PCB (and I did not found more place for them, so I did not place there more of them). There are their numbers, you may populate just few with lower numbers 

Discussions