We're not talking about clearing the EEPROM every time the Prop is reset. We're talking about clearing the EEPROM once, so that every time the Propeller boots it finds nothing to execute unless it is downloading from the Propeller Tool to RAM.
Often when you are doing development, you are only loading the program into RAM and not into EEPROM. If you accidentally reset the chip without downloading code, it will automatically execute whatever is in EEPROM. Sometimes you don't know for sure what you put in EEPROM the last time, and you want to make sure there's NOTHING there so that it doesn't start doing crazy stuff after an accidental reset.
I have fallen into this trap at least once. I'll be working on some code and I'll have an old outdated version of the code in EEPROM. Then, after a reset I'll see a bug that I was sure I had fixed! It can be frustrating if you don't realize that it's running that old version from EEPROM. Being able to clear the EEPROM helps to prevent this from happening.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The more I know, the more I know I don't know.· Is this what they call Wisdom?
I guess I didn't state my reply right! I know the EEprom isn't writin to unless you want to. My statement was to point out why I wouldn't want to write to it every time it's powered up or reset to help extend it's life time of write cycles. Sorry for that!! Dave
psshaw, deSilva! I am still proud of it as it was my first useful spin program and I was pestering Phil not you. So there, back after three days of poking at brachopods in the Late Ordovician. How you doing anyway?
Ah,, the Ordovician! No computers all around. But some basic nerve systems if I remember correctly.. Even the first vertebrates coming up. Lovely times, but a little bit dull outside the sea
I try to concentrate on my class (using the Prop) Main problem is the students do not do their homework. Can't help it... They are paying for it...i
I wonder what a new prop proto board does when it powers up and loads all "0" from eeprom to ram... I'm pretty sure new eeprom chips are full of 0s. Perhaps the spin interpreter catches this and shuts down.
EEPROMS start their life with all FF's don't they?
I think the boot up description in the manual describes what happens if no valid program comes form EEPROM. What exactly they mean by "shut down" is apparently part of the debate in this thread.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The more I know, the more I know I don't know.· Is this what they call Wisdom?
Well thank you all for showing me that my question was not as trivial as I had originally thought!
1. The Prop Demo board ships with some program that causes the LED's that share the VGA pins to
Cylon Strobe once, then they all turn on, and stay on... That's what mine did anyway. I have no idea whether or not
anything is sent to one of the video outputs, but doubt that it really matters. I was hoping it was some sort of
power-up check that might be useful.
2. If you do the Tutorials in the manual, you end up with an annoying program in EEPROM, that runs
every time the chip gets reset. I was wondering if there was a way to get rid of it.
3. In the process of getting an answer, I found out that having a program lurking in EEPROM may in fact
cause problems when I start writing non-trivial applications that interact with hardware, etc.
4. The most basic way to get rid of said lurking code is to load a null program into EEPROM,
which will displace anything that is currently there.
5. The simplest Prop null program appears to be:
PUB main
6. Nothing else is required, since the only purpose of the program is to prevent the Prop from doing
anything perverse on power-up / reset. The null program is not going to idle there for three days... unless
the house catches fire or your wife gets tired of you always playing with electronics and makes you leave it.
7. I think that I will eventually write something that polls all the Cogs, and does some flashy display thing
to let me know they all said Hi, but for now "PUB main" seems to fit the bill.
Thanks,
Ned
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ "They may have computers, and other weapons of mass destruction." - Janet Reno
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ D Rat
Dave Ratcliff· N6YEE
Post Edited (ratronic) : 9/30/2007 4:39:07 PM GMT
We're not talking about clearing the EEPROM every time the Prop is reset. We're talking about clearing the EEPROM once, so that every time the Propeller boots it finds nothing to execute unless it is downloading from the Propeller Tool to RAM.
Often when you are doing development, you are only loading the program into RAM and not into EEPROM. If you accidentally reset the chip without downloading code, it will automatically execute whatever is in EEPROM. Sometimes you don't know for sure what you put in EEPROM the last time, and you want to make sure there's NOTHING there so that it doesn't start doing crazy stuff after an accidental reset.
I have fallen into this trap at least once. I'll be working on some code and I'll have an old outdated version of the code in EEPROM. Then, after a reset I'll see a bug that I was sure I had fixed! It can be frustrating if you don't realize that it's running that old version from EEPROM. Being able to clear the EEPROM helps to prevent this from happening.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The more I know, the more I know I don't know.· Is this what they call Wisdom?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ D Rat
Dave Ratcliff· N6YEE
Post Edited (ratronic) : 9/30/2007 5:06:44 PM GMT
'' File: DoNothing.spin
Pub main·· 'Empty main method
(a) You need it to loop
and
(b) No, you need not loop
I try to concentrate on my class (using the Prop) Main problem is the students do not do their homework. Can't help it... They are paying for it...i
Post Edited (deSilva) : 9/30/2007 8:44:08 PM GMT
I think the boot up description in the manual describes what happens if no valid program comes form EEPROM. What exactly they mean by "shut down" is apparently part of the debate in this thread.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The more I know, the more I know I don't know.· Is this what they call Wisdom?
A lot has been covered in this thread that is WAY beyond WNed's question...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The more I know, the more I know I don't know.· Is this what they call Wisdom?
1. The Prop Demo board ships with some program that causes the LED's that share the VGA pins to
Cylon Strobe once, then they all turn on, and stay on... That's what mine did anyway. I have no idea whether or not
anything is sent to one of the video outputs, but doubt that it really matters. I was hoping it was some sort of
power-up check that might be useful.
2. If you do the Tutorials in the manual, you end up with an annoying program in EEPROM, that runs
every time the chip gets reset. I was wondering if there was a way to get rid of it.
3. In the process of getting an answer, I found out that having a program lurking in EEPROM may in fact
cause problems when I start writing non-trivial applications that interact with hardware, etc.
4. The most basic way to get rid of said lurking code is to load a null program into EEPROM,
which will displace anything that is currently there.
5. The simplest Prop null program appears to be:
PUB main
6. Nothing else is required, since the only purpose of the program is to prevent the Prop from doing
anything perverse on power-up / reset. The null program is not going to idle there for three days... unless
the house catches fire or your wife gets tired of you always playing with electronics and makes you leave it.
7. I think that I will eventually write something that polls all the Cogs, and does some flashy display thing
to let me know they all said Hi, but for now "PUB main" seems to fit the bill.
Thanks,
Ned
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"They may have computers, and other weapons of mass destruction." - Janet Reno
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The more I know, the more I know I don't know.· Is this what they call Wisdom?
' Donothing.spin
CON
_clkmode = xtal1 + pll16x
_xinfreq = 5_000_000
OBJ
text : "tv_text"
PUB main
'start term
text.start(12)
text.str(string(13,"I love you, INSERT_APPROPRIATE_NAME_HERE",13,13))
repeat 14
Rgds,
John Twomey
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
'Necessity is the mother of invention'