Is this code not initialising the LCD properly?


Closed Thread
Results 1 to 9 of 9

Hybrid View

  1. #1
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    RW bit ? are you going to read from the LCD memory to the PIC ? IF not
    just tie it to ground, I do the same for the contrast bit, pin 3. I NEVER use a contrast pot and have yet to need one.
    You might try adding FLAGS = 1 into your code, at least until you are sure everything is working. Check the Data Sheet and see if that PIC has comparators on portB and turn them off if so. And Finally TRISB=0
    so your PIC knows the LCD requires outputs.

    "PIC working ok LED lights up"
    That's because the HIGH command will manipulate the TRIS register, I think probably the TRISB = 0 or TRISB = %00000000 will make it work.
    Oh BTW I see you are new here, WELCOME !
    Last edited by Archangel; - 29th January 2010 at 05:15.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  2. #2
    Join Date
    Jan 2010
    Location
    In the Shed
    Posts
    6


    Did you find this post helpful? Yes | No

    Default

    Thanks all for the suggestions, I'll give them a go when I get home from work.

    Cheers

  3. #3
    Join Date
    Jan 2010
    Location
    In the Shed
    Posts
    6


    Did you find this post helpful? Yes | No

    Talking Sorted

    Thanks all,

    The solution was ANSELH
    I had thought ANSEL covered this chip but I guess there is a high register that needs setting.

    Back to the datasheet...........

  4. #4
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Platypus View Post
    Thanks all,

    The solution was ANSELH
    I had thought ANSEL covered this chip but I guess there is a high register that needs setting.

    Back to the datasheet...........
    And Thank You for the feedback, It adds to my arsenal of experience.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

Similar Threads

  1. RF Modules
    By tonyfelloni in forum mel PIC BASIC Pro
    Replies: 44
    Last Post: - 26th June 2010, 17:42
  2. lcd stops after about 5 minutes and gets stuck
    By robertpeach in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 15th September 2009, 12:03
  3. How much code space do PBP statements use.
    By Darrel Taylor in forum Code Examples
    Replies: 5
    Last Post: - 13th February 2009, 21:31
  4. Making Program Code Space your playground...
    By Melanie in forum Code Examples
    Replies: 15
    Last Post: - 19th July 2008, 08:26
  5. LCD Problem
    By karenhornby in forum General
    Replies: 3
    Last Post: - 19th June 2008, 11:43

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