What happens, if you switch off the power ?
Maybe the code just think, the switch is pressed and try to write to the eeprom - while power is falling...
What happens, if you switch off the power ?
Maybe the code just think, the switch is pressed and try to write to the eeprom - while power is falling...
PBP 2.50C, MCS+ 3.0.0.5, MPLAB 8, MPASM 5.14, ASIX Presto, PoScope, mE mikroBasic V7.2, PICKIT2
Yep that is my problem.
if I take out the "write" it saves fine
COINOUT100:
PREMIOS=PREMIOS+1:if total > 0 then TOTAL=TOTAL-1
:GOTO LOOP 'GOSUB WRITEIT
So I did a little checking and the machine I'm interfacing to sends several signals as its lossing power, somthing to do with a cheap design cause theres no other reason. I will buy a scope to see if its a specific signal or just random crap. I think its just random crap cuase if I hook a anolog counter to it, it counts up to differrent amounts somtime 3 somtimes up to 6.
As to my messy code design, I'm sorry skimask. I have never had any training of any kind nor has anyone ever showed me how to write decent code. This is the first time in 15 years I have ever been on a forum for basic, quickbasic, visual basic, or pic basic pro.
I am one to learn things on my own, but as you pointed out (at my messy code) that type of learning has its problems. I do my best
I will continue this forum experience, Its al right. thank you all for your help with this one.
And thank you BigWumpus for figuring this one out for me......
Bookmarks