PDA

View Full Version : display lcd variable array Ascii



volcane
- 9th October 2005, 23:38
Hello!

If I want to writer the value of a variable one in ASCII on a display I write LCDOUT $$FE, 1, #var1 that is I precede with the # var1, if the same thing with an Array is wanted to be made as it could be made? sintax is LCDOUT $$FE, 1, str var\08 if I put # before var the compiler gives me error.

DynamoBen
- 10th October 2005, 14:10
I don't know that there is a short hand way to do that. In the past I have either made the string ASCII via addition or written one byte at a time to the lcd.

BTW I tend to use DEC variable in place of # variable.

volcane
- 10th October 2005, 20:01
I don't know that there is a short hand way to do that. In the past I have either made the string ASCII via addition or written one byte at a time to the lcd.

BTW I tend to use DEC variable in place of # variable.

not there are other solutions?

DynamoBen
- 10th October 2005, 20:24
Do this....it works great.

For idx = 0 to 7
LCDOUT $FE, 1, #var[idx]
next idx

sean-h
- 10th October 2005, 20:28
lcdtest var byte[3]

lcdtest(0)="1" 'ASCII value for 1
lcdtest(1)=$32 'HEX value for 2
lcdtest(2)=51 'DEC value for 3

'Cear Display and Output to line 1
LCDOUT $FE,1,str lcdtest\3

Will display 123 on LCD.

Regards

Sean.

volcane
- 13th October 2005, 06:58
Thanks to all however I have resolved using the commando lookup

volcane
- 17th October 2005, 01:02
lcdtest var byte[3]

lcdtest(0)="1" 'ASCII value for 1
lcdtest(1)=$32 'HEX value for 2
lcdtest(2)=51 'DEC value for 3

'Cear Display and Output to line 1
LCDOUT $FE,1,str lcdtest\3

Will display 123 on LCD.

Regards

Sean.

hello!

which it is the difference between:

I2CREAD SDA,SCL,pag1,0,[str password\4]
LCDOUT $FE,1,str password\4

it is

for ind_ep = 0 to 3
I2CREAD SDA,SCL,pag1,ind_ep,[password[ind_ep]]
pause 20
next ind_ep
LCDOUT $FE,1,str password\4

DynamoBen
- 17th October 2005, 01:06
You don't need to pause when reading an I2C buss. You only really need a pause when writing to it.

Both examples are functionally the same. The first one is much easier to ready.

Nitro
- 2nd November 2005, 21:36
couldnt you just say
lcdout "var="
?????