In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Tinker wrote: I'm at a total loss, for some reason this chunk of code always returns the second digit on the LCD as 0. I'm sure its something obvious but it eludes me. Time(1) = 184 LCD_OUT LCDCR LCD_STR "Second" LCD_OUT LCDRt LCD_STR "Lane:" Place(1) = Place(1) + 48 LCD_OUT Place(1) LCD_OUT LCDRt temp1 = Time(1)/100 temp4 = __remainder temp2 = temp4/10 temp2 = __remainder/10 temp3 = __remainder temp1 = temp1 + 48 LCD_OUT temp1 'temp2 = temp2 + 48 temp2 = temp2 + "0" LCD_OUT temp2 temp3 = temp3 + 48 LCD_OUT temp3 This will display the BYTE variable "Time(1) as 104 instead of 184. What am I doing wrong? ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=285393 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2008 (http://www.dotNetBB.com)