guys i have tried everything that you told me...but it still the same....once the rx received data from tx and display it on LCD it will stop there and will not execute the other loop. do i need to change anything at tx?
guys i have tried everything that you told me...but it still the same....once the rx received data from tx and display it on LCD it will stop there and will not execute the other loop. do i need to change anything at tx?
Let's try to debug this...
Your code is running to here?
Then ends up hereCode:TEMP: 'SNIP LCDOUT $FE,$C0,dta(0),DTA(1),DTA(2),DTA(3),DTA(4),DTA(5),DTA(6),DTA(7),DTA(8),dta(9),dta(10),dta(11),dta(12),DTA(13),DTA(14),DTA(15) RETURN
Then when you get hereCode:main: 'ADD LED TO FLASH TO SEE IF IT IS HERE OR DISPLAY "AT MAIN" TO THE LCD if portB.1=1 then 'arrow down push = push+1 : goto selection : endif if portA.1=1 then 'arrow up push = push-1 : goto selection : endif pause 5000 goto main
I have a sneaky suspicion you will need to use >= in place of =Code:selection: "DISPLAY THE VALUE OF "push" TO THE LCD pause 200 if push=1 then screen1 if push=2 then screen2 if push=3 then screen3 if push=4 then screen4 if push=5 then screen5 if push=6 then screen6 if push=7 then screen7 if push=8 then screen8 if push=9 then push = 1 : goto screen1 : endif if push=0 then push = 8 : goto screen8 : endif goto main
Does that make sense?
Dave
Always wear safety glasses while programming.
Sorry to say but I have tested the menu selection on a simulator and if you change the pause to 50 it works fine (although I would have used a LOOKUP with BRANCHL), but leaving that aside, I suspect you have been naughty with your syntax - you define a word and then treat it like an array. A simple little test of:
dta = 513
dta1 = 514
extra1 = 515
extra2 =516
LCDOUT dec dta(0), " ", dec dta(1), " ", dec DTA(2), " ", dec dta(3), " "
gives this result:
513 514 515 516
indicating that
dta(0) = dta
dta(1) = the next defined variable etc
quite unpredicable results - you must define an array and reference it with "square brackets" or better still with the STR expression. Eg:
Buffer var byte[16]
HSERIN 1000, tsync, [str Buffer\5]
Peter
Last edited by FinchPJ; - 16th June 2010 at 14:10. Reason: spelling correction
Bookmarks