LCD 4X40 Futurlec


Closed Thread
Results 1 to 23 of 23

Hybrid View

  1. #1
    Join Date
    Mar 2008
    Location
    Gerogetown, Texas
    Posts
    94


    Did you find this post helpful? Yes | No

    Default

    Here is some code I used to control the 4x40 display. This is just the LCD part that demonstrates the enable selection
    Code:
    '**** LCD *******************************************************
    'Set LCD Data port
    DEFINE LCD_DREG PORTB
    'Set starting Data bit (0 or 4) if 4-bit bus
    DEFINE LCD_DBIT 4
    'Set LCD Register Select port
    DEFINE LCD_RSREG PORTB
    'Set LCD Register Select bit
    DEFINE LCD_RSBIT 0
    'Set LCD Enable port
    DEFINE LCD_EREG PORTB
    'Set LCD Enable bit
    DEFINE LCD_EBIT 3
    'LCD RW Register PORT
    'DEFINE LCD_RWREG PORTB
    'LCD read/write pin bit
    'DEFINE LCD_RWBIT 5
    'Set LCD bus size (4 or 8 bits)
    DEFINE LCD_BITS 4
    'Set number of lines on LCD
    DEFINE LCD_LINES 4
    'Set command delay time in us
    DEFINE LCD_COMMANDUS 2000
    'Set data delay time in us
    DEFINE LCD_DATAUS 50
    
    LCD1_Disable    var portb.2
    LCD2_Disable    var portb.1
    '*** Program variables *****************************************
    
    
    
    lcdcnt     var  byte
    lcdlen     var  byte
    lcdline var byte
    lcd var byte
    lcdfunction var byte
    
    
    '***************************************************************
    
    ' Initialize LCD
    input LCD1_Disable 
    input LCD2_Disable 
    LCDOut $fe,1   'clear lcd
    pause 100
    LCDOut $fe,2   'home
    LCDOut $fe,$0c 'Curser off
    LCDOut "              USB 4X40 LCD   "
    LCDOut $FE,$C0
    LCDOut "              DAVE CUTLIFF    "
    low LCD1_Disable 
    input LCD2_Disable 
    LCDOut $fe,1   'clear lcd
    LCDOut $fe,2   'home
    LCDOut $fe,$0c 'Curser off
    LCDOut "         Highspeed USB Project  "
    LCDOut $FE,$C0
    LCDOut "             August 2005    "   
    pause 100
    goto idleloop

  2. #2
    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 futurlec display

    1. Joe S. I have not been able to get my 4X40 LCD to work - so I'm hardly the fellow to give you advice. However, I think you are right and the 4X40 is built like two 2X40 displays that have separate ENABLE pins and the rest are common. I presume one simply swaps from ENABLE1 to ENABLE2 according to what needs to be displayed.

    2. The new pin-out from Futurlec is NOT the correct one (Futurlec sheet is for a device 4004 and mine is a JHD404A1 with a different number of pins.) Adjusting/guessing the connections has yielded only fleeting black blobs - and yes, I do know that black boxes may be caused by too high contrast setting.

    3. I'm a bit irritated that Futurlec is selling a $40 odd LCD device and can't publish the correct spec sheet - and it's not to be found on the internet. There are quite a few different pin-outs for other 4X40 LCDs but none seem to work on the JHD404A1.

    4. Anyone go it to work? Futurlec must have sold a fair number of thes LCDs

    Regards Bill Legge

  3. #3
    Join Date
    Mar 2005
    Location
    Iowa, USA
    Posts
    216


    Did you find this post helpful? Yes | No

    Default

    Bill - If it does happen to have 2 controllers, here is an excellent way to control it.
    http://www.picbasic.co.uk/forum/showthread.php?t=626

    Hope it helps.
    Wisdom is knowing what path to take next... Integrity is taking it.
    Ryan Miller

  4. #4
    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 Display

    Rhino,

    Thanks for the info. I have got a different 4X40 (DisplayTech LTd closing down sale for $5, how's that for a bargain) and - IT ALL WORKS OK - along with the code/circuits for driving two ENABLE pins.

    I would still like to track down the pin-out for the Futurlec JHD404A1 if anyone out there has the info.

    Regards Bill Legge

  5. #5
    Join Date
    Aug 2006
    Location
    Omaha, Nebraska USA
    Posts
    263


    Did you find this post helpful? Yes | No

    Thumbs up

    I use a lot of Crystalfontz displays with good (great!) success.

    http://www.crystalfontz.com/
    Russ
    N0EVC, xWB6ONT, xWN6ONT

    "Easy to use" is easy to say.

  6. #6
    Join Date
    Jan 2009
    Posts
    4


    Did you find this post helpful? Yes | No

    Default Futurlec LCD working now

    Hello,

    I managed to get the Futurlec 4 x 40 LCD working. In my case, I did this with a BASIC Stamp. I hope I'm not escorted to the door from this forum. I found this forum to find a solution for communicating with an LCD. See attached photo.

    Bill's initial thread actually had the correct pin assignments that were the key to getting me started, although the Futurlec LCD has no pins 17 & 18. Internet research had consistent documentation on 4 x 40 LCD with two rows of pins having different assignments than those posted on Futurlec's site. Those are clearly WRONG! Also, A and K connections are for the back light and are straightforward.

    The second challenge was understanding how to address the 3rd and 4th lines on the display. My experience with LCD displays was limited to 2 x 16 and 4 x 20 serial units that have an entirely different way to address the screen coordinates. The 3rd and 4th lines are addressed with the second enable pin. This forum clued me in on that .. thank you. So I had to initialize both controllers in the LCD and communicate with the device as basically a stack of two 2 x 40 LCDs in one unit. The LCDCMD command in PBASIC allows me to address a set of pins in 4 bit mode while allowing some flexibility on which pin is the enable pin. This permitted me to address both sets of lines by adding the one additional connection to the LCD for the extra enable connection.

    I am not versed on PIC language, but I'm sure it's doable if I've done it with the BASIC Stamp.... code attached.

    Rick
    Attached Images Attached Images  
    Attached Files Attached Files

  7. #7
    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 futurlec display

    Rixter,

    Thanks for your message and I'm pleased to learn that the pin-outs in the first post are correct. I must have made some wiring error because they would not work for me? I will have another go.

    I have, since then, got some different 4X40 LCDs, with correct tech details, and they work well using the method posted by RHINO - a couple of resistors on the two ENABLE pins and a bit of code.

    One mistake that took me a long time to find was using the PBP command "CLEAR" after the definition on the LCD1-Enable and LCD2-Enable pins - the CLEAR command clears the definition:

    This won't work:
    LCD1-Enable VAR PORTD.1
    LCD2-Enable VAR PORTD.2
    CLEAR

    This will work:
    CLEAR
    LCD1-Enable VAR PORTD.1
    LCD2-Enable VAR PORTD.2

    Good luck - get off the Basic Stamps and into PICs soonest!

    Regards Bill Legge

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