LCD problem on portC


Closed Thread
Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2006
    Posts
    24

    Unhappy LCD problem on portC

    Hi,

    I have had a 16x2 LCD display attached to a 16F877 to port A and is works just fine using the default settings for data port etc. The problem is that I have to move it to port C to allow me the use of the A2D converters on the chip. I have tried to assign the port and simply duplicated the wiring to the new pins (left the old ones attached for comparison reasons) but the display will not work.

    Is this correct?

    Portc.0 to portc.3 = data lines.
    PortD.0 = RS
    portD.1 = E

    DEFINE LCD_DREG PORTC
    DEFINE LCD_DBIT 0
    DEFINE LCD_RSREG PORTD
    DEFINE LCD_RSBIT 0
    DEFINE LCD_EREG PORTD
    DEFINE LCD_EBIT 1
    DEFINE LCD_BITS 4
    DEFINE LCD_LINES 2
    DEFINE LCD_COMMANDUS 2000
    DEFINE LCD_DATAUS 50

    Why would this not work?

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


    Did you find this post helpful? Yes | No

    Default

    unless you misswired smething, there's no reason

    i just tried it here... work a treat.
    Steve

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

  3. #3
    Join Date
    Mar 2006
    Posts
    24


    Did you find this post helpful? Yes | No

    Default

    Thanks Mr E.
    Ill double check the wiring tonight but as I simply duplicated it from one port to another (and left the previous wires intact for checking against) I doubt that I miss-wired it.

    I will check the connections with a cro tonight adn see if signals are getting out.

    Did you do anything else (initialise the port or something)

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


    Did you find this post helpful? Yes | No

    Default

    nope, just placed a PAUSE 500 before the first LCDOUT.

    lucky guy you are, i still have what i used...
    Code:
            @  __CONFIG _XT_OSC & _LVP_OFF
            '
    DEFINE LCD_DREG PORTC
    DEFINE LCD_DBIT 0
    DEFINE LCD_RSREG PORTD
    DEFINE LCD_RSBIT 0
    DEFINE LCD_EREG PORTD
    DEFINE LCD_EBIT 1
    DEFINE LCD_BITS 4
    DEFINE LCD_LINES 2
    DEFINE LCD_COMMANDUS 2000
    DEFINE LCD_DATAUS 50
    
    pause 500
    lcdout $FE,1,"hello"
    stop
    Steve

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

  5. #5
    Join Date
    Mar 2006
    Posts
    24


    Did you find this post helpful? Yes | No

    Cool

    Thanks,
    Ill try again tonight.

  6. #6
    Join Date
    Mar 2006
    Posts
    24


    Did you find this post helpful? Yes | No

    Smile Thanks for the assistance.

    Problem solved.
    I moved it to another port.

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. Newbie? Problem with LCD
    By lew247 in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 7th December 2009, 19:48
  3. PIC HSERIN problem
    By shaiqbashir in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 20th July 2008, 11:08
  4. LCD Problem
    By karenhornby in forum General
    Replies: 3
    Last Post: - 19th June 2008, 11:43
  5. A little DTMF help
    By Travin77 in forum mel PIC BASIC Pro
    Replies: 48
    Last Post: - 30th May 2006, 01:31

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