AndyGadget
Senior Member
My circuit is using an 18M2 with f/w vB running at 16MHz. Programming Editor 5.5.1.
I've got a situation where I've got 2 continuous rotation servos running and a pulsein command is called every 250ms or so. The signal being monitored by PULSIN will usually produce a pulse of up to 20ms, but occasionally will not, so PULSEIN times out and returns zero. (The occasional missing pulse is expected.) Stripping the code down to minimum, when there is no pulse detected and the 164ms timeout occurs, there is a brief pause of the servos.
The firmware.txt release notes show that an issue with COUNT stops the servo timer was corrected with release D. - CORRECTED ISSUE WITH USE OF THE COUNT COMMAND STOPS BACKGROUND SERVO AND TIME OPERATING. What I'm wondering is if there's a similar issue with PULSIN on the earlier firmware as I believe PULSIN uses the same timer as COUNT. I assume if this is the case the much shorter PULSIN delay of <20ms in normal operation does not upset the servo.
Could someone (Technical?) advise on this please.
(I could easily verify this, but my 'scope throws a hissy-fit (literally - EHT breakdown) on anything but the driest days. With the weather recently . . . No chance #;¬)
I've got a situation where I've got 2 continuous rotation servos running and a pulsein command is called every 250ms or so. The signal being monitored by PULSIN will usually produce a pulse of up to 20ms, but occasionally will not, so PULSEIN times out and returns zero. (The occasional missing pulse is expected.) Stripping the code down to minimum, when there is no pulse detected and the 164ms timeout occurs, there is a brief pause of the servos.
The firmware.txt release notes show that an issue with COUNT stops the servo timer was corrected with release D. - CORRECTED ISSUE WITH USE OF THE COUNT COMMAND STOPS BACKGROUND SERVO AND TIME OPERATING. What I'm wondering is if there's a similar issue with PULSIN on the earlier firmware as I believe PULSIN uses the same timer as COUNT. I assume if this is the case the much shorter PULSIN delay of <20ms in normal operation does not upset the servo.
Could someone (Technical?) advise on this please.
(I could easily verify this, but my 'scope throws a hissy-fit (literally - EHT breakdown) on anything but the driest days. With the weather recently . . . No chance #;¬)
Last edited: