Confused on READ and DATA. Need a little help :)
I have been trying to conserve space in the SX28 chips and am trying to use the READ and DATA functions. I have looked at several examples and read how to use them in the SX/B help file but am still lost and cannot get my code to work right [noparse]:([/noparse]
Here is what I have :
The usage is showmenu menu_number.
The PUT Line1(idx) is the same as used in one of the examples in the SX/B help file.
When it displays it on the LCD, it shows part of one string on the wrong line and it even parts of another menu string. What am I doing wrong?
This is what I get with using showmenu 3
LCD Line1 : u 1 Menu 2 Menu
LCD Line2 : t for Menu1 Tex
Thanks for the help in advance!
Here is what I have :
showmenu: temp1 = __PARAM1 temp2 = temp1 FOR idx = 0 TO 15 READ Menu1 + temp1, temp3 INC temp1 PUT line1(idx), temp3 NEXT FOR idx = 0 TO 15 READ Menu2 + temp2, temp3 INC temp2 PUT line2(idx), temp3 NEXT UPDATE_L1 UPDATE_L2 RETURN ........ Menu1: DATA "Menu 1",0 DATA "Menu 2",0 DATA "Menu 3",0 DATA "Menu 4",0 Menu2: DATA "Text for Menu 1",0 DATA "Text for Menu 2",0 DATA "Text for Menu 3",0 DATA "Text for Menu 4",0
The usage is showmenu menu_number.
The PUT Line1(idx) is the same as used in one of the examples in the SX/B help file.
When it displays it on the LCD, it shows part of one string on the wrong line and it even parts of another menu string. What am I doing wrong?
This is what I get with using showmenu 3
LCD Line1 : u 1 Menu 2 Menu
LCD Line2 : t for Menu1 Tex
Thanks for the help in advance!
Comments
http://forums.parallax.com/showthread.php?p=771380
Check out his LCD_4_Menus.SXB attached later in the post.· What you need to do is to·present the correct "offset" which·in his prog is·the data field named "LineOffset"·.· Look over this post, especially the last few dialogues.
Kevin
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Bad spellers of the world untie!
Thanks!
Tim
Take a look at this stripped down program for LCD display also: