Read cursors position on LCD?


Closed Thread
Results 1 to 5 of 5
  1. #1
    lab310's Avatar
    lab310 Guest

    Default Read cursors position on LCD?

    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.

  2. #2
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    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?

  3. #3
    lab310's Avatar
    lab310 Guest


    Did you find this post helpful? Yes | No

    Default

    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 .

  4. #4
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    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?

  5. #5
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    762


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Melanie
    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,

    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 ...
    _______________________________________________



Similar Threads

  1. Cleaning up code
    By Tobias in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 2nd December 2009, 07:14
  2. SEROUT WORD variable problem
    By Tobias in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 19th April 2009, 11:20
  3. PIC16F684 + LCD to use the 256bytes of EEPROM - HELP
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 7th March 2008, 14:19
  4. Need help with LCD number display.
    By Steve Matson in forum mel PIC BASIC
    Replies: 8
    Last Post: - 26th June 2007, 23:07
  5. LCD will not start
    By btaylor in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 24th May 2007, 02:30

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts