Go Down

Topic: MAxim 7219 digital clock (Read 2028 times) previous topic - next topic


Hey guys I am having a weird issue with this digital clock I am creating. I have written a loop for it to count by seconds and nested the loos to increment the minutes and hours. That is all working fine, the problem is that it counts in HEX till 15 then switches to DEC  after that. Just wonder if any one can see why it is doing this. The time is being out via the Maxim 7219 serial interface chip to control the four seven segments i am using.

Serial.print(hour, DEC);
          if (hour<10){
      led_print(hour, 2);
          Serial.print(minute, DEC);
          if (minute<10){
    led_print(minute, 0);
          lc.setDigit(0,2,hour,false);                // Print the hour
          lc.setDigit(0,0,minute,false);              // Now the minutes

Ant help is very much appreciated.


Where would one find the documentation (or source code) for the functions led_print() and lc.setDigit()?

Why do you Serial.print() the leading '0' AFTER you print the hour and minute?  Doesn't that make 8:07 come out as "8070"?
Send Bitcoin tips to: 1G2qoGwMRXx8az71DVP1E81jShxtbSh5Hp

Go Up