I mean, I want to send one byte into 1st line of 1st char, then send 1 byte into 1st line of 2nd char and so on.
I mean, I want to send one byte into 1st line of 1st char, then send 1 byte into 1st line of 2nd char and so on.
So say this code:
Will send $12 to 1st line of 1st char and $15 to 1st line of 2nd char, but if I call the LCDOUT $FE, $40, $12 again, it will be written into 2nd line of 1st char, right?Code:LCDOUT $FE, $40,$12 LCDOUT $FE, $48,$15
I'm sorry but your comments doesn't make any sense to me. I don't understand what it is you're actually asking or trying to do. Either I'm stupid or you don't make a very good job of explaining yourself - it's probably the former....
First you said you DON'T want to put characters on the screen with LCDOUT and now you're talking about first character on line 1 and line 2. Writing to CGRAM won't put characters anywhere on the screen, it will however update any instances OF the character no matter WHERE on the screen they are.
Then you say you want a delay, which you can just do with a PAUSE within the FOR-NEXT loop.
Code:LCDOUT $FE, $40,$12 ' Write $12 to CGRAM 0 LCDOUT $FE, $48,$15 ' Write $15 to CGRAM 8 LCDOUT $FE, $40,$12 ' Write $12 to CGRAM 0 (again) LCDOUT $13,$14,$15 ' Write $13, $14, $15 to CGRAM 1, 2, 3 (because the previous command wrote to location 0) LCDOUT $FE, $49, $16, ' Write $16 to CGRAM location 9Code:LCDOUT $FE, $40+A ' This will set the adress pointer to CGRAM location 0+A For i = 0 to 7 LCDOUT Graph[i] ' Send a byte to CGRAM location 0+A+i PAUSE 100 NEXT
Yes, I know how CGRAM character works.
I asked two questions:
1. Can I any time access any CGRAM address?
2. Can I use variable for accessing that address?
what have you tried ?
what did it do ?
what do actually want it to do differently ?
or is it that you have you copied this code from somewhere
and need help to convert it to pbpCode:DIM GRAPH(8) 'define array with 8 lines GRAPH(1)=$FE GRAPH(2)=$CO ' and so on, example of data in array For A=0 to 7 ' loop till 8 LCDOUT $FE, $40+A, GRAPH(A) - write bytes to LCD memory NEXT A
Warning I'm not a teacher
I don't mean to sound harsh but like Richard says, have you tried to use any CGRAM adress at any time or use a variable when setting CGRAM adress?
1. Can I any time access any CGRAM address?
Yes, of course you can, just send the command for setting the adresspointer to whatever location you want.
2. Can I use variable for accessing that address?
Yes, of course tou can, just send the command for setting the adresspointer to whatever location you want. (That location being held in a variable or in the result of calculation, like in the example).
Just try it for crying out loud :-) 10 minutes of writing some testcode would provide you with the answers you've been looking for for two days now :-)
/Henrik.
I do not have access to hardware on weekends, so I prefer to solve theoretic ussies on weekend, to deal with them in hardware next week![]()
Bookmarks