problems with parallel LCD


Closed Thread
Results 1 to 12 of 12
  1. #1
    Join Date
    Mar 2005
    Posts
    7

    Default problems with parallel LCD

    Hi, I recently bought a new parallel LCD, its specs are here:
    http://www.hantronix.com/down/16216l5.pdf
    I cannot get it to work. All I can get to work is the backlight, no characters show up at all.

    I've worked with LCDs before using the program below without any problems. I have it wired exactly as is in the pbp manual under LCDOUT except with E on RB0 and RS on RB1. I treated the VL pin on the LCD as the contrast pin. I copied the initialize sequence from a parallax lcd manual. I've also tried running it on my BS2 and I can't get it to work on that either. My only solution is that the LCD is defective. Maybe something weird happened when I soldered on the wires. Anything wrong with the specs? It's got the right controller, right? HD44780
    Any ideas would be appreciated.

    Symbol trisb = 134
    Symbol trisa = 133
    Symbol portb = 6
    Symbol porta = 5
    Poke trisb, 0
    Poke trisa, 0
    Symbol E = 0
    Symbol RS = 1
    Symbol inst = B0
    Symbol char = inst
    Symbol temp = B1
    Symbol counter = B2
    Symbol count = B3
    counter = 0
    count = 0
    EEPROM 0, ("Hello, Richard. It is very nice to see you.^")
    start:
    GoSub initialize
    main:
    Read counter, char
    IF char = "^" Then quit
    GoSub send_text
    counter = counter +1
    count = count +1
    IF count = 16 Then next_line
    IF count = 32 Then clear_screen
    GoTo main
    initialize:
    Pause 200
    Poke porta, %1100
    PulsOut E, 1
    Pause 10
    PulsOut E, 1
    Pause 10
    PulsOut E, 1
    Pause 10
    Poke porta, %0010
    PulsOut E, 1
    inst = %00101000
    GoSub send_inst
    inst = %00001110
    GoSub send_inst
    inst = %00000110
    GoSub send_inst
    inst = %00000001
    GoSub send_inst
    Return
    send_inst:
    Low RS
    bit8 = bit4
    bit9 = bit5
    bit10 = bit6
    bit11 = bit7
    bit13 = 0
    Poke porta, temp
    PulsOut E, 1
    Pause 10
    bit8 = bit0
    bit9 = bit1
    bit10 = bit2
    bit11 = bit3
    bit13 = 0
    Poke porta, temp
    PulsOut E, 1
    Pause 100
    Return
    send_text:
    High RS
    bit8 = bit4
    bit9 = bit5
    bit10 = bit6
    bit11 = bit7
    bit13 = 1
    Poke porta, temp
    PulsOut E, 1
    Pause 10
    bit8 = bit0
    bit9 = bit1
    bit10 = bit2
    bit11 = bit3
    bit13 = 1
    Poke porta, temp
    PulsOut E, 1
    Pause 100
    Return
    next_line:
    inst = %11000000
    GoSub send_inst
    GoTo main
    clear_screen:
    Pause 1000
    inst = %00000001
    GoSub send_inst
    inst = %10000000
    GoSub send_inst
    count = 0
    GoTo main
    quit:
    End

    Thanks

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Since you're using PORTA. You probably just need to disable the analog functions (A/D and Comparators).

    Which PIC are you using?
    <br>
    DT

  3. #3
    Join Date
    Mar 2005
    Posts
    7


    Did you find this post helpful? Yes | No

    Default

    I'm using the 16F628.
    I tried adding:
    Symbol cmcon = $1F
    Poke cmcon, 7
    (is this what you were talking about?)
    and nothing changed. Yeah, I don't really know what else to do.

    Thanks

  4. #4
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Brown View Post
    I'm using the 16F628.
    I tried adding:
    Symbol cmcon = $1F
    Poke cmcon, 7
    (is this what you were talking about?)
    and nothing changed. Yeah, I don't really know what else to do.
    Thanks
    Something I always do...no matter how sure of myself I am...
    I connect a heartbeat LED. Just set aside a pin to do nothing more than flash an LED.
    The absolute first thing I do. You can verify and check sooooo many things with just that little bitty LED.
    Also, you might want to increase that pause 200 to pause 1000 or 2000 and see what happens.
    Last edited by skimask; - 10th June 2008 at 20:23.

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


    Did you find this post helpful? Yes | No

    Default

    Hello Mr. Brown,
    I know PBP and PB are somewhat different, in PBP the statement would be just<br>CMCON = 7
    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.

  6. #6
    Join Date
    Mar 2005
    Posts
    7


    Did you find this post helpful? Yes | No

    Default

    Hi, I tried your suggestions and unfortunately my LCD still isn't working. I think I'll just order another one sometime and test it out. If anyone has an idea let me know.

    Thanks

  7. #7
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Are you seeing any blocks on the screen or anything at all? Remember to try viewing the LCD at various angles...

  8. #8
    Join Date
    Mar 2005
    Posts
    7


    Did you find this post helpful? Yes | No

    Default

    Yeah, I'm not seeing anything at all. I remember now that it's a transreflective LCD, so maybe something's getting messed up with its light adjustment stuff. Anyways, just a thought...

  9. #9
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Brown View Post
    Yeah, I'm not seeing anything at all. I remember now that it's a transreflective LCD, so maybe something's getting messed up with its light adjustment stuff. Anyways, just a thought...
    How about the LED as mentioned/suggested in post #4?

    And one more thing...
    Are you using PicBasic or PicBasicPro?
    I know it looks like PicBasic, but you mentioned looking at the PBP manual...Which is it? What does the front of the manual say?

    And if you looked in the manual under LCDOUT for guidance on how to connect the LCD, why aren't you just using the LCDOUT command?
    Only two reasons I can think of off the top of my head...
    Last edited by skimask; - 12th June 2008 at 03:39.

  10. #10
    Join Date
    Mar 2005
    Posts
    7


    Did you find this post helpful? Yes | No

    Default

    Yeah I tried hooking up an LED and it lit up as it was supposed to. I'm using PicBasic. I used the LCDOUT schematic just because I thought it was the right way to hook up a parallel LCD and so that you guys could have a reference to my wiring.

  11. #11
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Brown View Post
    Yeah I tried hooking up an LED and it lit up as it was supposed to. I'm using PicBasic. I used the LCDOUT schematic just because I thought it was the right way to hook up a parallel LCD and so that you guys could have a reference to my wiring.
    But there's no LCDOUT in the PBC manual!

  12. #12
    Join Date
    Mar 2005
    Posts
    7


    Did you find this post helpful? Yes | No

    Default

    Hahaha sorry, I looked online at the PBP manual.

Similar Threads

  1. 16f688 LCD what have I done wrong
    By spitfiredriver in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 8th August 2009, 19:54
  2. Play with LCD on PICDEM
    By The IceMan in forum mel PIC BASIC
    Replies: 5
    Last Post: - 22nd August 2008, 16:56
  3. Need help with LCD number display.
    By Steve Matson in forum mel PIC BASIC
    Replies: 8
    Last Post: - 26th June 2007, 23:07
  4. LCD will not start
    By btaylor in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 24th May 2007, 02:30
  5. Dedicated LCD Controller question
    By chuckles in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 27th February 2006, 14:44

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