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
Bookmarks