LCD Display not working - PIC heating...


Closed Thread
Results 1 to 33 of 33

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default Datasheet

    Quote Originally Posted by skimask
    Do a search on the comparator, you'll see what I mean.
    JDG
    Datasheets are a wonderful place to get lost, I looked at it and knowing what to do it didn't make sense.
    flotulopex,

    ADCON1 = 7 ' turns off adc
    CMCON = 7 'turns off comparators
    Last edited by Archangel; - 11th September 2006 at 23:56.

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


    Did you find this post helpful? Yes | No

    Smile

    Hi Flotulopex,

    Where are your DEFINES for the LCD?

    Your program should start like this:
    OSCCON = %01100000 'Internal RC set to 4MHZ

    DEFINE LCD_DREG PortA
    DEFINE LCD_DBIT 0
    DEFINE LCD_RSREG PORTA
    DEFINE LCD_RSBIT 4
    DEFINE LCD_EREG PORTB
    DEFINE LCD_EBIT 4
    DEFINE LCD_BITS 4
    DEFINE LCD_LINES 2

    TRISA = %00000000 'make Port A outputs
    TRISB = %00000000 'make Port B outptuts

    ADCON1 = 7 ' turns off adc
    CMCON = 7 'turns off comparators

    Pause 1000 'Wait for display to initialise

    Main:
    lcdout $FE, 1 'Clear LCD
    lcdout $FE, 2 'Position cursor at home
    lcdout "Hello World" 'Send "Hello World" to LCD on line 1
    lcdout $FE, $C0 'Position cursor second line
    lcdout "Second line" 'Send "Second line" to LCD on line 2
    pause 1000 'Pause 1 second to see it
    goto Main
    end


    The next problem I believe you have is you don't power your circuit from the programmer power. I'm assuming you are using ICSP programming. You should power the circuit from its own separate power supply. Do you have capacitors on the power supply lines? 10uF and .1uF on the 5 volt side of the voltage regulator going to the PIC. Make sure you have a .1uF across the PICs power leads as close as possible. Have a 100uF or 10uF and a .1uf across the input side of the voltage regulator also.

    If you don't have a copy of the PBP manual then download one! There is a real nice example of how LCDOUT is suppose to be connected and programmed. Also the contrast pin of the LCD display is suppose to be connected to the wiper or center pin of a 5K potentiometer with one of the two remaining pins connected to +5vdc and the other side to ground. After you have all of this setup, if you are still getting blocks on the screen, then adjust the pot until the blocks are just barely seen. Then try your program.

    This should help you get going!

    BobK

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


    Did you find this post helpful? Yes | No

    Default

    Thank you All.

    I'll try to turn off ADCs and COMPARATORs as soon as I'm back home.

    Yes, I compared the PBP manual with other documents I have found on the net. The difference I see with the PBP manual's shematic and others is the pull-up resistor on RA4. I'll try this too.

    Yes, I'm using ICSP. Is it a problem to use the programmer's power source? It has 1A source and is very stable. I have installed a 3 pole switch to interrupt the MCLR, DATA and CLOCK lines once the PIC is programmed and I just keep Vdd and Vss.

    I'm using the MICROCHIP AN589 programmer and there are capacitors in this circuit. I will add a 0.1µF close to the PIC.

    About the defines, as far as I understood the PBP help file (in MicroCode Studio), I'm using the default settings so I thought the defines were not mandatory (am I wrong?).
    Roger

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


    Did you find this post helpful? Yes | No

    Default

    Well,

    I did all what you suggested and unfortunately it didn't work.

    The last thing may be... the display itself?

    I have three displays doing the same thing when connected to the PIC. The first is an ELECTROFONT 98301 (MK620NY-LY) and the second (I have 2 of them) is a VL 16265SS3 R2. I couldn't find their data sheets so I can only assume they are like almost all other displays "Hitachi 44780" compatible.

    These displays come from HP servers made around 2000.

    When adjusting the contrast, the display flickers a little.

    During the programming, the display stays always on.

    I even changed the PIC and still the same happens.

    I then tried to remove one-by-one the wires from the display hoping for a change. Unfortunately, until Vcc and GND are removed, the display stays like the picture I sent in a previous post.

    One more thing I just tested -which can sound really stupid- WITHOUT the PIC. Guess what, still the same.

    Any other idea?
    Last edited by flotulopex; - 12th September 2006 at 17:16.
    Roger

  5. #5
    Join Date
    Feb 2003
    Posts
    432


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by flotulopex
    Any other idea?
    You say in your first post that you are using 16F88

    Try adding the line....

    ANSEL = %00000000 ' Disable Analogue Inputs

    ..to disable the analogue inputs which are on by default.

    Regards
    Keith

    www.diyha.co.uk
    www.kat5.tv

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


    Did you find this post helpful? Yes | No

    Smile

    Hello again,

    DEFINES are not DEFAULTS. Defaults are part of the 16F88.inc file and pertain to certain setup requirements. These are also configurable by you if you need to change them for your particular application. DEFINES are used to setup things like LCD displays, serial printers or other types of serial outputs using the DEFINE DEBUG type statements. You must add the define statements yourself. Again another topic to read in the MELABS PBP manual.

    I don't know anything about the Microchip programmer. If I get a chance this coming weekend I'll look it up. I use the MELABS USB and EPIC programmers and they don't have enough power to handle programming and powering your circuitry.

    I ordered 4 of those serial LCD driver boards. If they get here by Thursday I'll get one built over the weekend and let you know how they work. I though the prices were well within reason.

    Sorry about the ansel = item. I didn't take the time to read the datasheet. Shame on me! But at least I was on the right track! Thanks Keith!!!

    BobK
    Last edited by BobK; - 13th September 2006 at 02:13.

  7. #7
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    One thing to look at - the pins on an LCD are a bit weird. The pins are numbered as if you put a connector on the FRONT side of the board.
    Most people put the pins out the backside. As a result, what you think is pin #1, really isn't

    Check that before you try anything else. If that is the problem (it reverses the odd and even pins), the display is probably destroyed.

    Don't ask me how I know all this !
    Charles Linquist

  8. #8
    Join Date
    Feb 2003
    Posts
    432


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by BobK
    Sorry about the ansel = item. I didn't take the time to read the datasheet. Shame on me! Thanks Keith!!!
    Neither did I !!!!

    I learnt the hard way the first time I used the 16F88 and couldnt get some of the pins on PortB to work right
    Keith

    www.diyha.co.uk
    www.kat5.tv

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