Stamp Stops Running after Five days?
Guido
Posts: 195
I have a project that I have been working on and it seems when I try and Debug after five days or so.....It is just dead.....nothing.....I have power supply Voltage....any Ideas.
Comments
What is the purpose of AckPin variable? You set it up but never assign anything to it.
You may want to add timeouts to your serin statements. You may not be receiving data when you think you should, and your program is waiting for input forever.
just my 2 cents
Dave
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Dave Andreae
Tech Support
dandreae@parallax.com
www.parallax.com
Post Edited (Dave Andreae (Parallax)) : 2/19/2005 4:52:36 PM GMT
First of all I have a solid 5v, and battery backup for his program. I believe the ackpin, must be used if you are using the latest version 2.5.
I have a hunch Dave might be correct, but one question I do have. If I am saving high and low temperatures and time, wouldn't they replace the old area of the program? I do realalize the program is almost full, but trying to shorten it i yet do not have the experinence
Dave
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Dave Andreae
Tech Support
dandreae@parallax.com
www.parallax.com
Post Edited (Dave Andreae (Parallax)) : 2/19/2005 5:13:58 PM GMT
Thank you very much. I am going to give it a try.I have this bread-baorded and just plug in when I am doing the test.
SAVE:
HIGH RTCCS
SHIFTOUT DTA, Clk, LSBFIRST, [noparse][[/noparse]%1\1,BrstReg\5,%10\2]
SHIFTIN DTA, Clk, LSBPRE, [noparse][[/noparse]Seconds,Minutes,Hours,Date,Month,Day,Year]
WRITE ADDR,HOURS,MINUTES,SECONDS,DATE,MONTH,DAY,YEAR <===== PROBLEM
LOW RTCCS
RETURN
try commenting out the write command above and let it run.
As far as checking the memory map after its running for a while, it’s going to show the same thing. It only shows what the memory will look like @ compile time.
Post Edited (Orion) : 2/19/2005 5:34:43 PM GMT
How do you do that! What I am trying to say, is I can open the memory map when the program is on the editor, but once it is downloaded to the stamp, how do you get access to it?
Thank You Again
1) Guido says that he has to "reboot" his program. Robert asked the unanswered question "After hitting reset it still doesn't work?". Dave ran with that. So one question to be answered is:
Guido, by "reboot" do you mean that you have to hit the reset button, then all is fine. Or do you have to reload the program from your PC to the Stamp?
2) Dave, I thought that the IDE did not show actual memory use in the Stamp, only the IDE's projection of memory to be used. Thus if the program is constantly using more memory when running, the IDE wouldn't know anything about it, and thus wouldn't show it.
Jim
1. Use locations 40 and 50 instead, if I'm reading the mem map right there should be enough room
2. There is extra ram on the ds1302 you can use.
2 may be a better choice because the eeprom of the bs has a limited # write cycles.
Post Edited (Orion) : 2/19/2005 5:54:02 PM GMT
Ps: To stupid to figure out how to write to the ds1302!!!!
Thanks Again
Thanks for your help. I just Changed the address to 40-50 and it did not work. Even though the memory map show it free. I gradually went up the scale, and I have it at 48-58 and working....we will see.
Thank You Again!
Guido
You can find an example of reading and writing to the RAM area of the DS1302 in the App Note www.parallax.com/dl/docs/prod/appkit/ds1302rtc.pdf. The code to do it is fairly straightforward:
See the App Note for variable / pin definitions.
Jim
Dave
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Dave Andreae
Tech Support
dandreae@parallax.com
www.parallax.com
·
Instead of fooling around with random locations which may or may not work, why not just put the two locations at 0 and 10, as high as it will go. If it fails there, your program is just too big, and you'll hve to do some "bloat surgery".
Regards,
Bruce Bates
You would have to add a small piece of code.· Have it display the memory address it's writing to each time.· When it stops responding, the last address can be compared with the memory map to see if you are running into the program area.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--==<{Chris}>==--
I am glad this program is bloted right now, because I have a problem that maybe I can learn something from.
First of all when I write to a location, basically for the new high and low temperature time and date, wouldn't I write to the same location....I guess what I am saying how could I possibly be over writing a program when the memory map shows it open.
Also if I use a Master Stamp to collect and Display for all·information from the Slave Stamps would I be limited to 16 word sized variables? The reason I am asking this this I may have 20 to twenty five word sized variables that I want to display. Just wondering if there might be a trick to deal with this problem.
Again All Thanks For the Help!!!
Guido
·
·
1. Read eeprom for current var to display
2. Send it to display
3. Loop back to 1.
This way you can reuse the same word var over and over to display them all.· If you dig around the forums you can find tons of code using a bunch of different eeproms.
·
Storing temporary data in EEPROM is something best avoided.
(Limited number of writes. Normally 1.000.000 writes should be enough, but if a program accidentally goes into a short loop...)
Guido,
Take a look at the memory map of the version of the program you posted. It shows your program code as running all the way up to memory location 68. (Stamp code starts at the end of memory and loads to the beginning.) Thus if you store something at location 70 you have just overwritten part of your program.
Jim
He's already got DATA statements which load starting at zero, so writing to 0 and 10 would overlay his DATA statements. The important thing is to use the memory map to see where things are loaded and what areas of memory are open. This is especially critical, as Guido has found out, when you're pushing the max of available memory.
Jim
Could you possibly point me in the right direction, I guess I just can not seem to find what you are telling me I can do...I have searched the forums, but have not seen anything.
Thanks Again
Feed all your data into an external eeprom and display them like this
·
1. Read eeprom for current var to display
2. Send it to display
3. Loop back to 1.
This way you can reuse the same word var over and over to display them all.· If you dig around the forums you can find tons of code using a bunch of different eeproms.
·
·
'Define Days-Of-Week, Months and AM/PM text.
'All text is stored in EEPROM with a binary 0 as the end-of-text character
Sun· DATA "· Sun",0
Mon· DATA "· Mon",0
Tue· DATA " Tues",0
Wed· DATA "Wednes",0
Thu· DATA "Thurs",0
Fri· DATA "· Fri",0
Sat· DATA "Satur",0
AM·· DATA " AM",0
PM·· DATA " PM",0
·
·
Here's a ton of bytes if you where going to try to store them all as variables.· Instead there stored in the eeprom on your bs2 in this case.· Now look at how the code displays it.· It’s only using 2 byte vars to display many more by retrieving a byte and printing it then looping until it reaches the end.
·
·
PrintIt:
'Prints zero (0) terminated text from EEPROM
READ Idx,Value··· 'Get next character
IF Value = 0 THEN Finished· 'Make sure it's not a binary 0
DEBUG Value····· 'Display it on screen
Idx = Idx + 1
GOTO PrintIt
Finished:
RETURN
·
Now if you get yourself an external eeprom or bs w/ scratchpad, you fill it up and use the same technique to reuse vars.· Granted this usually requires a little more code depending on what kind of data your working with.· Step one in your case is going to be trimming some fat off that program so you have some space to work with.· Step two figure how much room is enough and get a eeprom/flash/mmc/bs2e/bs2p/etc to hold it.· You may also want to look at http://www.parallax.com/dl/docs/cols/nv/vol1/col/nv33.pdf.· Jon uses a single word var to work with time, basically the number of mins from 12:00a(0-1439).· Same thing could be done with date.· Make 1/1/05 = 0 and the date is the offset from this number (ie. 12/31/05 = 365). Convert it back for display if needed.· I’m not 100% sure on what you’re doing with time/dates this may or may not help.· Personally I don’t like to have sec/min/hrs/month/date/yrs as single vars,·it takes up way too much.
·
·
·
Post Edited (Orion) : 2/22/2005 10:44:36 PM GMT
Thank you, I sure have a lot to learn. What I would like to do if possible, is have a Master Stamp,· a couple of Slave stamps and an external eprom.
Basically saving all data, time,day etc when an input such as temperature, power failures, alarms etc are detected. This information would be coming from the slave stamps and writing to the eprom. I would like to read the eprom from the Master stamp and display the results....I have alot of different inputs that I am trying to monitor.....Am I out of my league doing this? You can give it straight to a beginer Itialian!
Thanks Again
Guido