LCD help


Closed Thread
Results 1 to 15 of 15

Thread: LCD help

  1. #1
    HCSTechy's Avatar
    HCSTechy Guest

    Red face LCD help

    I am using a PIC16F84A pic and I am having LCD problems, I tried using a code that makes the LCD say "Hello World" and it doesnt work.
    Can one of you nice people tell me how to fix this problem.

    We've tried to use the code from the LCD manual to clear the screen, but it has a semi-colon so it declares part of the code as a comment/remark.

    so we couldnt use that. We also tried using the code that was explained in the picbasic command book. But it didn't work either.
    Any help would be greatly appreciated.

  2. #2
    Join Date
    Dec 2003
    Location
    Wichita KS
    Posts
    511


    Did you find this post helpful? Yes | No

    Default

    First off...

    Can you verify your LCD is working?
    Even by adjusting contrast to see dark squares, is better than nothing...

    Then you must verify your chip is sending data propery...
    You can use LED's on the port to make sure your data is being sent. If you send a "1", you had better see the binary "1" with the lit up LED's.

    If the above is working, then you must make sure you initialize the LCD before using, and give a "pause" before sending commands to the LCD.
    A pause 100 will give the LCD time to wake up.

    What does your code look like? (I don't mean just a copy out of the book, but I mean what YOU used to program your pic with.).

    Dwayne
    Ability to Fly:
    Hurling yourself towards the ground, and missing.

    Engineers that Contribute to flying:
    Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute

    Pilots that are Flying:
    Those who know their limitations, and respect the green side of the grass...

  3. #3
    HCSTechy's Avatar
    HCSTechy Guest


    Did you find this post helpful? Yes | No

    Question

    The LCD does work, when we make the circut and everything all that is shown is the name of the LCD (Matrix Orbital) and a strange character at the begining of the first line, the PIC works, we did other programs on it, and we also did a pause but not at 100, we might try that.

  4. #4
    Join Date
    Sep 2005
    Location
    Dayton, Ohio
    Posts
    72


    Did you find this post helpful? Yes | No

    Default

    Matrix Orbital is a "serial" LCD I think??

    Make sure you do NOT use the LCDOUT command. It only works with parallel LCDs. But that is where the "Hello World" example is in the PBP manual.

    If it IS a serial LCD then you should use one of the SEROUT type commands to write to it.

    Jim
    Jim Robertson
    "MilesTag" DIY Lasertag
    www.lasertagparts.com/mtdesign.htm
    Dayton, Ohio

  5. #5
    HCSTechy's Avatar
    HCSTechy Guest


    Did you find this post helpful? Yes | No

    Default

    it is serial, and we already tried using the serout command.
    This is the code we used:
    Pause 1000
    start:
    SEROUT portb.1, 1, [254,1] 'supposed to clear screen
    pause 40
    serout portb.1, 1, ["hello world"]
    pause 400
    goto start
    end

    in the book for the lcd, it says that the command for clear screen is 254 88,
    but it doesn't work either

  6. #6
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,807


    Did you find this post helpful? Yes | No

    Default

    How have you connected the Serial port of the PIC to the Serial input of the Display?

    Have you used any rs232 converters like MAX232?

    Ioannis

  7. #7
    Join Date
    Dec 2003
    Location
    Wichita KS
    Posts
    511


    Did you find this post helpful? Yes | No

    Default

    What you may want to do, is one of two things...

    put a character spacing of 1000 (defined at top of program),

    or instead of Looping to the very beginning. Loop to the output again...
    You may be transmitting data too fast for the LCD to respond, and hit the clearLCD before bring printed.

    using your code with a slight mod:

    DEFINE CHAR_PACING 1000

    Pause 1000
    start:
    SEROUT portb.1, 1, [$FE,1] 'supposed to clear screen
    pause 40
    Loop:
    serout portb.1, 1, ["hello world"]
    pause 400
    goto Loop
    end


    Dwayne
    Ability to Fly:
    Hurling yourself towards the ground, and missing.

    Engineers that Contribute to flying:
    Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute

    Pilots that are Flying:
    Those who know their limitations, and respect the green side of the grass...

  8. #8
    HCSTechy's Avatar
    HCSTechy Guest


    Did you find this post helpful? Yes | No

    Default

    thanks dwayne,
    i wont be able to try that until monday...
    but I'll definetly let you know if it works

  9. #9
    HCSTechy's Avatar
    HCSTechy Guest


    Did you find this post helpful? Yes | No

    Default

    no it didnt work
    it keeps displaying a character that looks like two I's over and over again
    but its at least doing something different than before

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


    Did you find this post helpful? Yes | No

    Default

    be sure of your baudrate AND the way you need to send the data to your LCD. I mean Inverted or NotInverted

    Wich crystal speed you use?
    ....

    ...


    ...
    Steve

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

  11. #11
    HCSTechy's Avatar
    HCSTechy Guest


    Did you find this post helpful? Yes | No

    Red face

    We have tried everything, nothing works.

  12. #12
    phan's Avatar
    phan Guest


    Did you find this post helpful? Yes | No

    Default

    I'm actually having the same problem as you do. I'm using the LCD2041, and nothing seem to work. My pic chip is the 16F876.
    did you solder the pins on your LCD for TTL communication ?
    let me know your latest findings

  13. #13
    badrad's Avatar
    badrad Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by phan
    I'm actually having the same problem as you do. I'm using the LCD2041, and nothing seem to work. My pic chip is the 16F876.
    did you solder the pins on your LCD for TTL communication ?
    let me know your latest findings
    you need to confirm which version of pcb you are using, their documentation does not always reflect the latest PCB version. I've used their GLC24064 - connected to 16F876A and 877A in TTL serial and have also tested with their I2C. Using TTL setup with the display, just make sure you do not invert the PIC serial signal.
    BTW-the Orbital Matrix displays sometimes hiccups in it's receive buffers, and depending on your application, the display may occasionally wander off into oblivion. Check their forum, there are some threads about this.

  14. #14
    badrad's Avatar
    badrad Guest


    Did you find this post helpful? Yes | No

    Default

    sorry - timed out and wound up double posting the reply...
    Last edited by badrad; - 1st February 2006 at 17:28. Reason: double posted

  15. #15
    HCSTechy's Avatar
    HCSTechy Guest


    Did you find this post helpful? Yes | No

    Default

    We fixed the problem, thanx everybody.

Similar Threads

  1. Is this code not initialising the LCD properly?
    By Platypus in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 30th January 2010, 19:14
  2. 16f688 LCD what have I done wrong
    By spitfiredriver in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 8th August 2009, 19:54
  3. LCD Problem
    By karenhornby in forum General
    Replies: 3
    Last Post: - 19th June 2008, 11:43
  4. Need help with LCD number display.
    By Steve Matson in forum mel PIC BASIC
    Replies: 8
    Last Post: - 26th June 2007, 23:07
  5. LCD will not start
    By btaylor in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 24th May 2007, 02:30

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