I don't see any "DEFINE LCD" entries to tell PBP where you wired the LCD. Unless you wire to the default lines you'll get a blank just that: a blank display.
Check pg 95 of the manual under LCDOUT.
I don't see any "DEFINE LCD" entries to tell PBP where you wired the LCD. Unless you wire to the default lines you'll get a blank just that: a blank display.
Check pg 95 of the manual under LCDOUT.
It is wired default........... and it works fine with simple LCDOUT "hello"
or the following (NNW) in large 4 line tall font.. just need help getting my first question answered, how to port the code, that was written for BS2 to PBP?
i couldnt use nibble (WHY IS THERE NO NIBBLE IN PBP?), forcing me to break
pat into 16 bits rather than 4 nibbles (pat.nib3,pat.nib2,pat.nib1,pat.nib0)
THIS WORKS FINE, LCD IS WIRED IN DEFAULT.
sub1:
LCDOUT CMD, LcdCls ' Clear the LCD
PAUSE 1
LCDOUT CMD, LcdLine1 + 3, 6,1,7,6,7,6,1,7,6,7,6,7,7,6
LCDOUT CMD, LcdLine2 + 3, 6,2,1,6,7,6,2,1,6,7,6,7,7,6
LCDOUT CMD, LcdLine3 + 3, 6,7,2,6,7,6,7,2,6,7,6,0,1,6
LCDOUT CMD, LcdLine4 + 3, 6,7,7,6,7,6,7,7,6,7,6,3,2,6
RETURN
If i understand your 'nibble' stuff...
Code:WordA Var Word Nibble1 Var Byte Nibble2 Var Byte Nibble3 Var Byte Nibble4 Var Byte WordA=$1234 Nibble1=WordA.Highbyte>>4 Nibble2=WordA.Highbyte&$0F Nibble3=WordA.LowByte>>4 Nibble4=WordA.Lowbyte&$0F
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Sorry i didnt explain that the code was originally written for a basic stamp,
hence the nibble sized variable in question. the code is for displaying large charaters on a 4x20 serial LCD or serial backpack equiped LCD. the code writes custom characters to the LCD, then arranges them to make the large 4 line tall numbers (0-9). all this was spit out serially to the LCD. I changed all the serouts in the origonal code to LCDOUT in proper PBP form, but since PBP doesnt have a nibble sized variable, only bytes and words, the WORD sized variable "pat" can't be broken into 4 NIB's (i.e pat.NIB0) like it will let you in pBasic. it can only do two bytes or 16 bits.. i think that is the reason my version of the code (from my first post) isnt working. all i get is a blank LCD.. it would be nice to use this code to display large numbers because it only takes up about 600 WORDs, i've done a version that displays the 16 compass points (NNW) in large text using the first part of this code to write the custom bit patterns to my LCD's CGRAM, but it takes up 3397 WORDs using BRANCH to a subroutine for each compass point which is spelled out in my second reply, anyway, the original code is at:
http://www.seetron.com/pdf/lcd_an1.pdf
and as you can see it is written for pBASIC and meant for serial LCD's, i want to convert it to PBP for a parallel LCD..
Hey Ryan,
mister_e's concept is correct, you just need to put it into the LCDOUT statement.
LCDOUT Nibble1, Nibble2, Nibble3, Nibble4
or you can just put it all in there in one shot...
LCDOUT pat.Highbyte>>4, pat.Highbyte&$0F, pat.LowByte>>4, pat.Lowbyte&$0F
<br>
DT
Still just a blank LCD, I expected to get at least some garbage on the display. anyone got any other idea's what might be wrong? I added:
LCDOUT "TEST"
PAUSE 1000
LCDOUT $FE, 1
to the code just before the demo loop part and it display's correctly and then clear screens, so i guess its not totally blank, but it doesn't do much else.
I also tried hooking the LCD to my BS2p and ran my modified version of the code using LCD out in proper pBasic format and it sorta worked but only displayed the bottom 1/4 of the numbers all shifted up to the top line. like what should be displaying on the 4th line of the LCD was showing on the top line and all the rest was off screen.
There's few missing details here
OSC type & speed (4,8,16,20.... or internal)
LCD DEFINEs
Config Fuses
Schematic
Did you added ?
DEFINE LCD_LINES 4
You can also use LCDOUT $fe,1,"Hello"
Some LCD may need some COMMANDUS and DATAUS fine tuning too.
Last edited by mister_e; - 12th October 2006 at 07:22.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks