In SX Microcontrollers, SX/B Compiler and SX-Key Tool, tdg8934 wrote: Please reference this link: [url=http://forums.parallax.com/forums/default.aspx?f=7&m=354453]http://forums.parallax.com/forums/default.aspx?f=7&m=354453[/url] I have tried to incorporate a left scrolling routine based on some code that JonnyMac wrote for an 8x8 LED display. I can get it to work well if I include the actual name of the DATA label in the subroutine. But if I use something like tmpW1 it does not work. I have attached the updated code and summarized below. Please help me in what I am missing here. [code]DRAW_SCROLL_LEFT SUB 3 ' Scrolls left a 32 x 8 picture [code]DRAW_SCROLL_LEFT Picture1, 1 'Scrolls left data picture in Label "Picture1:" [code] SUB DRAW_SCROLL_LEFT tmpW1 = __WPARAM12 ' start of label cs = __PARAM3 FOR tmpB2 = 0 TO 64 STEP 2 tmpB3 = tmpB2 FOR addr = 0 TO 63 READINC [b]Picture1 +[/b] tmpB3, tmpB1 ' read picture data SENDDATA addr, tmpB1, cs NEXT addr DELAY_MS 50 NEXT tmpB2 ENDSUB [b]THIS DRAW ROUTINE BELOW WORKS AND DOES NOT USE THE ACTUAL LABEL NAME[/b] [b]' Use: e.g. DRAW Picture1, DispNo(1-4) [/b] [b]SUB DRAW tmpW1 = __WPARAM12 ' start of label cs = __PARAM3 FOR addr = 0 TO 63 READINC tmpW1, tmpB1 ' read picture data SENDDATA addr, tmpB1, cs NEXT addr ENDSUB[/b] Picture1: 'Picture1 Label (sideways picture) DATA %1111, %1111 DATA %1000, %0001 DATA %1000, %0001 DATA %1000, %0001 DATA %1000, %0001 DATA %1000, %0001 DATA %1000, %0001 DATA %1000, %0001 DATA %1000, %0001 DATA %1000, %0001 DATA %1000, %0001 DATA %1000, %0001 DATA %1000, %0001 DATA %1000, %0001 DATA %1000, %0001 DATA %1000, %0001 DATA %1000, %0001 DATA %1000, %0001 DATA %1000, %0001 DATA %1000, %0001 DATA %1000, %0001 DATA %1000, %0001 DATA %1000, %0001 DATA %1000, %0001 DATA %1000, %0001 DATA %1000, %0001 DATA %1000, %0001 DATA %1000, %0001 DATA %1000, %0001 DATA %1000, %0001 DATA %1000, %0001 DATA %1111, %1111 Pad1: DATA 0,0 DATA 0,0 DATA 0,0 DATA 0,0 DATA 0,0 DATA 0,0 DATA 0,0 DATA 0,0 DATA 0,0 DATA 0,0 DATA 0,0 DATA 0,0 DATA 0,0 DATA 0,0 DATA 0,0 DATA 0,0 DATA 0,0 DATA 0,0 DATA 0,0 DATA 0,0 DATA 0,0 DATA 0,0 DATA 0,0 DATA 0,0 DATA 0,0 DATA 0,0 DATA 0,0 DATA 0,0 DATA 0,0 DATA 0,0 DATA 0,0 DATA 0,0 [/code] ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=377424 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2009 (http://www.dotNetBB.com)