Part 6. 7-segment LED Indicator | Embedded C Programming
HTML-код
- Опубликовано: 22 май 2024
- 7-segment LED displays are, by electronic standards, ancient technology. But they are so useful that they're still used all the time! In this tutorial, we learn about dynamic multi-character 7-segment displays that allow you to use a relatively few amount of GPIOs to control a large amount of characters. We go through the concept of how it works and then create a C-based program to show how to use them in practice. We hope you enjoy learning about microcontrollers and embedded systems using the PIC18F14K50 as an example!
This is the video tutorial for the more detailed written tutorial by Sergey, which you can find here: www.circuitbread.com/tutorial...
0:00 Introduction
1:02 How a dynamic 7-segment LED display works
5:00 Comparison between static and dynamic displays
6:15 Review of firmware
12:50 Programming and testing
13:26 Project summary and homework
14:46 Have you checked out CircuitBread.com?
For electronics tools, tutorials, equations and more check out our site: www.circuitbread.com
And check out our Friends of CircuitBread, who offer special discounts, product samples, resources and more to our users: www.circuitbread.com/friends
CircuitBread is joining the fight to help people more easily learn about and use electronics. With an ever-growing array of equations, tools, and tutorials, we're striving for the best ways to make electronics and electrical engineering topics more accessible to everyone.
Connect with CircuitBread:
Discord ➤ / discord
Instagram ➤ / circuitbread
Facebook ➤ / circuitbread
Twitter ➤ / circuitbread - Наука
Another term for 'dynamic' in this context would be multi-plexing?
A more well known term I think "multiplexing"
Yep, they are definitely being multiplexed! I don't know why the terminology is "static" versus "dynamic" in this context, to be honest. Just that it is the terms we've learned and see being used by others as well. But, behind the actual words, yes, it is basically just multiplexing!
Very informative, thank you. 🙂
Glad it was helpful!
Hi, I like that you used individual resistors per segment, but I fear that they are too low resistance. Assuming a 2v forward voltage for a red LED, when an "8." is displayed, that results in approx. 6mA/segment. So 6*8=48mA and that exceeds the 40mA limit for an Arduino output pin (for each of the 6 anodes). I think doubling the resistance value would be a good idea and I doubt you'd lose any noticeable brightness. Just a suggestion...
Great point, I don't know what the current limit on a PIC pin is.
@@andymouse It's even less, I'm pretty sure it's 25mA.
@@Enigma758 Problems for him then !...cheers !
Great catch, thank you! Yes, with the PIC18F14K50 that we used, the max is 25mA per GPIO pin for both sinking and sourcing (though some PIC's have certain pins that only go up to 6mA, I think.) I imagine we didn't have any problems because we didn't leave the display on for days on end showing 888. I'll talk to Sergey about this and see how he'd like to tweak the written portion and we may do a pinned comment to point this out for people trying to emulate it.
more please.
Sorry to ask this but what is "MCC" that you refer to in this video?
MPLAB Code Configurator - it's a tool Microchip developed to simplify code development. It can be very helpful but does change the process considerably so we decided to do these projects both with and without the MCC.
This is where FPGAs are best suited, because linear programming could be bogged down by other routines and fail to maintain persistence of vision.
Yes! FPGAs are awesome for concurrent things like this. I was talking to Sergey the other day and we're rekindling the idea of doing an FPGA based series soon. Fingers crossed!