problem with LCD


Closed Thread
Results 1 to 10 of 10
  1. #1
    Rhatidbwoy's Avatar
    Rhatidbwoy Guest

    Default problem with LCD

    Hello:

    I am working on this project that interest me and I am having problems with the LCD working. I have checked the voltages and all the connection at different points of this project.

    The chip I am using is the 16f628, the LCD is vishay lcd-020m004b. I have PICBasic programming my chip threw a EPic programmer and those work. My setup for the project board is a voltage regulator running off of a 9 volt battery powering the mcu. the mclr is powered by the 5 volts with the 4.7k resistor on the mclr pin (that is normal). the ground (Vss)is grounded, the power (Vdd) has 5 volts with a .1uf cap hooked to ground on it works fine also. The LCD has power going to it and ground also. I hooked it up to how the example program did in PICBasic and got nothing.

    LCD should be connected as follows:
    ' LCD PICmicro
    ' DB4 PortA.0
    ' DB5 PortA.1
    ' DB6 PortA.2
    ' DB7 PortA.3
    ' RS PortA.4 (add 4.7K pullup resistor to 5 volts)
    ' E PortB.3
    ' RW Ground
    ' Vdd 5 volts
    ' Vss Ground
    ' Vo 20K potentiometer (or ground)
    ' DB0-3 No connect

    I am wondering is there anything that I might have done wrong that I should look out for. A mistake that is common for rookies like myself and many others to follow.

  2. #2
    Join Date
    Mar 2005
    Location
    Iowa, USA
    Posts
    216


    Did you find this post helpful? Yes | No

    Post

    A quick look at the datasheet states "Built - in controller (KS 0066 or Equivalent)". Don't know if that is equivalent to the Hitachi 44780 controller (which the LCDOUT commands are intended for). Also... post your code, there may be something minor there that may be causing the problem. Are you getting any "black boxes"? Try adjusting the contrast as well.
    Last edited by rhino; - 6th October 2005 at 19:41.

  3. #3
    Join Date
    Dec 2003
    Location
    Wichita KS
    Posts
    511


    Did you find this post helpful? Yes | No

    Default

    a couple of things...

    1. no code to look at.
    2. Did you put a pause 500 to "power up" the LCD first?
    3. It is compatible LCD controller? (seems you found this info, check it out!)
    4. Are you writing to the LCD to fast? use the Default char spacing to slow it down.
    5. are you pins correctly connected to the LCD?
    6. Is your port assigned to all outputs for the LCD??? trisb=%00000000 ?

    Dwayne
    Ability to Fly:
    Hurling yourself towards the ground, and missing.

    Engineers that Contribute to flying:
    Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute

    Pilots that are Flying:
    Those who know their limitations, and respect the green side of the grass...

  4. #4
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Along with everything Rhino and Dwayne said.

    Did you set CMCON = 7 to disable the comparators on PORTA?
    <br>
    DT

  5. #5
    Rhatidbwoy's Avatar
    Rhatidbwoy Guest


    Did you find this post helpful? Yes | No

    Default

    Ok after relaxing and checking the whole LCD config on the lcd I found the problem. the contrast was not connected. the next step for anything is to get the program to write to the lcd. thanks for all the help. that really did help.

    The program is attached to this post. that is what I am working with. The pause times on them are for a 20mhz crystal. using that just to experiment.
    Attached Files Attached Files

  6. #6
    Rhatidbwoy's Avatar
    Rhatidbwoy Guest


    Did you find this post helpful? Yes | No

    Default

    The other problem that I am getting with my lcd is that I have nothing coming on the screen other than two black lines. I can not even get a blinker blinking. I can not get the blinker to move from one position to another. nothing.

  7. #7
    Join Date
    Dec 2003
    Location
    Wichita KS
    Posts
    511


    Did you find this post helpful? Yes | No

    Default

    Hello RHatid,

    R>>The other problem that I am getting with my lcd is that I have nothing coming on the screen other than two black lines. I can not even get a blinker blinking. I can not get the blinker to move from one position to another. nothing.<<

    This is contrast adjustment... Two black lines is better than nothing at all!.. Adjust your contrast to where these black lines are BARELY visible. That is a starting point.

    Dwayne
    Ability to Fly:
    Hurling yourself towards the ground, and missing.

    Engineers that Contribute to flying:
    Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute

    Pilots that are Flying:
    Those who know their limitations, and respect the green side of the grass...

  8. #8
    Rhatidbwoy's Avatar
    Rhatidbwoy Guest


    Did you find this post helpful? Yes | No

    Default

    Dwayne

    I will have to try and do that. That is some else that I can try. Thanks I will get back to you.

  9. #9
    Rhatidbwoy's Avatar
    Rhatidbwoy Guest


    Did you find this post helpful? Yes | No

    Default

    ok I tried the dimming and I got nothing. I even pause 500 at the beginning of initialization for the lcd and nothing. The funny part is that now on this 4x20 lcd screen only two lines light. the second and the fourth. What really am I to see when this thing really kicks off.

    the program that is attached is the last program that I am actualling trying to get to work. It worked before for someone else why not me right. Tried it and got nothing.

    could the crystal play a role to the problem
    Attached Files Attached Files
    Last edited by Rhatidbwoy; - 12th October 2005 at 19:22.

  10. #10
    Rhatidbwoy's Avatar
    Rhatidbwoy Guest


    Did you find this post helpful? Yes | No

    Default

    I got this to ask. When I write pause 15 does that mean I pause 15mS for a 4MHz crystal. What is the time constant for the 4MHz crystal. isn't it .25us. so that leave the program and the chip to produce a 15ms pause time.

    I am trying to figure out my problem and all that I am possed with is a timing issue. Why I bring this up is that even my LCD sample program does not work with the setup that I am running. I have attached the program(s) that I use as the sample.

Similar Threads

  1. LCD problem with 16F628
    By ngeronikolos in forum mel PIC BASIC Pro
    Replies: 25
    Last Post: - 19th September 2016, 08:28
  2. Newbie? Problem with LCD
    By lew247 in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 7th December 2009, 19:48
  3. LCD problem
    By Andre_Pretorius in forum General
    Replies: 8
    Last Post: - 27th January 2009, 15:47
  4. LCD Problem
    By karenhornby in forum General
    Replies: 3
    Last Post: - 19th June 2008, 11:43
  5. Need help with LCD number display.
    By Steve Matson in forum mel PIC BASIC
    Replies: 8
    Last Post: - 26th June 2007, 23:07

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