LCDOUT probs


Closed Thread
Results 1 to 10 of 10

Thread: LCDOUT probs

Hybrid View

  1. #1
    Join Date
    Sep 2005
    Posts
    28

    Default LCDOUT probs

    HI there this is the first time i have tried driving an lcd i have read the manual but i still canot get the thing working.
    Here is my code

    start:

    pause 1000 'wait for lcd to start up
    lcdout $FE, 1 'clear screen
    lcdout $FE, 2 'return to home
    lcdout $FE, 1, "Welcome" 'write welcome on the screen

    pause 2000

    goto start
    end if


    i have built the circuit based on the one in the pbp maunal

    but still no luck, nothing, i have checked all my connections but still nothing the lcd i am using is from here http://www.maplin.co.uk/module.aspx?...9&doy=9m3#spec

    please can some one please steer me in the right direction, thank you for your time.

  2. #2
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    Make certain you have all your DEFINES set up properly to tell PBP just
    what pins you have connected to what.
    Also, use some command and data delays.

    Below is a header file I use. It works with every display I hook up.
    You will have to change your pin definitions, of course.

    DEFINE LCD_DREG PORTH
    DEFINE LCD_DBIT 0
    DEFINE LCD_RSREG PORTH
    DEFINE LCD_RSBIT 5
    DEFINE LCD_EREG PORTJ
    DEFINE LCD_EBIT 2
    DEFINE LCD_RWREG PORTH
    DEFINE LCD_RWBIT 4
    DEFINE LCD_BITS 4
    DEFINE LCD_LINES 2
    DEFINE LCD_COMMANDUS 3000
    DEFINE LCD_DATAUS 300
    Charles Linquist

  3. #3
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Jhdgkss View Post
    start:

    pause 1000 'wait for lcd to start up
    lcdout $FE, 1 'clear screen
    lcdout $FE, 2 'return to home
    lcdout $FE, 1, "Welcome" 'write welcome on the screen

    pause 2000

    goto start
    end if
    Is that your whole program?

  4. #4
    Join Date
    Sep 2005
    Posts
    28


    Did you find this post helpful? Yes | No

    Default

    yes thats the whole code. how do i set the define's so that my data will use portA like in the manual and the enable is on portb.3 i thought it would just adopt the standard setting automatacly unless told otherwise. iam useing a pic64f84a
    Last edited by Jhdgkss; - 10th March 2007 at 06:19.

  5. #5
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    Just follow my example. It should be pretty explanatory.

    In my example, I use PORTH as the data register
    The LSbit is tied to bit 0 (PORTH.0)

    The R/S pin is tied to PortH.5

    E is tied to PORTJ.2 etc
    Charles Linquist

  6. #6
    Join Date
    Mar 2007
    Posts
    4


    Did you find this post helpful? Yes | No

    Default

    Charles,

    Is there any particular reason that the 4 data bits and the controlling pins (ie. E, RW, RS) should be on different ports as I seem to see in most examples??

    Or can they be "defined" to the same port without problem?


    Hoops

  7. #7
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    They can be defined on the same port. The only limitation that I'm aware of is that the DATA lines must start on a nybble boundary (either on bit 0 or 4)of a port.
    Charles Linquist

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