Go Down

Topic: MAxim 7219 digital clock (Read 1 time) previous topic - next topic

1000100

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.

johnwasser

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: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Go Up
 

Quick Reply

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Note: this post will not display until it's been approved by a moderator.
Name:
Email:

shortcuts: alt+s submit/post or alt+p preview