I think you talk about...
I think you talk about...
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
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.
Man, this thing is a pain in the booty. Using eeprom works great until i get more that about 30 characters saven in it. Then my LCD just displays black rectangles/blanks. If I delete all of the charcters from eeprom and just leave about 50, it works fine? I dunno, maybe the pic nees a pause somewhere at startup to read the eeprom? Here's the sub:
EEtext:
LCDtextNm = 0
For EEnum = EEnum TO EEnum+7
Read EEnum, LCDtext[LCDtextNm]
LCDtextNm=LCDtextNm+1
Next EEnum
LCDOut STR LCDtext
Return
this one is dangerous and you trick the compiler
doing that you'll jump in an endless loop. i don't know what's around your sub but i think this one make much senseCode:For EEnum = EEnum TO EEnum+7
Code:EEtext: For CharAddress = EEnum TO EEnum+7 Read CharAddress, Char LCDOUT Char Next Return
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
This is getting plain silly. If I have this:
EEPROM 30,["R","e","a","d","y"," "," "," "]
EEPROM 38,["D","e","l","a","y"," "," "," "]
EEPROM 46,["1","5"," ","S","e","c"," "," "]
EEPROM 54,["2","0"," ","S","e","c"," "," "]
The run through the sub:
EEtext:
LCDtextNm = 0
EnumC = EEnum
For EEnum = EnumC TO EnumC+7
Read EEnum, LCDtext[LCDtextNm]
LCDtextNm=LCDtextNm+1
Next
LCDOut STR LCDtext
Return
Ready will display, but the other 3 strings produce a blank screen. If I replace the "e" in ready with a space " " then it works fine, except for the fact that it now says "R ady". ;-) I have had lots of strange happenings with the LCD, like for instance, I can't display a number ending in "0". Also can't display the name "MCKELLOP". Who knows?....
Gary
Hold the phone! I added a Pause 10 right after the Read statement and it seems to be working now.
G-HOOT!
I like that handle, sounds very celtic, anyway on to business . . .
I was curious, about the quantity of text strings you are attempting to store and recall, and how you intend to call them up, also curious what chip you chose to use. I made up a device which does essentialy this and I stored all my strings in codespace, using a 16f648A. In fact I still have not used eprom in a project yet. Still mastering the basics.
JS
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.
Hmm, the 16f648A is what I'm using too, since that's as much memory as I can find in an 18 pin chip, but I read that to do the code space thing, that you have to enable "Flash Program Write", but that option is disabled when I choose that chip? Maybe I got that mixed up with something else I was reading about. If I do another board layout, I'm going with probably the 16f916. It has more pins and I think it was 8K of memory. Also, there are several others that I can swap out with it to get a ton of memory if needed....Live and learn. Let me show you what you guys have helped me do though. I have went from way out of space down to 3344 words.
Here's the EEPROM statements:
EEPROM 0, [1,1,10,0,0,0,24,1,1,150,0,250,0,1,1,0]
EEPROM 30,["R","e","a","d","y",0]
EEPROM 36,["D","e","l","a","y",0]
EEPROM 42,["1","5"," ","S","e","c",0]
EEPROM 49,["2","0"," ","S","e","c",0]
EEPROM 57,["1"," ","M","i","n","u","t","e"]
EEPROM 65,["2"," ","M","i","n","u","t","e"]
EEPROM 73,["5"," ","M","i","n","u","t","e"]
EEPROM 81,["E","n","t","e","r",0]
EEPROM 87,["A","c","t","i","v","i","t","y"]
EEPROM 95,["D","b","l","e"," ","P","i","c"]
EEPROM 103,["S","e","n","s","t","v","t","y"]
EEPROM 111,["H","i","g","h",0]
EEPROM 116,["M","e","d","i","u","m",0]
EEPROM 123,["L","o","w",0]
EEPROM 127,["D","a","y","N","i","g","h","t"]
EEPROM 135,["2","4"," ","H","o","u","r"," "]
EEPROM 143,["D","a","y"," ","O","n","l","y"]
EEPROM 151,["D","a","r","k","O","n","l","y"]
EEPROM 159,["W","a","l","k","T","e","s","t"]
EEPROM 167,["S","t","r","t","W","a","l","k"]
EEPROM 175,["E","x","i","t",0]
EEPROM 180,["C","a","m"," ","T","y","p","e"]
EEPROM 188,["O","N","/","O","F","F","-","1"]
EEPROM 196,["O","N","/","O","F","F","-","2"]
EEPROM 204,["A","l","w","a","y","s","O","n"]
EEPROM 212,["R","e","f","r","e","s","h"," "]
EEPROM 220,["S","h","u","t","t","e","r"," "]
EEPROM 228,["S","l","v","R","f","r","s","h"]
EEPROM 236,["S","l","v","O","n","T","m","e"]
EEPROM 244,["3","0"," ","S","e","c",0]
EEPROM 251,["7"," ","M","i","n"]
'The vars:
LCDtext VAR BYTE[8]
EEnum VAR BYTE
LCDtextNm VAR BYTE
LCDtemp VAR BYTE
LCDnum VAR BYTE
EnumC VAR BYTE
'Some of the code:
Select Case Mode
Case 1
Delay = Delay + 1
IF Delay > 7 Then Delay = 1
delmode:
Select Case Delay
GoSub lcdone ' Position cursor at home
EEnum = 36
GoSub EEtext
' LCDOut "Delay"
GoSub lcdsec ' Move to 2nd line on LCD
Case 1
GoSub TENsec
' LCDOut "10 Sec"
TimeDely = 10
Case 2
EEnum = 42
GoSub EEtext
' GoSub fteenSec
' LCDOut "15 Sec"
TimeDely = 15
Case 3
EEnum = 49
GoSub EEtext
' LCDOut "20 Sec"
TimeDely = 20
Case 4
EEnum = 57
GoSub EEtext
'LCDOut "1 Minute"
TimeDely = 60
Case 5
EEnum = 65
GoSub EEtext
'LCDOut "2 Minute"
TimeDely = 120
Case 6
EEnum = 73
GoSub EEtext
'LCDOut "5 Minute"
TimeDely = 300
Case 7
GoSub TenMin
'LCDOut "10 Min"
TimeDely = 600
End Select
Pause 400
'The SUB:
EEtext: LCDtextNm = 0
Pause 10
LCDnum = 0
EnumC = EEnum
For EEnum = EnumC TO EnumC+7
Read EEnum, LCDtext[LCDtextNm]
Read EEnum, LCDtemp
Pause 10
IF LCDtemp = 0 Then
LCDnum = 1
EndIF
IF LCDnum = 1 Then
LCDtext[LCDtextNm] = " "
EndIF
LCDtextNm=LCDtextNm+1
Next
LCDOut STR LCDtext
Return
Thank you all for the help! This will get me down the road a ways.
Gary
Bookmarks