![]() |
Forum Index : Microcontroller and PC projects : VAR CLEAR
![]() ![]() ![]() ![]() |
|||||
Author | Message | ||||
PeterB Guru ![]() Joined: 05/02/2015 Location: AustraliaPosts: 655 |
G'Day Bill I was hoping someone would: a. find it useful b. yes, I have had the same problem c.explain what happened I don't think my program could have filled the memory. Am I correct in assuming the memory was full. "I am a bear of very little brain" (WTP) Peter Paul? Grogster. Your post came as I was writing mine. I generated quite a long program and got it going using your (dog eared)chip but did not include the VAL code. Once I was happy with the code I changed to a new chip and added the VAL SAVE code with no problems. I then added VAL RESTORE and got a message about some variable??? From then on the system degraded over time and eventually VAL SAVE would cause a reboot. From then on I tried every thing plus a bit. The new PICIT3 should arrive soon ![]() But VAL CLEAR did the trick. Now, please, can we go back to steam? ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9610 |
Apologies - PETER. I would love to know from Geoff or matherp, if you somehow corrupt the VAR SAVE area of memory, what kind of response you could get back from VAR RESTORE. I would expect that it would fail with some kind of error message, but what would you have to do, or how could you actually manage to corrupt the VAR SAVE area of memory? Smoke makes things work. When the smoke gets out, it stops! |
||||
Turbo46![]() Guru ![]() Joined: 24/12/2017 Location: AustraliaPosts: 1642 |
Sorry Peter, You don't say what, if any error messages you got but: I had a problem with VAR SAVE corrupting communications using COM2. Geoff said that the interrupts are disabled while writing to (and I guess reading from) flash memory. if that helps. I believe flash memory is not very large I'll RTFM later to check but I guess that it would be easy to fill, say with text strings. Bill Edit: The Manual says: Keep safe. Live long and prosper. |
||||
PeterB Guru ![]() Joined: 05/02/2015 Location: AustraliaPosts: 655 |
Sorry. For VAL read VAR Peter |
||||
Geoffg![]() Guru ![]() Joined: 06/06/2011 Location: AustraliaPosts: 3292 |
I don't have an answer to this because the VAR storage should not get corrupted and I have not seen that in normal use. I have seen an issue where with a chip programmed with a complete image (interpreter + BASIC program) can generate an error on the first VAR RESTORE. Because it is such a special case and VAR CLEAR permanently fixes the issue it has been languishing at the bottom of my todo list. This might be the same as the subject of this thread but it is difficult to say without a clear description of the fault and the environment. Geoff Graham - http://geoffg.net |
||||
PeterB Guru ![]() Joined: 05/02/2015 Location: AustraliaPosts: 655 |
G'Day Geoff and thanks. That does sound like it and I still have three new chips in the tube to play with when I pluck up the courage. My problem was, is it the code , the chip or the hardware? Peter ![]() |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9610 |
I know some people don't really like smilies, but they really ARE useful, so you know the mood of the poster. Without them....well....you can see how I totally mistook your sarcastic poke at me in your first reply. ![]() Personally, I probably over-use the smilies! ![]() Smoke makes things work. When the smoke gets out, it stops! |
||||
PeterB Guru ![]() Joined: 05/02/2015 Location: AustraliaPosts: 655 |
There was / is no "sarcastic poke" ![]() |
||||
PeterB Guru ![]() Joined: 05/02/2015 Location: AustraliaPosts: 655 |
Just when you thought it was safe to go back into the water, I'm back. Using a new chip and loading MMBasic and my program. First attempt to run program gave: [32] VAR RESTORE Error: Variable name I then removed VAR RESTORE from my code It ran OK until I pressed a button which does a VAR SAVE and then I got: CPU exception #7 at address 0x9D02EF05 Processor restarted I have not done a VAR CLEAR but I know it will work (I hope) Peter p.s. I am using, for the first time, I2C to drive a 16x2 LCD display. I hope that is not part of it. P |
||||
Turbo46![]() Guru ![]() Joined: 24/12/2017 Location: AustraliaPosts: 1642 |
Hi Peter, Someone had that same problem not that long ago. I can't find the post right now but I think it was fixed by upgrading to the latest firmware. Bill Edit: found it! here Keep safe. Live long and prosper. |
||||
PeterB Guru ![]() Joined: 05/02/2015 Location: AustraliaPosts: 655 |
G'Day Bill Progress is being made, I knew it would. I have V5.05.01, perhaps I had better see whats new. Geoff has contributed also so it is only a matter of time. The good thing is that it is easy to fix with VAR CLEAR. I don't understand these thing but then I didn't understand steam engine either. ![]() Peter |
||||
PeterB Guru ![]() Joined: 05/02/2015 Location: AustraliaPosts: 655 |
G'Day Bill I just found your edit. Thanks. I do have an int. but it comes via an opto isolator and that has no input so I don't think it could be that Peter |
||||
Turbo46![]() Guru ![]() Joined: 24/12/2017 Location: AustraliaPosts: 1642 |
Hi Peter, The interrupt wasn't Palcal's problem either but upgrading to the latest firmware fixed the VAR RESTORE problem. You said you have V5.05.01 but are you running it? If so I'm buggered. Bill Keep safe. Live long and prosper. |
||||
PeterB Guru ![]() Joined: 05/02/2015 Location: AustraliaPosts: 655 |
Well that's what I told it to load ![]() I have spent 70 years mucking about with electronics. It hates me. Peter |
||||
Turbo46![]() Guru ![]() Joined: 24/12/2017 Location: AustraliaPosts: 1642 |
More likely it's Murphy, he's usually my problem. Maybe if you could post a sub-section of your code that can demonstrate the problem? It's a long road from the crystal set to here. Bill Keep safe. Live long and prosper. |
||||
palcal![]() Guru ![]() Joined: 12/10/2011 Location: AustraliaPosts: 1993 |
I had a problem with VAR RESTORE the same as you but I was using V5.04.01 and when I upgraded to 5.05.01 the problem was solved. "It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all" |
||||
PeterB Guru ![]() Joined: 05/02/2015 Location: AustraliaPosts: 655 |
I am thinking perhaps I should write a simple bit of code that contains what are the relevant bits but still produces the fault. I spent years trying to get a crystal set working. Over 50 miles and a poor aerial was too much. I then spent at least a year trying to get a 1 valve (1K5) radio working without understanding all those spare electrodes needed to be connected. Peter |
||||
PeterB Guru ![]() Joined: 05/02/2015 Location: AustraliaPosts: 655 |
G'Day PALCAL My MMplus is V5.04.08 My MM is V5.05.01 But can you believe every thing you read? Peter |
||||
PeterB Guru ![]() Joined: 05/02/2015 Location: AustraliaPosts: 655 |
I have reduced my program to : VAR RESTORE And I still get the error. Peter Edit So then I doubled the length of my program to: VAR CLEAR VAR RESTORE And it works Geoff! or anybody, HELPPPPPPPP Peter |
||||
Turbo46![]() Guru ![]() Joined: 24/12/2017 Location: AustraliaPosts: 1642 |
Can you make it a bit shorter? Sorry I couldn't resist. > RUN > PRINT MM.VER 5.0502 > LIST VAR RESTORE > I have V5.05.02 running but that surely shouldn't matter. Bill Keep safe. Live long and prosper. |
||||
![]() ![]() ![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |