lcd problem


Closed Thread
Results 1 to 15 of 15

Thread: lcd problem

  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,615


    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
    644


    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

    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

  5. #5
    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

  6. #6
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    947


    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.

  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

    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 ?

  9. #9
    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.

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by malc-c View Post
    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 ?
    Uhmm... well I just belled out each wire pin fo pin and it all checks out.

  11. #11
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    947


    Did you find this post helpful? Yes | No

    Default

    Could be even simpler - decoupling caps 0.1uF? since you mentioned using strip board

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


    Did you find this post helpful? Yes | No

    Default

    Yep, have one fitted across the supply lines next to the pic - might put a few more in

    I've just breadboarded the pic (pic, xtal, caps and the lcd) and it's running fine... must be a fault somewhere on the board...

    Thanks guys for all your inputs

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


    Did you find this post helpful? Yes | No

    Default

    Try allowing D0 : D3 to float without grounding them and ground pin 3 of the LCD instead of the pot(I always do this).
    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.

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


    Did you find this post helpful? Yes | No

    Default Re-make of board

    We'll I couldn't work out what the actual fault was so I started again with a fresh stripboard, and this time built the board up as I went rather than try and plan it out first. Net result is that the LCD is displaying the data as it did when on the EasyPIC5 board.

    However......
    I'm now having strange issues with the DS18B20 sensors. The code (listed in the code section under 4ch Thermostat) should show NC if there is no sensor connected, but ch3 shows up as 655.4c... If I connect is sensor to Ch3 it correctly reads the right temperature, but then Ch2 displays 655.4c... but if both have sensors connected both read correctly. Ch1 and Ch4 work perfectly. I've checked the board, replaced the resistors between the data and +ve, even re-made the links between the PIC and the sensor input.

    I'm testing the board by hooking it up to the Expansion port on the EP5, and have decoupling caps across the supply lines.

    Any suggestions.... at least I've made some progress over the 1st prototype

    Oh... and is there any difference in addressing the NXP PCF8583 RTC and the Maxim DS1307 RTC ? - I used the DS1307 module when developing the code, but the shop supplied this

    which is based on the NXP chip. - The clock can be read, but it doesn't update (shows 10:10 all the time)

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by malc-c View Post
    I'm now having strange issues with the DS18B20 sensors. The code (listed in the code section under 4ch Thermostat) should show NC if there is no sensor connected, but ch3 shows up as 655.4c... If I connect is sensor to Ch3 it correctly reads the right temperature, but then Ch2 displays 655.4c... but if both have sensors connected both read correctly. Ch1 and Ch4 work perfectly. I've checked the board, replaced the resistors between the data and +ve, even re-made the links between the PIC and the sensor input.

    I'm testing the board by hooking it up to the Expansion port on the EP5, and have decoupling caps across the supply lines.

    Any suggestions.... at least I've made some progress over the 1st prototype
    Reprogrammed the pic as it did the same on the development board - Now working fine

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