I wrote my own library for this chip to display signed numbers, hexadecimals, octals, floats and even strings. The internal decoder is neat for simple things but ultimately a little limited.
Thanks Kevin well explained video. Walking through the data sheet was useful. I down loaded the sketch, so now I have the building block of the program that I can alter to suit the project I'am working. And thanks Daniel previous comments, the red insulating tape really improves the display.
Kevin Darrah to be fair, I was originally annoyed (at the spec) that the first digit was 0x01 as I am used to counting from zero. I was thinking "what was the point of a No-op". Then you explained. Made perfect sense. (to me)
many thanks from Italy. I was working on a project and I was going crazy. three max 7219 in cascade, only by chance did I notice those capacitors at the entrance and I solved, now all 24 digits light up
Very informative. I like the way you explained it. I have the 7219 display and I want to use it as a clock with the DS1307 RTC module but I ran into a problem. I have the appropriate libraries installed but when I open the IDE it doesn't see the DS1307RTC and therefore its not included in the code. How can I solve this problem? Also I'm stumped as to why, after uploading the sketch I get a 'was not declared in this scope' error message. Please, any help would be greatly appreciated.
So essentially the MAX7219 can multiplex 64 LEDs? 8×8x8=512...÷64=8 of these IC drivers for single color LEDs. So the benefit is just the SPI interface? I'm curious if you could use the 7219 to interface with different ADC channels simultaneously as a metered display output. Something like a lab power supply that can display, current, voltage, average power, elapsed time, etc. from a single microcontroller.
Kevin Darrah Now I wonder if it would be possible to use the ST Micro STM8S003 microcontroller used on the eBay cheapo 3 digit voltmeters selling for less than $1. The STM8's have a 5 channel (multiplexed) 10 bit ADC and SPI. I haven't built anything with several layers of depth and a microcontroller before. How do I determine how many displays the microcontroller can multiplex? The MC will need to read the ADC values, and then output that information through SPI to daisy chained displays, and still keep up the persistence of vision illusion... I know it's a big question. I'm not asking you to solve the application. I'm looking for a theoretical frame of reference. What are the correct first order questions/answers to look for in order to find the solution to this problem? Datasheet link below if needed. www.google.com/url?sa=t&source=web&cd=2&ved=0ahUKEwidy7fnoazSAhWGRyYKHf9DBZsQFggdMAE&url=www.st.com/resource/en/datasheet/stm8s003k3.pdf&usg=AFQjCNHbWzXUQHBMe_BrsQXIbWn0JkDjeg&sig2=6nQ21tp4BjPT8DCfi9GfYQ
I've used the AMS AS1115 for driving 7-segment displays. The bonus there is that, on top of driving 8 7-segment displays, you can also scan 16 buttons/switches over I2C!
There is an Arduino library called LEDControl available specifically for driving the MAX7219/7221 (playground.arduino.cc/Main/LedControl). That makes things even easier.
Works great for 7-segment displays, but is incredibly slow if you're using the MAX7219 for driving an 8x8 LED matrix. Especially if daisy chaining more than 3-4.
Hi Kevin, great tutorial! Since the popular LedControl.h library is everywhere in videos and tutorials and it doesn't take advantage of hardware SPI, understanding how this works with real SPI is really nice. I have a cuestion... I've made a custom 8 seven segments display and the wiring I did is not the same as the max7219 module you have, since mine it's not the same address of the hex values of the datasheet. I can not take advantage of that. How could I solve this?
Kevin Darrah You keep mentioning/using that board and it's kinda inspiring me to make my own board with onboard LiPo circuitry and some WS2812s. I've done a couple of projects that use a Nano or Pro Mini, a cheap LiPo board, and a WS2812 ring and figured it would be pretty nice if I had everything already on a single, 45mm diameter, round PCB. My background is in programming and computer science and I've really just jumped into electronics with no training so it's a little daunting tackling some of these projects not entirely knowing what I'm doing. I have just designed and assembled a custom mechanical keyboard that uses a standard Arduino compatible board as a driver which was my first big step into PCB design and I'm now looking to expand my skillset and be able to incorporate a microcontroller into my designs rather than sticking to an existing one.
3:00 "you can daisy chain these up", it's NOT that easy. there is a design flaw. The module you have is the exact the one I'm using in this moment, I have just finished daisy chaining 5 of them. Unfortunately there is a design error in the module you are showing, the Vcc OUT is connected AFTER D1, in other words, the first module with work on Vcc -- Voltage drop over D1 ie: 4.3V, the second will work at 4.3V minus Voltage drop over D1 = 3.4V, the next module will work in an unpredictable manor working under 2.7V. The solution is to de-solder the D1 and jumper the pads. or the solution I prefer, solder a pin on the via that is near the diode (you can see the Pcb track going from diode to the via. and place the Vcc power connection on this pin. DO NOT connect each module directly to 5V leaving the diode in place, because the chip will work at 4.3V and supply the logic level to the next module that requires the logic in a 5V range.
not sure - I've been messing around with the IDE under the hood lately... part of it was because of my troubles in programming the ESP8266. I'm working on cleaning all of that up - may actually do a video on that as well
Kevin, Thanks for doing these vids! I thought I knew a lot about Arduino until I started watching your channel. What capture software do you use to record what's on the screen?
Great chip. Most of them on ebay are clones/counterfeit - but they work great. The real chip is like $6 IIRC. It is one of the parts that Maxim will send you for free as a sample.
lol, that's actually what that blue display is doing. Uses the ESP8266 to get the subs and views... weather too. Part2 in the series: th-cam.com/video/qU76yWHeQuw/w-d-xo.html
awesome, these are the types of tutorial videos that make the day ! MAX7219 is a nice chip to start spi programming as well.
yay! glad to hear it. Never sure if anyone cares about these part-specific videos
Thank you for this! Awesome... exactly what I needed. Great work.
I wrote my own library for this chip to display signed numbers, hexadecimals, octals, floats and even strings. The internal decoder is neat for simple things but ultimately a little limited.
Hello. I would like to have a 3 digit display but without all the wires. Could I use something like this? Thanks.
Thanks Kevin well explained video. Walking through the data sheet was useful. I down loaded the sketch, so now I have the building block of the program that I can alter to suit the project I'am working.
And thanks Daniel previous comments, the red insulating tape really improves the display.
Thank you for your explanation of the No-op usage. that made things very clear.
lol, or I hope I didn't confuse you too much! I watched that part back again... face palm
Kevin Darrah to be fair, I was originally annoyed (at the spec) that the first digit was 0x01 as I am used to counting from zero. I was thinking "what was the point of a No-op". Then you explained. Made perfect sense. (to me)
ha, that's funny, because when I first wrote the test code - everything was for(int i=0... I have the same habit
Do 14 segment 6 digits display pls. Keep up the good work
want to use this as a counter using a push button to increase the numbers and another for reset. Can you send a sketch for this ?
If you wanted to daisy chain a few, and then power them separately from the arduino pin, how would you go about it?
I'm trying to get this to work but I can't figure out what data clock and load pin to plug my display into
Excellent breakdown. Thank you for the time you took for the instruction. Well done.
many thanks from Italy.
I was working on a project and I was going crazy.
three max 7219 in cascade, only by chance did I notice those capacitors at the entrance and I solved, now all 24 digits light up
Very informative. I like the way you explained it. I have the 7219 display and I want to use it as a clock with the DS1307 RTC module but I ran into a problem. I have the appropriate libraries installed but when I open the IDE it doesn't see the DS1307RTC and therefore its not included in the code. How can I solve this problem? Also I'm stumped as to why, after uploading the sketch I get a 'was not declared in this scope' error message. Please, any help would be greatly appreciated.
So essentially the MAX7219 can multiplex 64 LEDs? 8×8x8=512...÷64=8 of these IC drivers for single color LEDs. So the benefit is just the SPI interface?
I'm curious if you could use the 7219 to interface with different ADC channels simultaneously as a metered display output. Something like a lab power supply that can display, current, voltage, average power, elapsed time, etc. from a single microcontroller.
yep, 64 LEDs. a lab power supply would be a perfect application of this part
Kevin Darrah Now I wonder if it would be possible to use the ST Micro STM8S003 microcontroller used on the eBay cheapo 3 digit voltmeters selling for less than $1. The STM8's have a 5 channel (multiplexed) 10 bit ADC and SPI.
I haven't built anything with several layers of depth and a microcontroller before. How do I determine how many displays the microcontroller can multiplex? The MC will need to read the ADC values, and then output that information through SPI to daisy chained displays, and still keep up the persistence of vision illusion... I know it's a big question. I'm not asking you to solve the application. I'm looking for a theoretical frame of reference. What are the correct first order questions/answers to look for in order to find the solution to this problem?
Datasheet link below if needed.
www.google.com/url?sa=t&source=web&cd=2&ved=0ahUKEwidy7fnoazSAhWGRyYKHf9DBZsQFggdMAE&url=www.st.com/resource/en/datasheet/stm8s003k3.pdf&usg=AFQjCNHbWzXUQHBMe_BrsQXIbWn0JkDjeg&sig2=6nQ21tp4BjPT8DCfi9GfYQ
Would you have to shut it down prior to cutting the power?
No
I've used the AMS AS1115 for driving 7-segment displays. The bonus there is that, on top of driving 8 7-segment displays, you can also scan 16 buttons/switches over I2C!
oh boy, I think I have to buy that part now...
And it has an interrupt pin.
I can't run this sketch on arduino uno !
I used pin 13 as CLK, pin 11 as DIN and pin 10/2 as CS
what changes in your sketch I have to do ?
There is an Arduino library called LEDControl available specifically for driving the MAX7219/7221 (playground.arduino.cc/Main/LedControl). That makes things even easier.
thanks, I knew someone had a library
Works great for 7-segment displays, but is incredibly slow if you're using the MAX7219 for driving an 8x8 LED matrix. Especially if daisy chaining more than 3-4.
Hi Kevin, great tutorial! Since the popular LedControl.h library is everywhere in videos and tutorials and it doesn't take advantage of hardware SPI, understanding how this works with real SPI is really nice.
I have a cuestion... I've made a custom 8 seven segments display and the wiring I did is not the same as the max7219 module you have, since mine it's not the same address of the hex values of the datasheet. I can not take advantage of that. How could I solve this?
So would you recommend those for building an 8x8x8 rgb led cube?
Do you have any videos on designing a custom Arduino based board yet?
closest thing I think I'v got is just what I did with that 328 board - schematic is up there: www.kevindarrah.com/wiki/index.php?title=328Board
Kevin Darrah You keep mentioning/using that board and it's kinda inspiring me to make my own board with onboard LiPo circuitry and some WS2812s. I've done a couple of projects that use a Nano or Pro Mini, a cheap LiPo board, and a WS2812 ring and figured it would be pretty nice if I had everything already on a single, 45mm diameter, round PCB.
My background is in programming and computer science and I've really just jumped into electronics with no training so it's a little daunting tackling some of these projects not entirely knowing what I'm doing. I have just designed and assembled a custom mechanical keyboard that uses a standard Arduino compatible board as a driver which was my first big step into PCB design and I'm now looking to expand my skillset and be able to incorporate a microcontroller into my designs rather than sticking to an existing one.
Can you easily make a 6 digit display out of this?
Great video, very informative. So how many 7 segment displays can one chip handle?
3:00 "you can daisy chain these up", it's NOT that easy. there is a design flaw.
The module you have is the exact the one I'm using in this moment, I have just finished daisy chaining 5 of them.
Unfortunately there is a design error in the module you are showing, the Vcc OUT is connected AFTER D1, in other words, the first module with work on Vcc -- Voltage drop over D1 ie: 4.3V, the second will work at 4.3V minus Voltage drop over D1 = 3.4V, the next module will work in an unpredictable manor working under 2.7V.
The solution is to de-solder the D1 and jumper the pads. or the solution I prefer, solder a pin on the via that is near the diode (you can see the Pcb track going from diode to the via. and place the Vcc power connection on this pin.
DO NOT connect each module directly to 5V leaving the diode in place, because the chip will work at 4.3V and supply the logic level to the next module that requires the logic in a 5V range.
Sir, where do you buy your project boards at?
why invalid library ?
Why the apparent device resets at 14:03 and 15:22 in the video? Was there some weirdness about the programmer?
not sure - I've been messing around with the IDE under the hood lately... part of it was because of my troubles in programming the ESP8266. I'm working on cleaning all of that up - may actually do a video on that as well
Hi Kevin,
Did you ever mention in this vid why you had to add the 100uf cap across VCC & GND? Or did I miss that?
Thanks,
Ken
He did.
He had problems with the on-board decoupling capacitor not doing a good enough job.
Kevin, Thanks for doing these vids! I thought I knew a lot about Arduino until I started watching your channel. What capture software do you use to record what's on the screen?
I was using the max7219's to make a 8x8x8 led cube...then I came across the ws281x
Great chip. Most of them on ebay are clones/counterfeit - but they work great. The real chip is like $6 IIRC. It is one of the parts that Maxim will send you for free as a sample.
yea, I'm with you on that. No way they're getting these for that cheap
BTW...I'm using the Arduino Uno.
Learn to pronounce
hello, I would like to know how many 7 segments can support an arduino mega and uno card.
thank you in advance.
Good content! I just ordered one of these $1.22 w/ shipping. Could be a good way to keep track of your TH-cam subscribers...
lol, that's actually what that blue display is doing. Uses the ESP8266 to get the subs and views... weather too. Part2 in the series: th-cam.com/video/qU76yWHeQuw/w-d-xo.html
Thanks @Kevin Darrah.... you've answered my unanswered question on Electronics Stackexchange
electronics.stackexchange.com/questions/412986/max7221-not-always-powering-on/417167
♥️👍
TIL you say SPI like "spy"
pyromen321 Kevin does, but I doubt that's the intended pronunciation.
Used an Arduino Uno same pins, same exact segment display, uploaded code, not working. Ooops... needed to uncomment counterValue. Thank you.