LCD Display not working - PIC heating...


Closed Thread
Results 1 to 33 of 33

Hybrid View

  1. #1
    Join Date
    Sep 2004
    Location
    Mentor, Ohio
    Posts
    352


    Did you find this post helpful? Yes | No

    Smile

    Hi again Flotul,

    "I highly appreciate your help and I won't make you waste your time anymore until I am sure about the display I use. I cannot believe it still doesn't work after all your suggestions."

    You are not wasting my time. I have been a troubleshooter for a long time and I enjoy challenges. That's why I'm here. AND I also learn from what we are doing here. I can't believe it's not working either so we should go back to square one.

    Do you even know if you are able to get a program into the PIC and that the PIC is even working?

    Disconnect the LCD completely and put a simple Switch/LED program into the PIC and see if it works. First put a program into one of the PORTA pins and if that works now you know your programmer is working and you can get PORTA to respond to activity. Then re-wire the PIC to get it to work with PORTB.

    Example:
    Hardware setup:
    Put a 10K pullup between PortA.0 and +5vdc
    Put a 10K pullup between PortB.0 and +5vdc
    Put a normally open switch between ground and PortA.0
    Put an LED between PortA.1 and a 470 ohm resistor to ground (remember
    the LED is polarity sensitive so plus side to PortA.1)
    Make sure you have a 4.7K or 1K resistor between MCLR and +5vdc

    Software setup:
    TRISA = %00000001 'All pins on PortA are outputs except PortA.0
    PortA = 0
    TRISB = %00000001 'All pins on PortB are outputs except PortB.0
    PortB = 0

    SwitchA var PortA.0
    LEDA var PortA.1
    SwitchB var PortB.0
    LEDB var PortB.1

    Start:
    If SwitchA = 0 then LEDA = 1
    LEDA = 0
    Pause 1000

    If SwitchB = 0 then LEDB = 1
    LEDB = 0
    Pause 1000
    goto Start

    This little program will cause the LEDA to lightup only if SwitchA is pressed.

    If this works then disconnect the switch wire from PortA.0 and put it on PortB.0, then disconnect the LED/Resistor from PortA.1 and put it on PortB.1.
    Retest the program.

    If this little test setup doesn't work on either port then perhaps your problem is in your programmer. You'll have to check it out then.

    I use commercially produced programmers, MELabs USB programmer and their EPIC parallel port programmeralong with their software and Microcode Studio IDE. There's nothing wrong with making your own but by buying a commercial product you get their support.

    Perhaps you could post the code you were using so we can see if there's a problem there also.

    I was looking back at my collection of notes from this site and found other people that have gone through the same problem. That's why I think we need to go back to square one and start troubleshooting the basics. Let me know!

    HTH,

    BobK

    I just got to thinking about something Mister E has brought up alot. If you are using a breadboard where you just plug things into the little holes then you could possibly have a problem with the crystal and its capacitors. Sometimes the contacts on the breadboard put too much of a load on the crystal so try removing the capacitors. Thanks Mister E!!
    Last edited by BobK; - 14th September 2006 at 11:45.

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


    Did you find this post helpful? Yes | No

    Default

    The crystal stuff is true for high value on some breadboard and on some circumstances. Wires must be keep short between crystal and PIC. Crystal pins must be as short as possible, capacitor too. On breadboard i usually use ceramic resonnator with built-in caps. In this case Flotulopex use the internal OSC so it's not the main cause.

    If the PIC heat.. it's probably because he's burn, died, Kaput. I would try to remove all extra hardware attach to, check the Vd/Vss wiring (maybe it's reverted) and see if it's still heat. If not, do a led blink on all i/o to be sure every i/o are still working.

    Maybe the config fuses are bad, maybe the LCD need special timing/start up delay. LCD_COMMANDUS, LCD_DATAUS could help.

    When you do ICSP, PGM pin should be pulled low to prevent interference caused by the high voltage on MCLR pin. Place a 1-10K resistor between this pin and GND. Also, have a look bellow
    http://www.melabs.com/support/icsp.htm

    Once you have program your PIC, you MUST remove at least, the MCLR/Vpp wire from your board as the programmer hold the pin to GND at the end of the process. a While back i did a ICSP switch box like...
    <img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=163&d=1104851398">

    It's pretty handy!

    Be sure the Low Voltage Programming mode is disable in your config fuses. Try
    Code:
        '
        '    Pic Configuration
        '    =================
        '    Program Configuration Register 1
        @	__CONFIG    _CONFIG1, _CP_OFF & _CCP1_RB0 & _DEBUG_OFF & _WRT_PROTECT_OFF & _CPD_OFF & _LVP_OFF & _BODEN_ON & _MCLR_ON & _PWRTE_ON & _WDT_ON & _INTRC_IO		    		 
    
        '    Program Configuration Register 2
        @   __CONFIG    _CONFIG2, _IESO_OFF & _FCMEN_OFF
    Also allow the internal OSC to settle (stabilise). Give a 50mSec (or more) delay at the top may help.
    Last edited by mister_e; - 14th September 2006 at 14:52.
    Steve

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

  3. #3
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    938


    Did you find this post helpful? Yes | No

    Default

    Hi BobK,

    I have the same kind of approach as you have. When nothing works = restart from scratch step by step.

    Now, to your suggestions, here are my answers:
    - Yes, I can easely program all my PICs without any trouble. That's the reason why I built different programmers before I really started programming.

    - Yes, I have checked my PICs ( I have 16F84A, 16F88 and 12F675 - actually I'm working with the 16F88) almost as you suggest and everything is fine; the PICs are all okay.

    - My code is is the 1st post of this thread and I corrected it according to your informations (DEFINES).

    - Mister_e is right; the breadboard my be a source of contact problems and this is why I have made test on my second breadboard too (the BasicStamp Pro Developpement Board).

    - Yes, I disconnect MCLR, DATA and CLOCK wires after programming the PIC (see a previous post).

    - I use the internal oscillator on pic 16F88 (no external crystal or resonator).

    - The fuses look to be set correctly; LPV is disabled.

    - In my code, I have made a 1 second pause to let the PIC and the LCD stabilise (may not be mandatory but I thought it would be better so).

    Mister_e, your schematic is great. Is your "Program/Run" switch automated (kind of monitoring the signal on MCLR)?

    I'm still in the office now and should have a new display waiting for me in my mailbox. I'll give you an update asap. Please wait until I have connected my knew display... I'm confused to see you working on lots of possibilities and me not able to provide reliable informations.
    Roger

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


    Did you find this post helpful? Yes | No

    Default

    Mister_e, your schematic is great. Is your "Program/Run" switch automated (kind of monitoring the signal on MCLR)?
    Hehe funny that you talk about that. Few days ago, i did an automated version to do the switching with a VB application. When the focus is set to the device programer software, the ICSP interface switch to the Program mode, when i close or return to the code editor it goes to the Run Mode. it's on testing.. pretty good as now
    Steve

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

  5. #5
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    938


    Did you find this post helpful? Yes | No

    Default

    Finally

    !!! IT WORKS !!!

    I got my new display and connected it to my 16F88. Nothing :-(

    I changed to my 16F84A and now it is okay.

    I will try again with the 16F88 but I will use other ports than ports A.

    I'll come back asap.
    Roger

  6. #6
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    938


    Did you find this post helpful? Yes | No

    Default

    Mister_e,

    You were right: LPV must be switched off to make it work.

    As specified in the 16F88 data-sheet (chap 15-18), if LVP is selected, RB3 ceases to be a general purpose I/O pin. As I used this port in both tries (PortA and PortB), it coudln't work.

    In a few words, here is what happened to me:
    a.- three LCD displays not HD44780 compatible (even Murphy wouldn't have so much bad luck);
    b.- LVP switched on by default in ICPROG (my programming software).

    Thank you all for your support ...and patience.

    Hope this thread will help other people too.
    Roger

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


    Did you find this post helpful? Yes | No

    Default

    Hé Flotulopex! on se fait une petite danse
    <img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=881&d=1148640458">
    Steve

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

  8. #8
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    938


    Did you find this post helpful? Yes | No

    Default

    On thing is still unclear to me after this experience: the DEFINE commands.

    Since I want to understand this thing clearly, I have wired my display once more on the "original" layout (as in post #1) and modified the DEFINE commands back to "original" too. No worries, still working.

    I had to try this without the DEFINE commands and guess what, it works!!!

    Since I understood these command would be almost mandatory, it's beginning again to be a mess in my (small) brain. I'll open a new thread with this question.

    Thanks again to all of you.

    ***************************
    Mille mercis Steve,

    Tu avais la solution. Bravo! Alors, dansons la gigue :-)
    Roger

Similar Threads

  1. Simple LCD code not working!...WHY?
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 29th November 2009, 19:48
  2. Replies: 2
    Last Post: - 5th November 2009, 17:07
  3. PIC16f690 LCD Not Working
    By hhosteam in forum mel PIC BASIC Pro
    Replies: 19
    Last Post: - 3rd June 2009, 06:26
  4. Replies: 3
    Last Post: - 27th November 2007, 08:56
  5. A/D display result on LCD
    By winsthon in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 10th January 2004, 10:09

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