In my haste to get my vending machine control board fabricated and assembled before the tariffs hit, I made a rookie mistake and forgot to include an LED on the board. As you may well be aware, an LED on a board is handy, particularly when working with an unfamiliar micro. As luck would have it, I'm off to a rocky start with this PIC18F56Q83, which I need for its CANBUS controller.
Fortunately, I have a spare 3-pin header (installed with a lock footprint - see my previous post) with +5V, ground and one port pin. That gives me one LED..... but wait, it can actually provide three different indications. Two LEDs + series resistors are wired up as shown in the diagram below. One LED is full on when the port pin is high. The other LED is on when the port pin is low. But if the port pin is set as in input, both LEDs and their resistors are connected in series between +5 and ground, resulting in both LEDs being dimly illuminated.
This idea may come in handy if you only have one port pin to spare and you want to indicate a couple conditions. Toggling the port pin with different duty cycles can indicate additional conditions.
As usual, this is just a suggestion. I hope you may find it useful at some point.
Fortunately, I have a spare 3-pin header (installed with a lock footprint - see my previous post) with +5V, ground and one port pin. That gives me one LED..... but wait, it can actually provide three different indications. Two LEDs + series resistors are wired up as shown in the diagram below. One LED is full on when the port pin is high. The other LED is on when the port pin is low. But if the port pin is set as in input, both LEDs and their resistors are connected in series between +5 and ground, resulting in both LEDs being dimly illuminated.
This idea may come in handy if you only have one port pin to spare and you want to indicate a couple conditions. Toggling the port pin with different duty cycles can indicate additional conditions.
As usual, this is just a suggestion. I hope you may find it useful at some point.