Problem with 2x16 LCD on 16F630


Closed Thread
Results 1 to 3 of 3
  1. #1
    Falcon's Avatar
    Falcon Guest

    Unhappy Problem with 2x16 LCD on 16F630

    Hello !

    I have been trying to get a 2x16 LCD to work with the 16F630, I have tried everything but I always get a blank display !

    Here is the code:

    *****************************

    Device = 16F630

    ' PIC Defines
    ' -----------

    CONFIG INTRC_OSC_NOCLKOUT,WDT_OFF,PWRTE_OFF,MCLRE_OFF,BOD EN_OFF,CPD_OFF,CP_OFF

    'DB0 to DB3 (Pins 7, 8 ,9 & 10) no connection, grounded
    'DB4 (pin 11) to RC2 (pin 8)
    'DB5 (pin 12) to RC3 (pin 7)
    'DB6 (pin 13) to RC4 (pin 6)
    'DB7 (pin 14) to RC5 (pin 5)
    'RS (pin 4) to RC1 (pin 9)
    'E (pin 6) to RC0 (pin 10)
    'R/W (pin 5) to VSS

    Delayms 1000

    ALL_DIGITAL = TRUE

    CMCON = 7
    TRISA = %000000
    TRISC = %000000
    OPTION_REG.7 = 1 ' 0=Enable 1=Disable PORTB pull-ups

    DECLARE LCD_TYPE 0
    DECLARE LCD_DTPIN PORTC.4
    DECLARE LCD_RSPIN PORTC.1
    DECLARE LCD_ENPIN PORTC.0
    DECLARE LCD_INTERFACE 4
    DECLARE LCD_LINES 2



    ' Mainloop:

    print "Hello Peter"

    ' Goto Mainloop

    End
    **************************************

    I usually dont give up but I find no answer.

    Any help please ?

    Thanks, Peter

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


    Did you find this post helpful? Yes | No

    Default

    Falcon,
    we can't help you on that since you're not using Melabs PICBasic... but if you go http://www.picbasic.org/forum/index.php? you'll find the right person to help you.

    BUT one thing i see is that you should use the 4 lowest bit of PORTC for data, the other for RS and E. If you use the 4 highest, PORTC should have 8 bits... he don't

    so modify you connection and use

    DECLARE LCD_DTPIN PORTC.0
    DECLARE LCD_RSPIN PORTC.4
    DECLARE LCD_ENPIN PORTC.5
    Steve

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

  3. #3
    Falcon's Avatar
    Falcon Guest


    Did you find this post helpful? Yes | No

    Smile

    Hello Steve,

    Thanks a lot for the info, I changed it to DECLARE LCD_DTPIN PORTC.0 and it worked immediately.

    Noted that I have to change forum, thankyou once again for your help !

    Peter

Similar Threads

  1. LCD problem with 16F628
    By ngeronikolos in forum mel PIC BASIC Pro
    Replies: 25
    Last Post: - 19th September 2016, 08:28
  2. 2x16 lcd not working with pic16f72
    By vu2iia in forum Schematics
    Replies: 4
    Last Post: - 16th February 2011, 14:59
  3. Newbie? Problem with LCD
    By lew247 in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 7th December 2009, 19:48
  4. 2x16 lcd problem
    By k3v1nP in forum mel PIC BASIC
    Replies: 11
    Last Post: - 30th October 2008, 04:46
  5. LCD Problem
    By karenhornby in forum General
    Replies: 3
    Last Post: - 19th June 2008, 11:43

Members who have read this thread : 1

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