Hi,
The LCD is a 2x8 display. I've used 2 of the same brand "Crystalfontz", but haven't tried a different brand. Maybe that could be the problem. I hope not, cause I like the ones they have.
Hi,
The LCD is a 2x8 display. I've used 2 of the same brand "Crystalfontz", but haven't tried a different brand. Maybe that could be the problem. I hope not, cause I like the ones they have.
Well, 4 years later and I'm not much smarter and I still have the same problem. :-) Since zero is considered a terminator for a string, I guess this has something to do with the issue? Is there some way to tell PBP to use some other character as the terminator? Really strange that no one else has this issue. The display is a crystalfontz CFAH0802A-YYH-JP. Any ideas would sure be apreciated.
Gary
Last edited by g-hoot; - 13th May 2008 at 22:07.
Thanks for the code. I gave it a try, but still no go, the LCD stills goes blank as soon as a number ending in zero is displayed. I'm guessing something to do with zero being a "terminator". Not real sure what that means. The LCDout command above uses a bunch of code. I have to delete a bunch of text out of other LCDout commands to get it to compile using:
LCDout $fe, $80, DEC5 i
instead of
LCDout #i
Gary
Just use the code in the post above, and only that code, nothing else (except for maybe some initialization code)The LCDout command above uses a bunch of code. I have to delete a bunch of text out of other LCDout commands to get it to compile using:
LCDout $fe, $80, DEC5 i
instead of
LCDout #i
Gary
What else are you running, or trying to run at the same time?
It sounds to me like you've got other things going that we're all not able to see for some reason or another. All this talk about a 'terminator' basically doesn't really apply. There is no real 'terminator' to speak of like a 'null' when using strings in VB or the like.
What version of PBP are you using?
OK, I did just the code below. I added the Pause 500 to see what it was doing, and still get a blank screen on each number ending in zero.
LCDONOFF VAR PORTB.7
High LCDONOFF
i VAR WORD
For i=0 TO 10000
LCDOut $fe, $80, DEC5 i
Pause 500
Next i
The reason that I got hung up on the terminator thing is becasue I am storing as much string data as I can in EEPROM, and then I loop through and do a READ 8 times (2x8 LCD) to get the string. Somehow, like magic :-), when it hits the zero on the strings that are less that 8 characters, it knows that's the end of the string. Here is part of how i have it layed out:
EEPROM 36,["1",".","5"," ","S",0] '1.5 S
EEPROM 42,["1","5"," ","S",0] '15 S
EEPROM 47,["2","0"," ","S",0] '20 S
EEPROM 52,["1"," ","M",0] '1 M
EEPROM 56,["2"," ","M",0] '2 M
EEPROM 60,["5"," ","M",0] '5 M
EEPROM 64,["V","e","r","y","H","i","g","h"]
EEPROM 72,["S","l","a","v","T","e","s","t"]
<B>I use the melabs programmer version 3.31 (it also did this on an older version that I used to use). I write the code in CodeDesigner Lite and PBP is version 2.46a. Oh, and the chip is a 16F648A.</B>
Thanks,
Gary
Last edited by g-hoot; - 14th May 2008 at 14:30.
Hi Gary,
can you see the '0's preceeding the numbers you are displaying? i.e.
00001
00002
00003
.......
0001 - where 0 is not shown as it's the end number
00011
00012
Is this how it's displaying on your screen or is it more like:
00008
00009
- where no numbers at all are displayed
00011
00012
Cheers
Rob
Bookmarks