Reply to topic  [ 15 posts ]  Go to page Previous  1, 2
MAX7219 8 Digit Seven Segment Display Module (HCMODU0082) 
Author Message
Site Admin

Joined: Sun Aug 05, 2012 4:15 pm
Posts: 740
Post Re: MAX7219 8 Digit Seven Segment Display Module (HCMODU0082
You could simply pad the value with a zero if it's less than 10. Here is an (untested) example:


Code:
void loop()
{
  for(byte Seconds = 0; Seconds < 60; Seconds++)
  {
    Disp2DigNum(Seconds, 8);

    HCMAX7219.Refresh(); 
    delay(1000);
  }
}


void Disp2DigNum(int Number, byte Pos)
{
  if(Number < 10)
  {
    HCMAX7219.print7Seg((long)0, Pos);
    HCMAX7219.print7Seg(Number, --Pos);
  }else
  {
    HCMAX7219.print7Seg(Number, Pos);
  }
}

_________________
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.


Tue Jul 19, 2016 9:22 am
Profile

Joined: Thu Apr 30, 2015 2:17 pm
Posts: 1
Post Re: MAX7219 8 Digit Seven Segment Display Module (HCMODU0082
I have used 9 of these succesfully with the library and an Uno, the following may help if anyone is considering this to avoid spurious characters and inconsistencies which cause me a few headaches;

Do not daisy chain the Vcc and earth lines futher than 2 modules - supply power to both sides of each module.
Use a capacitor (I used 1000ufd) to decouple power near the chain.
Be aware of the current required >1.5A depending on what is displayed - this needs to be from an external supply not the Uno.
Set the number of drives in the header file - note drive 1 will be the last in the chain.

Other than that these work really well with no flicker during update and a very consistent display :-), thanks again for good quality components and a nice library.


Tue Jun 13, 2017 9:31 am
Profile

Joined: Fri Jan 19, 2018 6:35 pm
Posts: 2
Post Re: MAX7219 8 Digit Seven Segment Display Module (HCMODU0082
I have 2 modules linked as a counter and rate meter but the second one shows glitches and then the first one crashes showing all 8s. Have tried capacitors but no improvement. Seems to work better when the parts and wires are spread out but I need it all in a small enclosure. Do they work with the nano as thinking of using one on each as one module seems fine.


Fri Jan 19, 2018 6:47 pm
Profile
Site Admin

Joined: Sun Aug 05, 2012 4:15 pm
Posts: 740
Post Re: MAX7219 8 Digit Seven Segment Display Module (HCMODU0082
It sounds like either the clock or data is getting corrupted for some reason. I'd check the wires and connection. Especially make sure the 5V and GND connections are good. Also if any of the wires are quite long this could cause a problem.

Quote:
Do they work with the nano as thinking of using one on each as one module seems fine.


Yes the Nano uses a ATMega328 just like the Uno so will function exactly the same.

_________________
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.


Mon Jan 22, 2018 9:37 am
Profile

Joined: Fri Jan 19, 2018 6:35 pm
Posts: 2
Post Re: MAX7219 8 Digit Seven Segment Display Module (HCMODU0082
Many thanks Andrew, I tried them again today on a different UNO and it worked fine so I plugged back into the original one and still OK so was probably a bad connection somewhere.


Mon Jan 22, 2018 1:39 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 15 posts ]  Go to page Previous  1, 2

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Thank you to phpBB.com & phpBB.ro.
Design created by Florea Cosmin Ionut.
© 2011 All contents of this site are © Hobby Components LTD