I'm new to embedded systems so apologies if this is a stupid question.
I am trying to implement a binary counter in the form of 8 LED's. I want to send an 8-bit binary number through USART and have the 8 LED's display the number (led off if bit is 0, led on when bit is 1).
What would be the best method to do this?
Thanks in advance :)
The component you need for this is an shift register. Most shift registers work with SPI communication instead of USART. I'm not familiar with USART shift registers. A popular model shift register is the 74hc595. There are a lot of examples online for this shift register for different microcontrollers available.
Another method you could use is to use just 8 GPIO pins to control your LEDS. If you use this method, be sure that you're not drawing to much current from the GPIO pins. To prevent drawing to much current use a transistor as switch for example the bc547. There are also many examples online for this.