How do you drive a Serial LCD in PBP? Do you use the DEBUG command? Also, do Serial LCDs recognize the 0xFE character to set the LCD "RS" bit to 0 for the next character?
TIA Gentlemen. Happy Holidays everyone.
Cheerful regards, Mike
How do you drive a Serial LCD in PBP? Do you use the DEBUG command? Also, do Serial LCDs recognize the 0xFE character to set the LCD "RS" bit to 0 for the next character?
TIA Gentlemen. Happy Holidays everyone.
Cheerful regards, Mike
Hi Mike,
You can use DEBUG, SEROUT, SEROUT2 or HSEROUT. DEBUG generates the smallest code but is the least flexible one. As for recognizing 0xFE you'd have to check the datahseet/manual for the particular serial LCD you're using regarding how you switch between command and data. I imagine they can have slightly different features/command sets depending on manufacturer etc.
/Henrik.
This data sheet has a Basic Stamp example
http://www.seetron.com/docs/bpp440mnl.pdf
Dave
Always wear safety glasses while programming.
Hi Henrik,
But which of those functions would provide the most compatibility with the LCDOUT command? I assumed you would use DEBUG because it has data formatting options which are similar to LCDOUT.
What I'm trying to do is make a Serial LCD Backpack that would easily support PBP and I thought that if my LCD Backpack recognized the 0xFE character it might make it easier to take an existing PBP program and convert it for use with the Serial LCD Backpack by swapping out the LCDOUT keyword with the DEBUG keyword (leaving instruction operands intact).
Cheerful regards, Mike
Dave
Always wear safety glasses while programming.
Aah, you're MAKING one, OK.
That would be DEBUG, SEROUT2 and HSEROUT as they all support the same modifiers such as DEC, SDEC etc. DEBUG produces smaller code since its parameters are set at compiletime (with DEFINEs) while SEROUT2 uses runtime setable parameters.
For your backpack, select a PIC with USART and use HSERIN to capture the incomming data. Check mackrackits link as well!
Henrik,
Thank you! That's the info' I was looking for.
This version of my Serial LCD Backpack uses a 12F683 and an assembly language program. While building a prototype board a couple weeks ago for the new 8 pin, 14 pin, and 20 pin "enhanced" mid-range devices, I decided to add my old Serial LCD Backpack circuit onto the extra space at the bottom of the board (see silkscreen below). In the picture below, a 16F1823 is driving the backpack circuit at 57600 baud (one pin "overhead" on the 16F1823).For your backpack, select a PIC with USART and use HSERIN to capture the incoming data.
I checked the link (thanks Dave) but it's not really what I was looking for.Check mackrackits link as well!
Thanks guys... Happy Holidays!
Cheerful regards, Mike
OOPs my bad posted what Dave did. It does use the LCDOUT syntax though . . .
Last edited by Archangel; - 4th December 2011 at 09:30.
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.
Hey Mike K8LH,
Nice looking board... I have several of the 12F683 PIC's laying around and a couple of LCD's that they would go nicely with... I am amazed that you had enough pins to drive the LCD and receive serial data.
would you be willing to share your schematic and code??
Thanks in advance
Dwight
These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.
Hi Dwight,
I attached the schematic below but I'm afraid the interface in its present form is not very PBP friendly. It was the only way I knew of at the time to control six (6) pins on an LCD with only five (5) PIC output pins. That means you have to drive the display by sending two serial bytes for each LCD byte, each serial byte containing four data bits and an RS bit.
The new design that I'm working should be done soon. It uses full eight bit bytes and recognizes the $FE character (for toggling an RS flag).
Regards...
Bookmarks