Parallel LCD problem with BS2p
Lloyds
Posts: 75
Hi,
I recently got a new BS2p40 and have wired up the Parallax parallel display (2x16) with the 14 pin ribbon cable per the documentation for the display (connects to pins P0,2,3,4,5,6,7, with 10k resistors, etc.) I downloaded the demo prog for the BS2p and all I get is a single line of 16 blocks. I saw this problem mentioned in the past but haven't seen where anybody has said exactly what they did to fix it.
Anybody have a suggestion?
Thanks,
Lloyd
I recently got a new BS2p40 and have wired up the Parallax parallel display (2x16) with the 14 pin ribbon cable per the documentation for the display (connects to pins P0,2,3,4,5,6,7, with 10k resistors, etc.) I downloaded the demo prog for the BS2p and all I get is a single line of 16 blocks. I saw this problem mentioned in the past but haven't seen where anybody has said exactly what they did to fix it.
Anybody have a suggestion?
Thanks,
Lloyd
Comments
Lloyd
The display comes connectorized with pin one identified with a red wire. I must be missing something. The contrast control works fine, if that is an indication of anything.
Here is the code I am using.
Any ideas?
Any ideas?
Thanks,
Lloyd
' =========================================================================
' File...... Parallel_LCD_2X16.bsp
' Purpose... Parallel LCD Display Demo
' Author.... Parallax, Inc.
' E-mail.... support@parallax.com
' {$STAMP BS2p}
' {$PBASIC 2.5}
'
[noparse][[/noparse] Program Description ]
' This program demonstrates using a Hitachi-compatible Parallel LCD Display
' This code works with the BS2p24, BS2p40, BS2pe and BS2px24
'
[noparse][[/noparse] I/O Definitions ]
Lcd PIN 0 ' LCD Enable Pin
'
[noparse][[/noparse] Variables ]
temp VAR Byte
char VAR Byte
'
[noparse][[/noparse] Initialization ]
Init_Lcd:
PAUSE 1000
FOR temp = 0 TO 2
LCDCMD Lcd, 48 ' Reset LCD (Send 3 times)
PAUSE 5 ' Delay Require By LCD Specs
NEXT
LCDCMD Lcd, 32 ' Set 4-bit Mode
LCDCMD Lcd, 40 ' Set 2-line Mode
LCDCMD Lcd, 12 ' Turn On Display With No Cursor
LCDCMD Lcd, 6 ' Set To Auto-Increment Cursor
LCDCMD Lcd, 1 ' Clear Display
'
[noparse][[/noparse] Main Routine ]
Main:
DO
LCDOUT Lcd, 1, [noparse][[/noparse]"Hello, this is"] ' Clear LCD & Print Line 1 Text
LCDOUT Lcd, 192, [noparse][[/noparse]"the LCD demo."] ' Move To Line 2 & Print Text
PAUSE 3000 ' Wait A Few Seconds
LCDCMD Lcd, 1 ' Clear LCD
PAUSE 500 ' Wait 1/2 Second
LOOP ' Do It Again
END
it could simply be your init_lcd routine, you're using a for-next routine which is placing a 5ms delay between each command. If you look at the sample code on page 251 of manual, it's 5 ms for the first command and then 0ms for the next 2.
Jon
I actually also tried the program on page 255 which has the 5,0,0 msec pauses, and the result was the same.
Thanks for the suggestion, though.
If the contrast control works, I'm guessing that the wiring is at least not totally wrong.
I'm still stumped, but your suggestion of a problem with the init routine sounds probable.
Lloyd
Are you sure it's not something silly like the Data lines not wired in reverse... or even on the wrong pins - you haven't got a LCD with backlight have you, which has 2 extra pins 15 & 16, and you have inadvertently wired the data lines to the backlight pins?
Jon
I will double check everything tonight and play with the Initialization settings.
Lloyd
Like not hooking up the enable connection??? LOL
Nothing like like buzzing the circuit out one last time even though you are POSITIVE its correct.
Thanks,
Lloyd
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Engineering
·
I'll use a little more care in buzzing things out next time.
Lloyd
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Engineering
·
I have a similar problem, but the first 8 blocks in the first and second rows are solid. I guess this is just the test pattern for this particular LCD.
I wired up the LCD to my BSII per this tutorial
http://www.parallax.com/dl/docs/prod/audiovis/lcd2x16par.pdf
I copied the code for the BSII and downloaded it, but nothing works. It's like it isn't even connected, but it is! The backlight works, the contrast works, but I just get a test pattern. I left everything hooked up, downloaded a simple led flash code and wired up an LED to see if my stamp wasn't dead. It worked fine. Last I pulled the stamp out of the board, and the LCD screen still stays the same. Clearly, the BSII isn't communicating with the LCD, but all my wires are there, so I don't know what to think.
Check your wiring.
Lloyd
That other program/schematic is for a bs2p, so it won't work.
If I can't get it running, oh well. My actual projects use AVRs; I just like testing new components that take some time to set up with my basic stamp, instead of writing an actual program. I'll get around to it someday.