In SX Microcontrollers, SX/B Compiler and SX-Key Tool, tdg8934 wrote: As many of you know I I have added a 74HC165 to my 16x16 tricolored LED Matrix RTC circuit because there was only 3 I/O lines left on my SX52 and I needed at least 4 pushbuttons to set the date and time on this. However, as it stands at the moment I can increment and decrement a hex number on the display and even watch it scroll by while updating it. I'm not sure if I want to have it scroll while updating the time or date but for now it is ok. The problem I need help in understanding or need a solution to is as follows: If I start with a TIMESET = $34 variable declaration, the display routine keeps it in hex so that when incrementing the TIMESET variable it gets displayed as 34 35 36 37 38 39 3A 3B .... Currently I have tried JonnyMac's DEC2BCD routine and only get the last digit scrolled like 4 5 6 7 8 9 A B ... What do I have to do to get past this so that it gets incremented as 34 35 36 37 38 39 40 41 .. ? I looks like I need to increment a decimal (or maybe BCD) number but the display routine needs a hex number. I have attached my code for anyone to follow. Thanks. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=191288 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)