LCD Problem


Closed Thread
Results 1 to 4 of 4

Thread: LCD Problem

  1. #1
    Join Date
    Mar 2008
    Posts
    79

    Default LCD Problem

    Hi guys...
    any ideas how to set this?
    my pin assignments are:
    RS PORTB.4
    E PORTB.5
    but the data lines are
    PORTB.0 LCD D7
    PORTB.1 LCD D6
    PORTB.2 LCD D5
    PORTB.3 LCD D4

    and my code is...
    Code:
    DEFINE OSC 8
    DEFINE LCD_DREG PORTB         'set LCD DATA port
    DEFINE LCD_DBIT    4          'set starting DATA bit (0 or 4) if 4-bit
    DEFINE LCD_RSREG PORTB        ' Set LCD Register Select port
    DEFINE LCD_RSBIT	4            ' Set LCD Register Select bit
    DEFINE LCD_EREG	PORTB            ' Set LCD Enable port
    DEFINE LCD_EBIT	5            ' Set LCD Enable bit
    DEFINE LCD_BITS	4            ' Set LCD bus size (4 or 8 bits)
    DEFINE LCD_LINES	4             ' 4 Line LCD LCD
    DEFINE LCD_COMMANDUS    2000  ' Set command delay time in us
    DEFINE LCD_DATAUS	50    ' Set data delay time in us
    The problem I have is the usual pin assignment is
    PORTB.0 LCD D4
    PORTB.1 LCD D5
    PORTB.2 LCD D6
    PORTB.3 LCD D7

    HOW do I set the fact the pins are "backwards"?

  2. #2
    Join Date
    May 2006
    Location
    Del Rio, TX, USA
    Posts
    343


    Did you find this post helpful? Yes | No

    Default

    Karen,
    Darrel has your answer (suprise, suprise ). Here is the post: LCD_AnyPin

    I'm sure Darrel will answer any questions you may have about implementing this.

    HTH,
    Steve

  3. #3
    Join Date
    Mar 2008
    Posts
    79


    Did you find this post helpful? Yes | No

    Default

    Thank you
    and there was me thinking it was going to be an impossible problem to fix lol
    or at least very hard!

  4. #4
    Join Date
    May 2006
    Location
    Del Rio, TX, USA
    Posts
    343


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by karenhornby View Post
    Thank you
    and there was me thinking it was going to be an impossible problem to fix lol
    or at least very hard!
    Well, that's Darrel for you. Taking the seemingly impossible, very hard, and making it easy! So, don't thank me, thank Darrel.

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. LCD problem
    By Andre_Pretorius in forum General
    Replies: 8
    Last Post: - 27th January 2009, 15:47
  4. Play with LCD on PICDEM
    By The IceMan in forum mel PIC BASIC
    Replies: 5
    Last Post: - 22nd August 2008, 16:56
  5. Need help with LCD number display.
    By Steve Matson in forum mel PIC BASIC
    Replies: 8
    Last Post: - 26th June 2007, 23:07

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