Is it possible to find current cursor possition on LCD (standard Hitachi controller) ? After reading LCD data sheet , couldnt find any address that holds cursors pos. , but maybe I'm wrong.
Is it possible to find current cursor possition on LCD (standard Hitachi controller) ? After reading LCD data sheet , couldnt find any address that holds cursors pos. , but maybe I'm wrong.
Yes, the operation is called "Read Busy Flag and Address".
You need connection of the R/W line.
Set R/W=1 (usually set 0), set RS=0, Busy Flag is returned in DB7, Address Counter is returned in DB0 thru DB6. There is no equivallent PICBasic instruction. LCDIN sets R/W=1 and RS=1. Close, but no cigar. LCDIn and LCDOut don't check the Busy Flag, they just use blind timing.
I normally have the PIC keep track of the Cursors position - LCD's aren't that big, so how hard is it to lose your Cursor?
Yes , found that info too, but I'm using 4-bit connection to LCD so this won't work. No one mentions if this is possible when using 4bit instead of 8.
I have complex manu map, and could to some things much easier if I knew possition of cursor .
Well.... you could try connecting the R/W line, assign a 2nd pin to the RS bit, put it and the existing RS pin line thru an AND gate (two Diodes and a Resistor would suffice) to the LCD, drive the new RS bit pin Low (forcing LCD RS Low) and then issue an LCDIN instruction... Do you feel lucky?
Lab,Originally Posted by Melanie
do you really want to pay this price?
As Melanie already said, it is the PIC controlling the LCD, so how can you loose the cursor position?
regards
Ralph
_______________________________________________
There are only 10 types of people:
Those who understand binary, and those who don't ...
_______________________________________________
Bookmarks