This means you can do all the wiring “off-Pi” and then attach the project all at once. I used one of my RasPiO ® Breakout boards and a 170 point mini-breadboard to wire up the 7-segment display. Here are the connections you need to make… But if you connect these segments directly to a 3V3 source off-Pi without current-limiting resistors, you will damage or kill the leds in the segments (yes of course I tried it). In reality, we’re switching fast, so each segment should only be ON for a short time. I’ve opted for 100 Ohm, which gives the LEDs a little protection. We also need some current-limiting resistors. We need some Python code to handle this for us, and we’ll do it using 12 of the Pi’s GPIO pins (4 to switch the digits and 8 to switch the segments). Using the same circuitry to control more than one ‘thing’ is called multiplexing. ![]() The way that you get each digit displaying something different is to switch them on and off again, in turn, faster than the eye can observe. ![]() But How Can We Use That? It’s Impossible? So if we had 12, 9, 8 & 6 all connected to GND, and 7 & 4 HIGH, all four digits would display the number 1. ![]() If you connect pin 12 to GND, the first digit will activate (9 = second, 8 = third, 6 = fourth).īringing each of the other 8 pins HIGH activates a specific segment on all currently active digits. Common cathode 4-digit 7-seg pinouts How Does It Work?
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |