View Full Version : Propeller / Serial LCD Problem
08-30-2007, 03:44 AM
I am new to the propeller and am having a problem.
Going through the demo programs and trying to learn the system.
Using demo program, "Debug_lcd_Test.spin"
Using Propeller Demo Board, Rev F.
Connected to the Parallax 4x20· Serial LCD "item # 30058".
No changes·were made·to the LCD or demo program. The LCD displays trash.
Connected to Scott Edwards BBP-420 V4.0 4x20 Serial LCD
Changed Baud to 9600 in demo program. The LCD displays trash.
Both displays connected to my PCs serial port pin #3·and they work just fine.
Have I missed something in the spin demo. Demo's normally work very well and
are good teachers.
Both displays work with the BS2.
Thanks for any help.
08-30-2007, 08:33 AM
Can you post a photo of your set-up?
08-30-2007, 08:49 AM
The demo board doesn't have RS232 so how are you connecting it? Logic level? You will probably need to invert the tx signal either in hardware or very simply in software in the putc routine. This might be one way to do it by using a inverted boolean assignment like this (I think)
outa[tx] <>= (txbyte >>= 1) & 1 ' output bit (true mode)
08-30-2007, 11:53 AM
I believe that the "Debug_lcd_Test.spin" uses P0 as the serial output and the Parallax LCD display should accept the serial·output from the the Propeller P0 pin.
I assume that you have compiled "Debug_lcd_Test.spin" with all of the required objects·shown in the Readme.txt?
If you are going to send·a Robot·to save the world, you·better make sure it likes it the way it is!
08-30-2007, 05:28 PM
Thank you very much for all of the help!
I will look into these ideas and continue to track down the problem.
Peter, you are correct I am using P0 as the serial output pin.
just as stated in the DOC's.
I will take the data stream apart coming out of P0 with the scope.
I assumed the demo would be plug and play.
Thanks for all your post and helpful ideas, I hope I will be able to return the kind deed.
Keep on pushing
08-30-2007, 08:12 PM
Ok, as I have now looked at the data for the lcd you mentioned I can see where you are going wrong. By default the lcd is setup to interface to RS-232 which indeed works. You have to set the option jumper to make it work with TTL levels which are inverted (idles high). The lcd manual says:
"The LK204-25 provides a DB-9 Connector to readily interface with serial devices which use the EIA232
standard signal levels of §12V to §12V. It is also possible to communicate at TTL levels of 0 to +5V by
setting the Protocol Select Jumpers to TTL."
You made an "assumption" (a terrible sin which we are all guilty of from time to time) that the demo would work with this lcd. Most other serial lcds are ttl level but the one you picked is RS-232. You should have tweaked to the fact that it worked straight off the PC but not off the demo board, the DB9 connector is also a give-away. In fact, if it was the 2x16 lcd (#27976) then it would not work straight off the PC and you might have damaged it if you had done so.
08-31-2007, 02:45 AM
Thanks very much Peter!
Sometime you just can't see the forest for the trees.
I will change the input to TTL and retest.
I will post the results!
Again, thanks for all of the input.