In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Zoot wrote: Yeah, what you said. You'll have other changes to make to have the code dump in your particular pattern, but here's the big change (aside from redrawing your chars in 8x8 maps :-) ) ' tmpW3 = tmpB1 * 5 ' calc character offset would be tmpW3 = tmpB1 * 8 ' calc character offset because you want 8 bytes per character. Then instead of reading and counting BITS like in your original program, just grab the bytes and shift each byte one a time... remember your main dumping "loop" is counting CHARACTERS... this is pseudo code just to illustrate the flow: [code] messagePntr = address 'point to data address of first character of text string ' now dump 8 CHARACTERS LOW CS ' get shift registers ready FOR char = 0 TO 7 READ --> from messagePntr+char into tmpByte1 'get the char IF char = 0 (or other "end of message" delimiter) THEN YOU ARE DONE FOR outBytes = 0 TO 7 'now, you need to shift out 8 bytes of pixel map for this character --- 'each character map has 8 bytes, organized following ascii chart --- does not include offset for 0 or other error checking READ --> from (charMaps+char)*8 into tmpByte2 'great, now you've got the first row (or column as you prefer) of map data in tmpByte2 'process tmpByte2 for each pixel if you need RGB info, etc. SHIFTOUT tmpByte2 NEXT 'next row/col for this character NEXT 'next char in string HIGH CS 'latch the data!!!! [/code] Now, keep in mind the above dumps the entire 8 chars to display WITHOUT holding them in memory (which I don't think you'll be able to do). The SXB RoboBadge code DOES hold the display in a buffer, but it's much smaller. The above could be set to "scroll" by changing the start and end chars of the main loop and one more outside loop: [code] FOR start = 0 TO 7 end = start+7 'set "tail" of this sliding window messagePntr = address 'point to data address of first character of text string ' now dump 8 CHARACTERS LOW CS ' get shift registers ready FOR char = start TO end 'on second loop, start will be 1, end will be 8 READ --> from messagePntr+char into tmpByte1 'get the char IF char = 0 (or other "end of message" delimiter) THEN YOU ARE DONE FOR outBytes = 0 TO 7 'now, you need to shift out 8 bytes of pixel map for this character --- 'each character map has 8 bytes, organized following ascii chart --- does not include offset for 0 or other error checking READ --> from (charMaps+char)*8 into tmpByte2 'great, now you've got the first row (or column as you prefer) of map data in tmpByte2 'process tmpByte2 for each pixel if you need RGB info, etc. SHIFTOUT tmpByte2 NEXT 'next row/col for this character NEXT 'next char in string HIGH CS 'latch the data!!!! MS_DELAY 100 'delay between scroll "frames" NEXT [/code] ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=225777#m226357 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)