+ Post New Thread
Results 1 to 9 of 9
  1. #1
    Member level 1
    Points: 654, Level: 5

    Join Date
    May 2012
    Posts
    34
    Helped
    2 / 2
    Points
    654
    Level
    5

    Repairing character LCD

    When I power this device using first 3 pins ( Vss=GND, Vdd=+5V, Vo=GND) I do not have "bars" (restangles 5x8 in line.. ... in one or more lines). On another hand, all other character LCDs I have here has regular bars when "powered" this way.

    Another problem when I put this LCD in circuit - it has nothing at start, then it starts up with "bars" but not consistent in light intensity between cells and trembling, and then at the end, when some commands are send from mcu (program executed) I have regular "bars" with same light intensity on LCD but nothing else. Just stacked with "bars" there.

    Now, I am wondering if there is any instructions how to check if all pins are OK while powered off - disconnected?

    Is there any characteristics regarding resistance, capacitance or anything else on LCD's pins and between which pins?

    Is there any differences in those values between 16x2, 20x4, 40x4 models?

  2. #2
    Super Moderator
    Points: 81,448, Level: 69
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    13,351
    Helped
    4459 / 4459
    Points
    81,448
    Level
    69

    Re: Repairing character LCD

    Almost all displays with up to 20 characters and up to 4 lines use the same controller IC, the HD44780 or an equivalent from a different manufacturer. There is nothing in the specification that says what the display will show until the IC has been initialized so just powering it up is inconclusive. You really have to test it in a known working circuit, measuring anything across the supply pins with it powered down will not tell you if it is faulty or not. If it is randomly flickering it does suggest the controller IC is faulty though.

    Brian.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.


    1 members found this post helpful.

    •   AltAdvertisement

        
       

  3. #3
    Member level 1
    Points: 654, Level: 5

    Join Date
    May 2012
    Posts
    34
    Helped
    2 / 2
    Points
    654
    Level
    5

    Re: Repairing character LCD

    Actually it is HD44780U based controller which are almost the same, except that "U" version is a little bit faster in communication between mcu-LCD (and of course can communicate at lower speed as old HD44780 version). But, if I am right in this, I don't see it relevant U or not-U version, so I didn't mentioned it.

    Flickering:

    - it goes while initializing LCD (something like it lacks from power to bring enough light on all cells at ones) but it became steady after a while
    and
    - while mcu trying to write something on the screen (at the beginning of the code I have clear command, but it doesn't clear the screen at all OR it clears with huge speed and brings back the bars again so I cannot see it. So, bars are always here and during program execution when it tries to write some letters on the screen it writes it OVER bars and it changes fast, looks like garbage...and so on).



    •   AltAdvertisement

        
       

  4. #4
    Super Moderator
    Points: 81,448, Level: 69
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    13,351
    Helped
    4459 / 4459
    Points
    81,448
    Level
    69

    Re: Repairing character LCD

    Can you try a different module in your project to check you are drivng it correctly? They are very critical of the timing you use to initialize them.

    I'm afraid it sounds like the HD44780U is faulty though.

    Brian.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.



    •   AltAdvertisement

        
       

  5. #5
    Member level 1
    Points: 654, Level: 5

    Join Date
    May 2012
    Posts
    34
    Helped
    2 / 2
    Points
    654
    Level
    5

    Re: Repairing character LCD

    Hello,
    The problematic module is Powertip PC2004A B LCD 20x4. It was used in pc-based setup while it was working. I cannot make any tests there.

    At the moment, I do not have another module - ordered and waiting for now and trying to do something with this one.

    Regarding timing - yes, that is why I do not trying to develop my code (lot of preparation reading, time...and how to be sure that is wrong code and not wrong LCD?) and have found few of them on Internet that many people saying that it works for them. One of those setups/codes that works, I have found on Internet, use mcu I have spare (PIC16F887) and with literary the same LCD (Powertip PC2004A) - I can post a link if it is allowed by Eda's rules. I do not want copy/paste part of it, i.e. code since it is not written by me. In that forum/posts there is one of successful users with Powertip PC2004A confirming that it works for that LCD. That specific user had only problem with the contrast that he resolved.

    Then, I have made my own setup on breadboard and I have compiled source and load .hex file to mcu. After reseting mcu ....not working. After that, I was suspicious about that .hex file and made a simulation in simulation software (same setup as on breadboard) and it worked perfectly. I can post simulation here as well.

    So, that hardware setup and code works in simulation and to other people in practice - I have concluded that problem is related to hardware of this specific LCD. (Hope that my breadboard wiring is okay).

    Reason asking about resistance and capacitance of the pins - if you recall my comment on "flickering" like it has no power to bring enough light to cells and after that , during working period, cannot clear screen and/or write characters on screen - I have thought if it possible that LCD has some current leakage to the GND or it has some huge capacity, from somewhere, that cannot be loaded initially in reasonable time and during writing text on screen it do not discharge fast to refresh cells.... Sorry, if I have gone to far with my thoughts but ... :))



  6. #6
    Super Moderator
    Points: 81,448, Level: 69
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    13,351
    Helped
    4459 / 4459
    Points
    81,448
    Level
    69

    Re: Repairing character LCD

    The pixels on the LCD are triplexed, it's a fairly complicated way of driving them with in phase or out of phase signals. All the pixels are connected to the HD44780U, no part of the display itself is wired to any of the module pins. If parts are flickering it means the drive signals from the HD44780U are incorrect. The module pins are connected to the input side of the controller to tell it what to do but there is no command to make it flicker, only some basic cursor control, and instructions to display characters stored in it's internal font. If it is displaying something else, it almost certainly means the controller is sending out wrong signals.

    Please post the code, you can attach it as a file or copy/paste it in to the message box. If you paste it, please highlight it all with your mouse then click on the # icon above the message window so the forum doesnt remove all the formatting. Unless you have simulated it in MPLAB or Wiz-C there is nothing I can use here, I do not use other simulators so the file would be no use.

    Brian.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.



  7. #7
    Member level 1
    Points: 654, Level: 5

    Join Date
    May 2012
    Posts
    34
    Helped
    2 / 2
    Points
    654
    Level
    5

    Re: Repairing character LCD

    Hello !

    Thank you on your reply.

    Here is the code and if I paste it, as code in the post, scrolling down would be difficult. The code is not mine (I have found it on CCS forum. Author: PCM programmer) it is modified driver for 16x2 that comes with CCS compiler.

    test.c.txt - test program (just remove .txt extension)
    Flex_LCD420.c.txt - driver (just remove .txt extension)

    Btw, I have made simulation in Proteus.

    Regards,
    Knut

    [edit] My testing setup was - PIC16F887 with reset circuit on MCLR pin, and 4MHz oscillator. Additionally I had to make ICSP connection for loading hex file to PIC. In above files you will find which pins are used for connecting LCD.



    •   AltAdvertisement

        
       

  8. #8
    Member level 1
    Points: 654, Level: 5

    Join Date
    May 2012
    Posts
    34
    Helped
    2 / 2
    Points
    654
    Level
    5

    Re: Repairing character LCD

    @Brian,

    Have you previewed the code? Is there any drawbacks regarding timings issue?

    Thank you.
    Knut



  9. #9
    Super Moderator
    Points: 81,448, Level: 69
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    13,351
    Helped
    4459 / 4459
    Points
    81,448
    Level
    69

    Re: Repairing character LCD

    Sorry for the delay. I can't see anything obviously wrong with the code although there must be some additional data, possibly in a header file to define the LCD type, initialization bytes and whether you use the RW pin. You must have it somewhere or the code would not compile. I do not have the CCS compiler to check it but I think it should work and the delays are deliberately set to be slightly longer than needed so apart from a minor performance hit, they should be OK.

    Brian.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.



--[[ ]]--