LCDOUT probs


Closed Thread
Results 1 to 10 of 10

Thread: LCDOUT probs

Hybrid View

  1. #1
    Join Date
    Sep 2005
    Posts
    28


    Did you find this post helpful? Yes | No

    Default

    hi thanks for your replys.
    so to alter this code to run on a pic16h84 witch has o port h only A and B i make the following changes

    start:
    DEFINE LCD_DREG PORTA
    DEFINE LCD_DBIT 0
    DEFINE LCD_RSREG PORTA
    DEFINE LCD_RSBIT 4
    DEFINE LCD_EREG PORTB
    DEFINE LCD_EBIT 3
    DEFINE LCD_RWREG PORTA
    DEFINE LCD_RWBIT 4
    DEFINE LCD_BITS 4
    DEFINE LCD_LINES 2
    DEFINE LCD_COMMANDUS 3000
    DEFINE LCD_DATAUS 300

    Main:

    pause 1000

    LCDOUT $FE, 1
    LCDOUT $FE, 2, “Hello”
    pause 1000
    goto Main


    with connections

    1 - VSS
    2 - VDD
    3 - VC
    4 - RS - PortA.4
    5 - R/W - portA.4
    6 - E - PortB.3
    7 - Db0 -open
    8- DB1 - open
    9 - DB2 - open
    10 DB3 - open
    11 DB4 - portA.0
    12 DB5 - portA.1
    13 DB6 - portA.2
    14 DB7 - portA.3


    could some one please have a look at my data sheet for the display and check hat this setup will work with it
    http://www.maplin.co.uk/Media/PDFs/N28AZ.pdf
    thank you for your patience your help has shed a lot of light on the subject of lcd's for this newbie.

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


    Did you find this post helpful? Yes | No

    Default

    Assuming you have a Pull-Up resistor on the PORTA.4 pin, i think you MUST set them to LOW yourself.

    You don't need to use the LCD R/W pin, just ground it and remove the according DEFINEs


    AND you have two things on PORTA. RW and RS
    Steve

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

  3. #3
    Join Date
    Sep 2005
    Posts
    28


    Did you find this post helpful? Yes | No

    Default

    hi there thanks for the reply. ia have resistor on that pin

    i have noticed the prob with rw and rs
    here are my changes in code

    start:

    portA = low
    PortB = low
    DEFINE LCD_DREG PORTA
    DEFINE LCD_DBIT 0
    DEFINE LCD_RSREG PORTA
    DEFINE LCD_RSBIT 4
    DEFINE LCD_EREG PORTB
    DEFINE LCD_EBIT 3

    DEFINE LCD_BITS 4
    DEFINE LCD_LINES 2
    DEFINE LCD_COMMANDUS 3000
    DEFINE LCD_DATAUS 300

    Main:

    pause 1000

    LCDOUT $FE, 1
    LCDOUT $FE, 2, “Hello”
    pause 1000
    goto Main


    with connections

    1 - VSS
    2 - VDD
    3 - VC
    4 - RS - PortA.4
    5 - R/W - Ground
    6 - E - PortB.3
    7 - Db0 -open
    8- DB1 - open
    9 - DB2 - open
    10 DB3 - open
    11 DB4 - portA.0
    12 DB5 - portA.1
    13 DB6 - portA.2
    14 DB7 - portA.

Similar Threads

  1. Timer + rc5
    By naga in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 19th November 2009, 07:56
  2. need help in coding..
    By daphne8888 in forum mel PIC BASIC
    Replies: 1
    Last Post: - 19th March 2008, 07:31
  3. Help GPS read with serin
    By leinske in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 5th September 2007, 02:33
  4. Crystalfontz LCD
    By jman12 in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 9th February 2007, 15:04
  5. having problems with Hantronix 20x4 lcd
    By Rhatidbwoy in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 22nd December 2005, 12:22

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