LCD Problem


Closed Thread
Results 1 to 16 of 16

Thread: LCD Problem

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    Hi Sphere,
    Here is what I would do to troubleshoot: Change the comment on line 1 so you can tell if
    it is scrambling the comment and printing it or if it is simply printing the last 8 characters
    of line 1 on line 2. It maybe you will have to define commandus and Dataus for this particular LCD
    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
    Aug 2005
    Posts
    95


    Did you find this post helpful? Yes | No

    Default

    Ive altered LCD_COMMANDUS & LCD_DATAUS from one extreme to another and I either get nothing on the display, corrupt display or the same result as before.

    Would wiring all of the data pins on the lcd make a difference or have I just got a duff lcd.


    Thanks Sphere.

  3. #3
    Join Date
    Jun 2005
    Location
    Up the bush, Western Plains, NSW Au
    Posts
    216


    Did you find this post helpful? Yes | No

    Default

    Have you included a defines list like below?
    Note the lines define in the 10th line should be for 4 lines

    Define LCD_DREG PORTb ' Port for LCD Data
    Define LCD_DBIT 4 ' Use upper 4 bits of Port
    Define LCD_RSREG PORTb ' Port for RegisterSelect (RS) bit
    Define LCD_RSBIT 0 ' Port Pin for RS bit
    Define LCD_EREG PORTb ' Port for Enable (E) bit
    Define LCD_EBIT 2 ' Port Pin for E bit
    DEFINE LCD_RWREG PORTb 'port for the R/W bit
    DEFINE LCD_RWBIT 1 'port pin for R/W bit
    Define LCD_BITS 2 ' Using 4-bit bus
    Define LCD_LINES 4 ' Using 4 line Display **************************
    Define LCD_COMMANDUS 2000 ' Command Delay (uS)
    Define LCD_DATAUS 50 ' Data Delay (uS)
    Peter Moritz.
    Up the bush, Western Plains,
    New South Wales,
    Australia.

  4. #4
    Join Date
    Aug 2005
    Posts
    95


    Did you find this post helpful? Yes | No

    Default

    Tried adding the defines but no joy, still the same result. Ill just wire all the data pins up and see if that works. If no joy ill just resign it to the scrap bin of life.

    Thanks all Sphere.

  5. #5
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Sphere View Post
    Ive altered LCD_COMMANDUS & LCD_DATAUS from one extreme to another and I either get nothing on the display, corrupt display or the same result as before.
    Keep in mind that LCD_DATAUS is a byte value. Max is 255. 256 would be treated just like a 0. LCD_COMMANDUS is still a word value.

    Would wiring all of the data pins on the lcd make a difference or have I just got a duff lcd.
    Of course wiring would make a difference.
    Looks to me like you've got some crossed wires and/or solder joints.

  6. #6
    Join Date
    Aug 2005
    Posts
    95


    Did you find this post helpful? Yes | No

    Default

    Wired all data lines but still have the same issue, but it looks like it treats lines 1 & 2 as line one and lines 3 & 4 as line two. Is there any limitation in picbasic pro's lcdout command for this type of display. The display type is Batron BTHQ42003AV, ive ordered a replacement anyway just in case this one is faulty.

    Thanks Sphere.
    Last edited by Sphere; - 14th May 2008 at 22:41.

  7. #7
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Sphere View Post
    Wired all data lines but still have the same issue, but it looks like it treats lines 1 & 2 as line one and lines 3 & 4 as line two. Is there any limitation in picbasic pro's lcdout command for this type of display. The display type is Batron BTHQ42003AV, ive ordered a replacement anyway just in case this one is faulty.
    Would've been a lot more helpful to have the model information a lot earlier.
    The model you've got has a controller that isn't 100% Hitachi 44780 compatible.
    Seems it likes to work in blocks of 12...which would probably explain your issues.
    In the case of this LCD, the standard 1st line ($80), 2nd line ($C0), 3rd line ($94), 4th line ($D4) addresses aren't going to work.
    Here's the link to the datasheet:
    http://www.datasheetcatalog.com/data...6712UA02.shtml
    Read thru it a bit. You may/may not see what I mean...specifically page 364, 384, and 419.
    Last edited by skimask; - 14th May 2008 at 23:37.

  8. #8
    Join Date
    Aug 2005
    Posts
    95


    Did you find this post helpful? Yes | No

    Default

    Is the display not compatable with pic basic and do you know what the EXT pin is.

    Thanks Sphere.

  9. #9
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Sphere View Post
    Is the display not compatable with pic basic and do you know what the EXT pin is.

    Thanks Sphere.
    I'd say it's 'compatible enough', it just needs different parameters than what the PBP manual calls for.
    From the quick read I did of that datasheet (the rest is up to you), it looks to me like the left 12 characters can be accessed normally, like it was a regular 12x4 display. But to get to the right 8 characters, you have to use that pin in some way.
    It's either that or write your own routines to handle the display...

Similar Threads

  1. LCD problem with 16F628
    By ngeronikolos in forum mel PIC BASIC Pro
    Replies: 25
    Last Post: - 19th September 2016, 08:28
  2. Newbie? Problem with LCD
    By lew247 in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 7th December 2009, 19:48
  3. LCD problem
    By Andre_Pretorius in forum General
    Replies: 8
    Last Post: - 27th January 2009, 15:47
  4. LCD Problem
    By karenhornby in forum General
    Replies: 3
    Last Post: - 19th June 2008, 11:43
  5. Need help with LCD number display.
    By Steve Matson in forum mel PIC BASIC
    Replies: 8
    Last Post: - 26th June 2007, 23:07

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