lcd problem


Closed Thread
Results 1 to 15 of 15

Thread: lcd problem

Hybrid View

  1. #1
    malc-c's Avatar
    malc-c Guest

    Default lcd problem

    I'm after some advice from those more experienced with LCD's than I !

    I'm in the process of taking a project off the EasyPIC5 development board and building the prototype on stripboard. My 20 x 4 LCD has been fitted with a female header which plugs directly onto the pins on the EasyPIC board, so to make life easy I've soldered wires to a set of male header pins so I can easily remove the LCD or stripboard if needed whilst I de-bug any errors in my layout. I've wired the LCD up as per the diagram below



    However all I get is a backlit LCD - not even rows of blocks when the device is powered up. I've tripple checked each wire to make sure it's going to the right pins on PORT B and checked the board to make sure there are no shorts / breaks (as far as I can see). My first thought was that the PIC isn't running, so connecting up a sensor caused an indication LED to flash as it should. I've also used an LED to check to see if any voltage is present on RB0 - RB5 and noted that some ports were pulsing the LED much the same way as the leds on the EasyPIC board did, so it would seem that the PIC is running OK. I've used a 10K trim pot, which seems to have no effect, but then if the LCD isn't drawing anything I guess there will be nothing to adjust. - If I place the LCD back in the EasyPIC board with no PIC I get two rows of blocks, but If I remove the PIC from the stripboard this isn't replicated.

    Any suggestions

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Default

    Hi, Malc

    IF it already worked on your EP5 ... ( ??? )

    @ first try to raise somewhat the delay DEFINES for the LCD ...

    Commandus @ 2500 and Dataus @ 100 ...

    should do the trick.

    IF NOT ...

    POST your code beginning ...

    Alain

    And trim VEE to .5 -.6 volts ...
    Last edited by Acetronics2; - 7th July 2010 at 12:58.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  3. #3
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    699


    Did you find this post helpful? Yes | No

    Default

    Malcolm,

    Double check the voltage on Vo (contrast adjustment). Go all the way from the minimum to the maximum on the potentiometer.

    Robert

  4. #4
    malc-c's Avatar
    malc-c Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by rsocor01 View Post
    Malcolm,

    Double check the voltage on Vo (contrast adjustment). Go all the way from the minimum to the maximum on the potentiometer.

    Robert
    Robert, thanks for the input - voltage range = 0.00 to 4.46v

  5. #5
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    966


    Did you find this post helpful? Yes | No

    Default

    Malcolm

    Please post the code you're using. I suspect the code is re-starting after printing the message.

    Jerson
    Last edited by Jerson; - 7th July 2010 at 15:24.

  6. #6
    malc-c's Avatar
    malc-c Guest


    Did you find this post helpful? Yes | No

    Default

    Personally I don't think it's the code - this has been running fine in the development board (see the 4ch thermostat post under the code section), and the PIC seems to be running OK when used on the stripboard as the LEDs indicate the PID routines work when the temperature detected by the probes are increased / decreased. My hunch is that it has to be something with the stripboard, I might try re-soldering the wires as it could be something as simple as a dry joint ?

  7. #7
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default

    Code:
    DEFINE LCD_LINES 4               ' number of lines on LCD
    Your define is for a 4 lines LCD while you are using a two lines display (as per picture in your post #1)

    Al.
    All progress began with an idea

  8. #8
    malc-c's Avatar
    malc-c Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by aratti View Post
    Code:
    DEFINE LCD_LINES 4               ' number of lines on LCD
    Your define is for a 4 lines LCD while you are using a two lines display (as per picture in your post #1)

    Al.
    Sorry, but misleading as that was taken from the EasyPIC manual, I'm actually using a 4 x 20 as stated in my 1st post.

  9. #9
    malc-c's Avatar
    malc-c Guest


    Did you find this post helpful? Yes | No

    Default

    Alain,

    Thanks for the reply. The PIC works fine in the EP5, and here's the start of the LCD config

    Code:
    DEFINE LCD_DREG  PORTB           ' LCD Data port
    DEFINE LCD_DBIT  0               ' starting Data bit (0 or 4)
    DEFINE LCD_EREG  PORTB           ' LCD Enable port
    DEFINE LCD_EBIT  5               '     Enable bit  (on EasyPIC 5 LCD)
    DEFINE LCD_RSREG PORTB           ' LCD Register Select port
    DEFINE LCD_RSBIT 4               '     Register Select bit   (on EasyPIC 5 LCD)
    DEFINE LCD_BITS  4               ' LCD bus size (4 or 8 bits)
    DEFINE LCD_LINES 4               ' number of lines on LCD
    DEFINE LCD_COMMANDUS 2000        ' Command delay time in us 
    DEFINE LCD_DATAUS 50             ' Data delay time in us
    I've checked the voltage on the trim pot and set it to 0.6v.

    I've also used an LED to check if anything is happening on the data lines (hope this makes sense)

    RB3 (D7) - slow pulsing (50:50)
    RB2 (D6) - slow pulsing (25:75 on /off)
    RB1 (D5) - slow pulsing (50:50)
    RB0 (D4) - quick pulse (25:75)

    RB5 (E) - nothing
    RB4 (RS) - on, but with a slight regular flicker

    I've scraped a blade between all tracks on the board, bur still no blocks appear on the lcd

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