
Servo Macro readme.txt
======================


This section contains three file:
	Servo_Macro_Readme.txt: 	This file
	Servo_macro.asm			The Assembly code
	Servo.fcf			An example

The Servo macro code sets all the outputs on a port to be servo outputs.
By setting a pulse value for each servo you can position that servo in relation to the mid point of its movement arc. Note that the values are from 10 to 36, and 1 for off.
	1  = no pulse (i.e. off)
	10 = -90
	16 = -45
	3 = 0
	29 = 45
	36 = 90

Note that some servos may have a movement range of less than +\- 90, in which case you will need to adjust the range of values used in your program acordingly.

The Assembly code was designed to be called from the timer overflow macro as shown in the example file.The clock speed should be set to 3276800Hz. Servos work on timed pulses.and the code has been designed around a 3276800Hz clock speed.

The example file has a single sensor on Servo_T4 (Port B Pin 4), the rotation of which is determined by the input on Port A.
