You beat me! Nice you found that detail! Hope it works OK now. But you use a 16F series chip not 18F.
Ioannis
You beat me! Nice you found that detail! Hope it works OK now. But you use a 16F series chip not 18F.
Ioannis
Of course I had to open a can of worms.
This thread goes into detail how Darrel's Elapsed timer is off by 1:
https://www.picbasic.co.uk/forum/sho...789#post132789The value he used for each of the Oscillator rates is (1) less than it should be.
The reason is that he calculated the Timer1 counter overflow value as 65535 instead of using 65536.
Timer1 is a 16bit counter from 0 to 65535.
It takes 65536 counts to overflow (Wrap back to 0) and trigger the Timer1 interrupt.
This means that his 10ms interrupt will actually run longer by (1) instruction than it should.
Note to self: TimerCalc is in MultiCalc by Mr. E; (Timer Helper).![]()
My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.
Not as dumb as yesterday, but stupider than tomorrow!
Bookmarks