Hi all. i have not been here for a while. I'm getting back to a project I was working on some time ago. It's a guage 'pod' which will read RPM and also a temperature and I hope to add a pressure as well. It's for a boat engine I'm installing.
I'm using compiler version 0.97.00 2017-02-20.
I'm using a 16F74 chip with 4k of memory and 192 bytes of ram.
I had the code working very well. I added some variables for averaging the rpm. It worked well. Then I added some variables for averaging the temperature, and the rpm values went to 0. Like they are being overwritten?? The only difference between working and not working is that I have used one or two additional word variables. If I assign them (dim temperature_2, as word), there is no issue. But if I use it (Like initilize it to 0) then the rpm gets stuck at 0.
GCBasic indicates that with the working code has 2248 out of 4096 words used, and 115/192 ram bytes used.
The non working code has 2278/4096 and 117/192 used. Doesn't seem like it should be a space issue but I'm at a loss.
When the RPM is stuck at 0, the temperature will still change (Have the a-d input simulated with a pot). When I turn off the rpm squarewave the display reads 'engine off' as expected. When I turn the waveform back on it registers at 0 again.
The working code is version k.
The non working code is version l.
The only difference is the commented out 'Temperature_2 = 0' and 'Temperature_3 = 0'
Also, I upgraded to the lastest version....no change.
This is not an issue seen before, only occurred on 16F when a high byte was 255, and the result of the addition was not stored back into the original variable. calc = calc + rpm2 would be fine, but calc = rpm2 + rpm3 would not.
Will be include in the next release, we need to test first.
:-)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
That is interresting Its not exactly the failure Im seeing. If I dont have the additional temp variables defined then calc = rpm1 + rpm2 + rpm3 works fine. The issue for me is when I define additional variables then I get the unusual operation. I tried the alternate calc=rpm1, calc = calc+rpm2 etc and it worked but when I added the extra variables in I lost the RPM again. Ill continue to troubleshoot and see what I can figure out
Chay
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I send a pm but perhaps I did it wrong...have not yet received a response.
I did a bunch more troubleshooting with very limited success. I did find that when the rpm failed to register rpm1,2,3 and the averaged value in calc had a value of 14, and that value does not change with the input frequency.
Originally I didn't see the 14 due to my code to limit changes to 25 rpm incements.
Thanks for any help,
Chay
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
man i feel like a tool but i dont see it how does one access pms on this site? I've used them in the past on other sites but dont get the trick on this one I logged in but nothing pops up?
thx
Chay
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If your profile is setup correctly you will receive an email notification.
If your profile is setup correctly, then, check your spam filters and trash in your email.
As I get always get them via email - I cannot share another way of get at these messages.
Check your settings etc. Then, I can test send you a message.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi all. i have not been here for a while. I'm getting back to a project I was working on some time ago. It's a guage 'pod' which will read RPM and also a temperature and I hope to add a pressure as well. It's for a boat engine I'm installing.
I'm using compiler version 0.97.00 2017-02-20.
I'm using a 16F74 chip with 4k of memory and 192 bytes of ram.
I had the code working very well. I added some variables for averaging the rpm. It worked well. Then I added some variables for averaging the temperature, and the rpm values went to 0. Like they are being overwritten?? The only difference between working and not working is that I have used one or two additional word variables. If I assign them (dim temperature_2, as word), there is no issue. But if I use it (Like initilize it to 0) then the rpm gets stuck at 0.
GCBasic indicates that with the working code has 2248 out of 4096 words used, and 115/192 ram bytes used.
The non working code has 2278/4096 and 117/192 used. Doesn't seem like it should be a space issue but I'm at a loss.
When the RPM is stuck at 0, the temperature will still change (Have the a-d input simulated with a pot). When I turn off the rpm squarewave the display reads 'engine off' as expected. When I turn the waveform back on it registers at 0 again.
The working code is version k.
The non working code is version l.
The only difference is the commented out 'Temperature_2 = 0' and 'Temperature_3 = 0'
Also, I upgraded to the lastest version....no change.
Any ideas??
Thanks,
Chay Foss
Last edit: Chay Foss 2019-01-19
Welcome back.
I would look at this code. Add some debug (via the LCD to prove).
I do not know what is the root cause, but, you have found an issue. Use.
I will discuss with Hugh to resolve. This looks like an issue specific to the 16f low end parts.
I created a quick project to prove the issue. Attached.
Last edit: Anobium 2019-01-20
Thanks appreciate the help
Chay
Hugh has reviewed and confirmed the issue.
This is not an issue seen before, only occurred on 16F when a high byte was 255, and the result of the addition was not stored back into the original variable. calc = calc + rpm2 would be fine, but calc = rpm2 + rpm3 would not.
Will be include in the next release, we need to test first.
:-)
That is interresting Its not exactly the failure Im seeing. If I dont have the additional temp variables defined then calc = rpm1 + rpm2 + rpm3 works fine. The issue for me is when I define additional variables then I get the unusual operation. I tried the alternate calc=rpm1, calc = calc+rpm2 etc and it worked but when I added the extra variables in I lost the RPM again. Ill continue to troubleshoot and see what I can figure out
Chay
Send me a Personal Message as we have, hopefully, resolved with a new compiler. We did find a bug......
I send a pm but perhaps I did it wrong...have not yet received a response.
I did a bunch more troubleshooting with very limited success. I did find that when the rpm failed to register rpm1,2,3 and the averaged value in calc had a value of 14, and that value does not change with the input frequency.
Originally I didn't see the 14 due to my code to limit changes to 25 rpm incements.
Thanks for any help,
Chay
Also, I tried to do the simulator but couldn't make it work...I've never used it before...
Chay
I have just sent this personal message to you.
Hey there. Thanks for the instructions. I found out the pm obviously. Please send the new revision if it’s available and I’ll see how it goes
Chay
----- Original Message -----
From: Anobium evanvennn@users.sourceforge.net
To: [gcbasic:discussion] 579125@discussion.gcbasic.p.re.sourceforge.net
Sent: Wed, 06 Feb 2019 01:30:36 -0700 (MST)
Subject: [gcbasic:discussion] Variable overwrite issue? I'm at a loss...
I have just sent this personal message to you.
Variable overwrite issue? I'm at a loss...
Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/gcbasic/discussion/579125/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/
man i feel like a tool but i dont see it how does one access pms on this site? I've used them in the past on other sites but dont get the trick on this one I logged in but nothing pops up?
thx
Chay
If your profile is setup correctly you will receive an email notification.
If your profile is setup correctly, then, check your spam filters and trash in your email.
As I get always get them via email - I cannot share another way of get at these messages.
Check your settings etc. Then, I can test send you a message.
aha.. Didnt know about he email. Yup there the emails were. I sent one back thx
Chay