LCD and 16F88


Closed Thread
Results 1 to 19 of 19

Thread: LCD and 16F88

Hybrid View

  1. #1
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    or the LCD R/W pin is left floating or set to high. In your first code example you said
    Code:
    Low PORTA.4 ' LCD R/W line low (W)
    As A.4 is actually the LCD RS bit, it can't work.. or i miss something?

    BTW, i've tested it here, with your current setting, and it's working.
    Code:
            DEFINE LOADER_USED 1
    
            Define LCD_DREG PORTA
            Define LCD_DBIT 0
            Define LCD_RSREG PORTA
            Define LCD_RSBIT 4
            Define LCD_EREG PORTB
            Define LCD_EBIT 3
            Define LCD_BITS 4
            Define LCD_LINES 2
            Define LCD_COMMANDUS 2000
            DEFINE LCD_DATAUS 50
            
            CMCON = 7       ' disable analog comparator
            ANSEL = 0       ' disable ADCs
            Pause 500       ' LCD start up delay
    
            Lcdout $fe, 1, "LCD Test"
    
    Here:   goto here       ' spin here forever
    Last edited by mister_e; - 4th February 2007 at 18:49.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  2. #2
    Join Date
    May 2006
    Location
    MI
    Posts
    33


    Did you find this post helpful? Yes | No

    Default

    Hi All
    I'm happy to say my LCD is up and running. I'm impressed by the number of
    quick responses to my question.

    Thanks to all for the replies and tips. You guys are great.
    Gordon

  3. #3
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    You're welcome!

    You guys are great.
    Yeah we know

    Just to satisfy my own curiosity... what was the problem???
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  4. #4
    Join Date
    May 2006
    Location
    MI
    Posts
    33


    Did you find this post helpful? Yes | No

    Default

    The problem was a couple of issues. The port wasn't set to digtal (ANSEL),
    Another was the pull-up resistor was omitted. I checked the data sheet
    to make sure the CMCON was turned off, but somehow didn't realize the
    ANSEL register needed to be set to 0. Bet I wont forget about this register
    in the furture.

    Thanks again all.
    Gordon

  5. #5
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Just to set the record. For this device and by the datasheet, PORTA.4 is not an open drain as some suggested. It's really a full CMOS output pin. So you don't even need the pull-up resistor.

    But YES, you have to disable the internal analog comparators and ADCs.

    Bet I wont forget about this register
    Learning opportunity
    Last edited by mister_e; - 4th February 2007 at 19:58.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  6. #6
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Talking For the record

    Quote Originally Posted by mister_e View Post
    Just to set the record. For this device and by the datasheet, PORTA.4 is not an open drain as some suggested. It's really a full CMOS output pin. So you don't even need the pull-up resistor.

    But YES, you have to disable the internal analog comparators and ADCs.


    Learning opportunity
    For the record, I checked the data sheet before telling him to put in ANSEL and is why I did not say to use pullup, and for the record I was surprised it did not need one.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  7. #7
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    For the record , i was refering to post #7

    But i have to agree, many pin have an open-drain output on this pin.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. LCD and HSEROUT do not mix well ?
    By Johan in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 17th November 2008, 16:38
  2. 16f88 to parallax 2x16 lcd
    By rdxbam in forum General
    Replies: 10
    Last Post: - 9th November 2008, 21:19
  3. 16f88 can't get lcd to work
    By nicjo in forum General
    Replies: 12
    Last Post: - 13th December 2006, 02:20
  4. Can't get LCD to work with 16F88
    By jswayze in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 10th September 2004, 11:05
  5. 4 line LCD with 16F88
    By anj in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 7th February 2004, 09:06

Members who have read this thread : 0

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