Pages: [1]   Go Down
Author Topic: MAxim 7219 digital clock  (Read 1034 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Quote
Serial.print(hour, DEC);
          if (hour<10){
      Serial.print("0");
    }
      led_print(hour, 2);
          Serial.print(minute, DEC);
          if (minute<10){
      Serial.print("0");
    }
    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.
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 208
Posts: 8854
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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"?
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Pages: [1]   Go Up
Jump to: