LCD 4X40 Futurlec


Closed Thread
Results 1 to 23 of 23

Hybrid View

  1. #1
    Join Date
    Nov 2007
    Location
    South-West of Australia. A small town called Denmark. 'Where the forest meets the sea.'
    Posts
    136

    Default LCD 4X40 Futurlec

    I'm using PBP to drive a 4X40 LCD from Futurlec driven by a PIC16F877A at 20 MHz

    I've read all/most of the 4X40 posts but still have a problem:

    1. The LCD is marked JHD404A1 on the back.

    2. I think the spec sheet published by Futurlec is wrong - there is no indication of two ENABLES although the data addresses for lines 1/3 and 2/4 are the same ($80-$A7 and $C0-$E7)?

    3. On the JHD web-site there is a JHD404A that has different pin-outs and includes two ENABLES. Looks hopeful:

    Pin 1 -8 Data 7 to 0
    Pin 9 ENABLE1
    Pin 10 R/W
    Pin 11 RS
    Pin 12 Contrast
    Pin 13 Ground
    Pin14 +5
    Pin15 ENABLE2
    Pin16 NC
    Pin17 Backlight +
    Pin18 Backlight -

    But still won't work despite:

    1. Long delay to let LCD settle
    2. Going through all combinations of ENABLE 1/2 at initialisation
    3. Painstaking checking of wiring from LCD to PIC877A
    4. Checking of DEFINES for LCD (DEFINE LINES set at 2?)
    5. Xtal is 20 MHz and is also DEFINED
    6. Other 2 and 4 line LCDs work OK using the same PBP program

    Anyone else out there using this Futurlec 4X40 LCD with PBP code. I'd welcome advice/comments/code.

    I may have missed some previous post but have searched this site all morning?

    Regards Bill Legge

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


    Did you find this post helpful? Yes | No

    Default

    2. Going through all combinations of ENABLE 1/2 at initialisation
    How are you controlling the enable lines?
    External circuit?

    Which pins of the databus are you using?

    What's connected to the Contrast pin?

    Which pins of the PIC are you using?

    What DEFINES's are in your program?
    <br>
    DT

  3. #3
    Join Date
    Nov 2007
    Location
    South-West of Australia. A small town called Denmark. 'Where the forest meets the sea.'
    Posts
    136


    Did you find this post helpful? Yes | No

    Default

    DT,

    Thanks for a speedy reply. I'm using a MikroElektronica EasyPIC5 developement board and my Futurlec 4X40 LCD is connected to the PORTB pins as indicated by the following code (How do you post code here?):

    DEFINE OSC 20
    DEFINE LCD_DREG PORTB
    DEFINE LCD_DBIT 0
    DEFINE LCD_RSREG PORTB
    DEFINE LCD_RSBIT 4
    DEFINE LCD_EREG PORTB
    DEFINE LCD_EBIT 5
    DEFINE LCD_BITS 4
    DEFINE LCD_LINES 2
    DEFINE LCD_COMMANDUS 2000
    DEFINE LCD_DATAUS 50
    PAUSE 1000
    LCDOUT $fe,$80, "Line 1 & 3"
    LCDOUT $fe,$c0, "Line 2 & 4"

    Here: goto here

    END


    The ENABLE1 goes to PORTB.5 (as DEFINed) and I've grounded ENABLE2. I have also tried reversing ENABLE1 and 2.

    The contrast pin is connected to the wiper of a 10k variable resistor that sits between GROUND and +5.

    The contrast adjustment 'sort of works' but has variable effects each time I programme the PIC.

    my guess for the problem is:
    1. A wiring error on my part but I have done a careful job and checked the result 'pin to pin' with a continuity test.
    2. I've got the wrong pin-out for the Futurlec 4X40 LCD (I'm convinced that the spec sheet on Futurlec's US site is NOT the correct one.
    3. I'm doing something wrong with ENABLE 1 and 2.
    4. So far all I get on the LCD are black squares.

    Someone must have got the Futurlec 4X40 LCD working - I hope

    Regards Bil Legge

  4. #4
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default

    From the datasheet I have seen (link below) this 4x40 LDC has only one enable pin.(This is the only 4x40 that I have seen)

    http://www.futurlec.com/LED/LCD40X4BL.shtml


    Black square most of the times appear when you have a wrong contrast setting

    (you should have a pot with the center tap connected to pin 3 to adjust the contrast)

    Al.
    All progress began with an idea

  5. #5
    Join Date
    Nov 2007
    Location
    South-West of Australia. A small town called Denmark. 'Where the forest meets the sea.'
    Posts
    136


    Did you find this post helpful? Yes | No

    Default 4X40 LCD From Futurlec

    Aratti,

    Thanks for your reply.

    1. the centre tap of the pot is connected to the contrast pin and does affect the contrast of the display but in an intermittant fashioin that changes with programming the PIC - It seems as if I've got the pin-out wrong, hence my concern that the data sheet on the Futurlec site is not the correct one.

    2. I agree with you that the Spec sheet of the 4X40 LCD on the Futurlec USA site shows only one ENABLE pin but it also shows rows 1/3 and 2/4 as having the same addresses (starting at $80 and $C0) - this would only work if there were separate ENABLE pins for lines 1/3 and 2/4.

    3. On the JDH site I can't find the JDH404A1 but the JDH404 and the JDH404A both show two ENABLE pins - hence my concern that the vendor's (Futurlec) spec sheet is wrong.

  6. #6
    Join Date
    Jul 2006
    Location
    USA
    Posts
    26


    Did you find this post helpful? Yes | No

    Default

    I mainly use Optrex displays and never have problems with them.
    Maybe I've been lucky, but I just thought I would mention it.

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. 4x40 LCD control problem
    By NL2TTL in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 5th January 2005, 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