Hello Bill Legge,
I am curious, as I have not used these 40 x 4 LCDs, do you have to Define which Ebit to use before the LCDOUT statement when you change lines, since they seem to use the same address values?
Hello Bill Legge,
I am curious, as I have not used these 40 x 4 LCDs, do you have to Define which Ebit to use before the LCDOUT statement when you change lines, since they seem to use the same address values?
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.
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
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
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
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![]()
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.
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
Bookmarks