newbi trying LCD on 16F690


Closed Thread
Results 1 to 5 of 5
  1. #1

    Default newbi trying LCD on 16F690

    Hi All,

    I am a new commer to PIC and Picbasic Pro.
    (Previously I have worked with Atmel 89c52)
    (And being first time,,, lot of struggling with pic :-(

    LCD not displaying anything. Please help me.
    (this LCD has worked well with 89c52, its china make....)

    I am using 16F690 and using following connections for LCD.

    I have connected:
    RC0 to DB4 of LCD
    RC1 to DB5
    RC2 to DB6
    RC3 to DB7
    RB4 to RS of lcd
    RB6 to E

    My code is:

    DEFINE LCD_DREG PORTC
    DEFINE LCD_DBIT 0
    DEFINE LCD_RSREG PORTB
    DEFINE LCD_RSBIT 4
    DEFINE LCD_EREG PORTB
    DEFINE LCD_EBIT 6
    DEFINE LCD_LINES 2
    DEFINE LCD_COMMANDUS 2000
    DEFINE LCD_DATAUS 100
    DEFINE LCD_BITS 4

    ADCON0 = 0 ' Set all digital
    CM1CON0 = 0 ' Analog comparators off
    CM2CON0 = 0
    SSPCON = 0

    Lcdout $fe, 1 ' Clear screen

    Pause 1000 ' Wait for LCD to start up


    mainloop:
    Lcdout $fe, 1 ' Clear screen
    Pause 1500 ' Wait .5 second
    Lcdout "Hello" ' Display "Hello"
    Pause 500 ' Wait .5 second
    Lcdout $fe, $c0, "World"
    Pause 1500 ' Wait .5 second
    Goto mainloop ' Do it forever

    End

    Regards,

    Devidas

  2. #2


    Did you find this post helpful? Yes | No

    Default newbi trying LCD on 16F690

    The LCD has 16 pins, with BL.
    Its marked JHD 162A and some chinese .... I am sorry.
    No indication of internal controller.

  3. #3
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Welcome to the forum.

    Check the DATASHEET... you may have forgotten something (like the ANSEL & ANSELH Registers)...

  4. #4


    Did you find this post helpful? Yes | No

    Default

    Thanks. I will look it up.

  5. #5


    Did you find this post helpful? Yes | No

    Default

    Thanks Melanie !!!
    You are my Angel. I should have prayed you earlier.
    I spent a full day before, and your one sentence solved it.
    Now it is working perfect. Thanks again.

Similar Threads

  1. Is this code not initialising the LCD properly?
    By Platypus in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 30th January 2010, 19:14
  2. 16f688 LCD what have I done wrong
    By spitfiredriver in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 8th August 2009, 19:54
  3. Need help with LCD number display.
    By Steve Matson in forum mel PIC BASIC
    Replies: 8
    Last Post: - 26th June 2007, 23:07
  4. LCD will not start
    By btaylor in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 24th May 2007, 02:30
  5. Dedicated LCD Controller question
    By chuckles in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 27th February 2006, 14:44

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