# SERVO

Compatible with:
DOS Maximite CMM MM150 MM170 MM+ MMX Picromite ArmiteL4 Armite F4 ArmiteH7 Picomite CMM2

Syntax:
SERVO channel, freq, chA [, chB [, chC ]]
SERVO channel, STOP

Description:

Generate a constant stream of positive going pulses for driving a servo.
The Maximite has two servo controllers with the first being able to control up to three servos and the second two servos.
Both controllers are independent and can be turned on and off and have different frequencies.
This command uses the I/O pins that are designated as PWM in the external I/O diagram (the two commands are very similar).
'1' or '2' is the controller number.
‘freq’ is the output frequency (between 20Hz and 1000 Hz) and is optional. If not specified it will default to 50 Hz
1A, 1B and 1C are the pulse widths for each of the controller 1 outputs while 2A and 2B are the pulse widths for the controller 2 outputs.
The specified I/O pins will be automatically configured as outputs while any others will be unaffected and can be used for other duties.
The pulse width for each output is independent of the others and is specified in milliseconds, which can be a fractional number (ie, 1.536).
For accurate positioning the output resolution is about 0.005 ms. The minimum value is 0.01ms while the maximum is 18.9ms.
Most servos will accept a range of 0.8ms to 2.2ms.
The output will run continuously in the background while the program is running and can be stopped using the STOP command.
The pulse widths of the outputs can be changed at any time (without stoping the output) by issuing a new SERVO command.
The SERVO function will take control of any specified outputs and when stopped the pins will be returned to a high impedance "not configured" state.

Last edited: 15 December, 2020