00001
00040
00041 #include "esos.h"
00042 #include "esos_pic24.h"
00043
00048 #define NUM_SERVOS_USED_2 7
00049
00052 #define SERVO_PRESCALER_2 64 //1, 8, 64, or 256
00053
00058 #define SERVO_IRQ_LEVEL_2 2 //1, 2, 3, 4 for ESOS; 1-7 otherwise
00059
00062 #define SERVO_PULSE_PERIOD_2 MS_TO_TICKS(20, SERVO_PRESCALER_2)
00063
00068 extern volatile uint16 au16_servoDur2[NUM_SERVOS_USED_2];
00069
00075
00076
00078 #define SERVO_2_PORT_1 _LATB14
00079
00082 #define CONFIG_SERVO_2_PORT_1() CONFIG_RB14_AS_DIG_OUTPUT()
00083
00084
00085 #define SERVO_2_PORT_2 _LATB13
00086 #define CONFIG_SERVO_2_PORT_2() CONFIG_RB13_AS_DIG_OUTPUT()
00087
00088
00089 #define SERVO_2_PORT_3 _LATB12
00090 #define CONFIG_SERVO_2_PORT_3() CONFIG_RB12_AS_DIG_OUTPUT()
00091
00092
00093 #define SERVO_2_PORT_4 _LATB9
00094 #define CONFIG_SERVO_2_PORT_4() CONFIG_RB9_AS_DIG_OUTPUT()
00095
00096
00097 #define SERVO_2_PORT_5 _LATB8
00098 #define CONFIG_SERVO_2_PORT_5() CONFIG_RB8_AS_DIG_OUTPUT()
00099
00100
00101 #define SERVO_2_PORT_6 _LATB7
00102 #define CONFIG_SERVO_2_PORT_6() CONFIG_RB7_AS_DIG_OUTPUT()
00103
00104
00105 #define SERVO_2_PORT_7 _LATB4
00106 #define CONFIG_SERVO_2_PORT_7() CONFIG_RB4_AS_DIG_OUTPUT()
00108
00109 #include "servo2.h"