it's more a matter of how the data is sent. You may try to change b5 to #b5 in SERIN line.
doesn't work? comment out the SERIN line and use b5=3, it should display 3 on your 7 segment... right?
it's more a matter of how the data is sent. You may try to change b5 to #b5 in SERIN line.
doesn't work? comment out the SERIN line and use b5=3, it should display 3 on your 7 segment... right?
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
hi Steve,
I was trying with #b5 and display light allways 8 (all pins are low). The simple loop program, working ok and count normaly from 0 to 9
here is a this sample1 (B5 count on LED display 0-9)
start: for B5=0 to 9
lookup2 B5,[238,130,220,214,178,118,126,194,254,246,108],B1
pause 500
portb=b1
next B5
goto start
sample 2 Instead lookup2 command have lcdout command. (working ok. B5 count 0 to 9 on LCD)
start: serin SDA,0,b2,b3,b4,b5
lcdout $fe,1,$80,#b5
pause 100
goto start
sample 3. this sample show allways 0 on display. (B5 read lookup2 command and show 0 allways)
dp var portb.0
c var portb.1
d var portb.2
e var portb.3
g var portb.4
f var portb.5
a var portb.6
b var portb.7
SDA VAR PORTA.3 'pin2
b0 var byte
b1 var byte
b2 var byte
b3 var byte
b4 var byte
b5 var byte
trisb = %00000000
start: serin SDA,0,b2,b3,b4,b5
lookup2 B5,[238,130,220,214,178,118,126,194,254,246,108],B1
portb=b1
goto start
i was changed LOOKUP2 with LOOKUP and LED showing 8
I have not anymore ideas
regards
Sam
Last edited by select; - 21st November 2007 at 10:54.
hi again,
How read ASCII value from lookup command?
regards,
Sam
Last edited by select; - 21st November 2007 at 10:58.
How do you send the number to be displayed? By Hyperterminal for example and pressing the key '0'?
Ioannis
i'll repeat what i told in previous post...
Code:start: serin SDA,0,b2,b3,b4,#b5 lookup2 B5,[238,130,220,214,178,118,126,194,254,246,108],B1 portb=b1 goto start
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks