Need help with StampWorks LCD
Hi All.
I need help with the LCD that came with my StampWorks kit.
No matter what I do, I cn't get anything to display on the LCD. I connected the LCD to the PDB as instructed (there's only one way to do this). Then, I loaded the source for the LCD Demo program. The LCD doesn't show anything at all. If I turn the contrast all the way up, I can see 16 black square "cursor" characters on the upper line of the LCD, and nothing on the bottom. I tried entering the code by hand, but the result was the same. I triple checked the connections, but I can't find anything wrong.
Is there any way to see if it's the PDB that's the problem, or the LCD? Also, the StampWorks book says that the LCD needs 220 Ohm resistors on the IO lines, but the LCD documentation that's on the CD says they need 10KOhm resistors. That's quite a big difference. I'm not sure which number is correct, but I hope the ones built on to the PDB are correct.
The main reason I bought the Stampworks kit was because it included the LCD, so this is quite disappointing.
I need help with the LCD that came with my StampWorks kit.
No matter what I do, I cn't get anything to display on the LCD. I connected the LCD to the PDB as instructed (there's only one way to do this). Then, I loaded the source for the LCD Demo program. The LCD doesn't show anything at all. If I turn the contrast all the way up, I can see 16 black square "cursor" characters on the upper line of the LCD, and nothing on the bottom. I tried entering the code by hand, but the result was the same. I triple checked the connections, but I can't find anything wrong.
Is there any way to see if it's the PDB that's the problem, or the LCD? Also, the StampWorks book says that the LCD needs 220 Ohm resistors on the IO lines, but the LCD documentation that's on the CD says they need 10KOhm resistors. That's quite a big difference. I'm not sure which number is correct, but I hope the ones built on to the PDB are correct.
The main reason I bought the Stampworks kit was because it included the LCD, so this is quite disappointing.

Comments
Regards,
Dave
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Dave Andreae
Parallax Tech Support·
The PDB is Rev D
Here is the code I'm using:
' ========================================================================= ' ' File....... SW21-EX11-LCD_Demo.BS2 ' Purpose.... Essential LCD control ' Author..... (C) 2000 - 2005, Parallax, Inc. ' E-mail..... support@parallax.com ' Started.... ' Updated.... 15 AUG 2006 ' ' {$STAMP BS2} ' {$PBASIC 2.5} ' ' ========================================================================= ' -----[noparse][[/noparse] Program Description ]--------------------------------------------- ' ' This program demonstrates essential character LCD control. ' ' The connections for this program conform to the BS2p-family LCDCMD, ' LCDIN, and LCDOUT instructions. Use this program for the BS2, BS2e, ' or BS2sx. There is a separate program for the BS2p, BS2pe, and BS2px. ' -----[noparse][[/noparse] I/O Definitions ]------------------------------------------------- E PIN 1 ' Enable pin RW PIN 2 ' Read/Write RS CON 3 ' Register Select LcdBus VAR OUTB ' 4-bit LCD data bus ' -----[noparse][[/noparse] Constants ]------------------------------------------------------- LcdCls CON $01 ' clear the LCD LcdHome CON $02 ' move cursor home LcdCrsrL CON $10 ' move cursor left LcdCrsrR CON $14 ' move cursor right LcdDispL CON $18 ' shift chars left LcdDispR CON $1C ' shift chars right LcdDDRam CON $80 ' Display Data RAM control LcdCGRam CON $40 ' Character Generator RAM LcdLine1 CON $80 ' DDRAM address of line 1 LcdLine2 CON $C0 ' DDRAM address of line 2 #DEFINE _LcdReady = ($STAMP >= BS2P) ' -----[noparse][[/noparse] Variables ]------------------------------------------------------- char VAR Byte ' character sent to LCD idx VAR Byte ' loop counter ' -----[noparse][[/noparse] EEPROM Data ]----------------------------------------------------- Msg DATA "The BASIC STAMP!", 0 ' store message ' -----[noparse][[/noparse] Initialization ]-------------------------------------------------- Check_Stamp: #IF (_LcdReady) #THEN #ERROR "Please use BS2p version: SW21-EX11-LCD_Demo.BSP" #ENDIF DIRL = %11111110 ' setup pins for LCD PAUSE 100 ' let the LCD settle Lcd_Setup: LcdBus = %0011 ' 8-bit mode PULSOUT E, 3 PAUSE 5 PULSOUT E, 3 PULSOUT E, 3 LcdBus = %0010 ' 4-bit mode PULSOUT E, 1 char = %00001100 ' on, no crsr, no blink GOSUB LCD_Cmd char = %00000110 ' inc crsr, no disp shift GOSUB LCD_Cmd ' -----[noparse][[/noparse] Program Code ]---------------------------------------------------- Main: char = LcdCls ' clear the LCD GOSUB LCD_Cmd PAUSE 500 idx = Msg ' get EE address of message Write_Message: DO READ idx, char ' get character from EE IF (char = 0) THEN EXIT ' if 0, message is complete GOSUB LCD_Out ' write the character idx = idx + 1 ' point to next character LOOP PAUSE 2000 ' wait 2 seconds Cursor_Demo: char = LcdHome ' move the cursor home GOSUB LCD_Cmd char = %00001110 ' turn the cursor on GOSUB LCD_Cmd PAUSE 500 char = LcdCrsrR FOR idx = 1 TO 15 ' move cursor l-to-r GOSUB LCD_Cmd PAUSE 150 NEXT FOR idx = 14 TO 0 ' move cursor r-to-l by char = LcdDDRam + idx ' moving to a specific GOSUB LCD_Cmd ' column PAUSE 150 NEXT char = %00001101 ' cursor off, blink on GOSUB LCD_Cmd PAUSE 2000 char = %00001100 ' blink off GOSUB LCD_Cmd Flash_Demo: FOR idx = 1 TO 10 ' flash display char = char ^ %00000100 ' toggle display bit GOSUB LCD_Cmd PAUSE 250 NEXT PAUSE 1000 Shift_Demo: FOR idx = 1 TO 16 ' shift display char = LcdDispR GOSUB LCD_Cmd PAUSE 100 NEXT PAUSE 1000 FOR idx = 1 TO 16 ' shift display back char = LcdDispL GOSUB LCD_Cmd PAUSE 100 NEXT PAUSE 1000 GOTO Main ' do it all over ' -----[noparse][[/noparse] Subroutines ]----------------------------------------------------- LCD_Cmd: LOW RS ' enter command mode LCD_Out: LcdBus = char.HIGHNIB ' output high nibble PULSOUT E, 3 ' strobe the Enable line LcdBus = char.LOWNIB ' output low nibble PULSOUT E, 3 HIGH RS ' return to character mode RETURN▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
·
I've triple checked my code, which came right from the stampworks CD. I've triple checked my connections. No matter what I do, I can't get anything at all to happen with the LCD.
Have you tried adjusting the constrast knob? Sometimes if it's too far one way or the other, there will be no visible characters on the screen.
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Yes, I did try adjusting the contrast knob. In fact, that's the only way I'm able to see anything at all on the screen. If I turn the contrast all the way up, I can see the top row of characters become black. There are not any characters actually on the screen, but I see the entire top row become black squares where there would normally be characters.
With the contrast adjusted normally, I see absolutely nothing on the display.
There are two options at this point. One would be to use the documentation on the following page to determine if the LCD works when wired directly to the I/O lines. The other would be to send the LCD and PDB in and have it tested by us. Just to verify, you aren’t connecting any resistors are you?
http://www.parallax.com/detail.asp?product_id=603-00006
Note: The Stamp Works documentation and schematic uses a different enable pin than the code/example at the link above.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
No I am not connecting any additional resistors to the circuit.
Although I did find it strange that the LCD documentation at the link above (which is the same as the PDF doc that's on the StampWorks CD) and the StampWorks book list two different values for the resistors connected to the DB4, DB5, DB6, and DB7 lines. The LCD doc indicates that these lines use "All 10K" resistors, but the StampWorks book shows them as being 220 Ohm resistors. I can see from the PDB and the StampWorks book that these resistors are built into the PDB, but if I was to wire the LCD directly to the stamp, which resistors would I use? 10K or 220 Ohm?
Also, I'm not an expert (obvoiusly) with schematics, but it appears to me that the schematic on page 2 of the PDF document shows Pin1 of the LCD board connected to both VSS and "+5" which I assume is VDD. This seems like it would cause a direct short between VSS and VDD. Please correct me if I'm wrong.
It seems like there's lots of errors like this in the various Parallax products' documentation. I would like to assume that If·I fried something as a result of conflicting documentation, Parallax would replace it for me.
Back on topic, I'm leaning towards the LCD being bad, and not the PDB. Can I send you just the LCD and have you send me a replacement? If so, please let me know where to send it, RMA numbers, etc.
Thanks in advance...
Post Edited (moo2) : 9/24/2007 5:54:09 PM GMT
Looks clear to me.· There's a picture of the IDC-connector (App-Mod), the AppMod pin-out,·and an impeccable·circuit schematic.
Libelous Rubbish; Total Nonsense.
I think you stated the obvious problem when you wrote: ·
I sincerely hope that's an ill-timed attempt at sarcasm. If not, allow me to feed the trolls for a minute.
Yes, that is the one.
Correct. As I said, I'm referring to the schematic.
No, I'm not an expert, but I do know the difference between this:
And this:
Actually, the more times I read your post, the more I'm sure that you were joking. So, to that I'll say, touch'e....bravo!
So, where's the "short" then?
Post Edited (PJ Allen) : 9/25/2007 11:45:25 AM GMT
The red circle indicates a junction to both the "+5" coming in from the left, and VSS coming up from the bottom.· How can pin 1 be connected to both VSS and "+5" at the same time?
I suppose you think that the 220 Ohm resistors and the 10K Ohm resistors mentioned above are the same too, no?·How about the pinout of the LCD connector...The manual at http://www.parallax.com/dl/docs/prod/audiovis/lcd2x16par.pdf·lists DB6 at both pins 13 and pins 14...that's·perfectly OK to you, right?
Anyway, I'm not here to argue with you.· If you don't have anything constructive to add regarding why my LCD doesn't work, then just don't bother replying to this thread.
edit: the mistake I refer to is not in the schematic in the above posts, but in this diagram of the connector elsewhere in the documentation:
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Rick
Post Edited (RDL2004) : 9/26/2007 2:04:17 AM GMT
In the LCD documentation the resistors are connected as "pull downs" from the data lines to ground (Vss), in the StampWorks experiments they are connected as current limiting resistors, directly in line between the Stamp pins and the LCD pins. I'm not sure why both types are not present in both cases.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Rick