PIC16f690 LCD Not Working


Closed Thread
Results 1 to 20 of 20

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    Are you using this chip on a solderless breadboard or are you using the Low Pin Count Demo Board from Microchip ?
    this is you code with only minor tweeks and it works on a solderless breadboard. try grounding the contrast pin #3 on the lcd. This is compiled using MPASM as it is what I always use.
    Code:
    @ __config _INTRC_OSC_NOCLKOUT & _WDT_OFF & _MCLRE_OFF &_CP_OFF
    define OSC 4
    DEFINE LCD_DREG PORTC 'Set port C for the data lines
    DEFINE LCD_DBIT 4
    
    DEFINE LCD_RSREG PORTB 'Set the RS Port and Pin
    DEFINE LCD_RSBIT 5
    
    DEFINE LCD_EREG PORTB 'Set LCD Enable bit and pin
    DEFINE LCD_EBIT 6
    
    DEFINE LCD_BITS 4
    ' Set number of lines on LCD
    DEFINE LCD_LINES 2
    ' Set command delay time in us
    DEFINE LCD_COMMANDUS 2000
    ' Set data delay time in us
    DEFINE LCD_DATAUS 50
    
    ANSEL = 0
    ANSELH = 0
    CM1CON0 = 0
    CM2CON0 = 0
    
    Cnt VAR WORD
    
    'Start Program
    TRISC = 0
    TRISB = 0
    
    Pause 500
    
    cnt=0
    RPT:
    HIGH PORTB.6
    LCDOUT $FE,1 'CLEAR LCD SCREEN
    pause 500
    LCDOUT $FE,2,"CNT=", DEC CNT
    Pause 1000
    CNT=CNT+1
    GOTO RPT
    END
    Last edited by Archangel; - 8th May 2009 at 08:26.
    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.

  2. #2
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    952


    Did you find this post helpful? Yes | No

    Default same problem for me...

    I applied Joe's code and still can't bring my display to work with this chip (I tried with three).

    Never had problems with other chips.

    Don't know what's wrong :-/
    Roger

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by flotulopex View Post
    I applied Joe's code and still can't bring my display to work with this chip (I tried with three).

    Never had problems with other chips.

    Don't know what's wrong :-/
    What are you getting Roger ? Blocks , anything ?
    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.

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


    Did you find this post helpful? Yes | No

    Default

    Checked it again, and it's fine. here is the hex:
    Attached Files Attached Files
    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.

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


    Did you find this post helpful? Yes | No

    Default

    Sorry, I'm wrong, it worked for me too.. in the past, also with 16F690.

    I may have a problem with my breadboards. Gonna buy a new one today.

    Nevertheless, what I see on my LCD display is on it's first line, a row of blocks, slightly visible.

    Of course, I tried to change the contrast, but nothing helps.
    Roger

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by flotulopex View Post
    Sorry, I'm wrong, it worked for me too.. in the past, also with 16F690.

    I may have a problem with my breadboards. Gonna buy a new one today.

    Nevertheless, what I see on my LCD display is on it's first line, a row of blocks, slightly visible.

    Of course, I tried to change the contrast, but nothing helps.
    I never use a contrast pot, I ground pins 1,3,5,16, put power on 2,15 always works for me. Those breadboards get nasty inside, corrosion after the plating wears a bit, the component pins wear the contacts quickly too.
    Last edited by Archangel; - 28th May 2009 at 09:04.
    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.

  7. #7
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    952


    Did you find this post helpful? Yes | No

    Default

    No pot on my side too.

    I use a 1k2 to 2k2 resitor instead.

    Must be the breadboards...
    Roger

Similar Threads

  1. 2x16 lcd not working with pic16f72
    By vu2iia in forum Schematics
    Replies: 4
    Last Post: - 16th February 2011, 15:59
  2. My LCD code is not working...
    By kvrajasekar in forum mel PIC BASIC
    Replies: 2
    Last Post: - 7th December 2008, 06:41
  3. Migrating from PIC16F690 to PIC18F4525 and having LCD issues
    By jblackann in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 6th June 2008, 21:05
  4. Simple LCD code not working..
    By davewanna in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 28th April 2008, 14:55
  5. SOUND makes LCD quit working
    By jderson in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 18th April 2008, 15:12

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