In SX Microcontrollers, SX/B Compiler and SX-Key Tool, tdg8934 wrote: Perhaps to cut to the chase and see what I am looking for is in the following: [code]: : StringWriter: For I = 0 to 255 IF tmpB1 = 0 THEN 'DataChr = ??????? Read String_Data + I, DataChr ELSE Read String_Data2 + I, DataChr ENDIF : As you can see the Variable DataChr is being populated with Bytes coming from a DATA statement as seen below: [code] DataChr Var Byte ' Here are the DATA statements that can be used to scroll across the 16x16 LED matrix String_Data: Data " 11:59:50 AM 12/31/07 Monday ",0 String_Data2: Data " More scrolling here ",0 This part of the program is working correctly and it scrolls the message across the 16x16 LED matrix display. HOWEVER - Here is what I want to be able to do....... In another part of the program exists DS1302 Real Time Clock code that is working and sends time and date information out to a 2x16 Parallax Serial LCD. But....Instead of sending these time and date bytes to a LCD, I want them to be fed into a DATA statement so that the DataChr variable can READ it. If this is not possible then I want to find a way to take the Time and Date data and put it into a format that the scrolling routine can use (maybe an array instead of a READ / DATA statement - it doesn't really mater what format this is in as long as it works). The core of the LCD writing routines are from these subroutines: TimeDate(Secs) = $50 TimeDate(Mins) = $59 TimeDate(Hrs) = $11 TimeDate(Date) = $31 TimeDate(Month) = $12 TimeDate(Day) = $01 TimeDate(Year) = $07 TimeDate(Ctrl) = $00 SendByte $82 ' set LCD cursor to first line, 4th character in (for time) WriteDataToDisplay TimeDate(Hrs),":" WriteDataToDisplay TimeDate(Mins),":" WriteDataToDisplay TimeDate(Secs),$20 WriteDataToDisplay: temp3=__PARAM1 temp4=__PARAM2 FOR Idx=0 to 1 ClockDisplay=temp3 IF Idx=0 THEN SWAP ClockDisplay ENDIF ClockDisplay=ClockDisplay & $0f ClockDisplay=ClockDisplay | $30 SendByte ClockDisplay NEXT SendByte temp4 RETURN[/code] [/code] SendByte: temp1 = __PARAM1 ' save the byte IF __PARAMCNT = 2 THEN ' "count" specified? temp2 = __PARAM2 ' yes, save ELSE temp2 = 1 ' no, set to 1 ENDIF DO WHILE temp2 > 0 SEROUT DISPLAYComPort, DisplayBaud, temp1 ' transmit DEC temp2 LOOP RETURN If anyone can see a simple solution to take this time and date data bytes and be able to bring them into the LED scrolling message subroutine...I would be very interested and gratefull. Thanks again to all that can help me figure this out. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=183305#m183434 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)