In a project using the 40x1, I have a "background" interrupt routine which recieves serial data packets periodically via the hw serial port.
The main program occasionally uses rc servos for brief on-off controls. The program needs to wait 2 seconds for the mechanical servo to move to new position before turning off pulses and power to the servo
The new x2 doze command would be ideal but isn't on the x1.
Pause can't be used due to the interrupt discontinuing any pause.
I wrote an alt_pause routine using the settimer function, but forgot about my servo functions. The manual clearly says servo and timer functions are mutually exclusive.
So, I wondered about using the count command as a time delay. Is there a problem with this and interrupts or servo commands? There's no mention in the manual but I wonder what interaction there will be between count, interrupts, and servo commands. I also wonder how my "real" use of the count command as a tachometer will be affected by interrupts. The "counted" pulses are no faster than 110 ms and are at least 5 ms wide.
Bruce M
Snowflake, AZ
The main program occasionally uses rc servos for brief on-off controls. The program needs to wait 2 seconds for the mechanical servo to move to new position before turning off pulses and power to the servo
The new x2 doze command would be ideal but isn't on the x1.
Pause can't be used due to the interrupt discontinuing any pause.
I wrote an alt_pause routine using the settimer function, but forgot about my servo functions. The manual clearly says servo and timer functions are mutually exclusive.
So, I wondered about using the count command as a time delay. Is there a problem with this and interrupts or servo commands? There's no mention in the manual but I wonder what interaction there will be between count, interrupts, and servo commands. I also wonder how my "real" use of the count command as a tachometer will be affected by interrupts. The "counted" pulses are no faster than 110 ms and are at least 5 ms wide.
Bruce M
Snowflake, AZ
Last edited: