Hello all I have just started working on a final project for the third year of my technologist diploma and was wondering if i could get some help with some PIC programming. The project consists of voice recognition software that i have already written. Spoken commands into the PC's mike will control a remote device using a (one way) RF link. At the recieving end of the link i am using a PIC 18f452 to control a servo (for steering) and a small DC motor for the drive. The spoken commands will be converted into 2 ASCII characters representing a hexadecimal code that will set the speed and direction of the DC drive and control the servo for steering. The two character ASCII will be sent to the PIC's UART and compared to preprogrammed control characters that will be implemented to run the device. What i need help with is the algorithm for the steering (servo). The servo has been torn apart and the circuitry removed. All that is left is the DC motor and the Potentiometer. Now i have to implement a feedback loop based on the setpoint(direction required) and the error signal(difference between the setpoint and the reading from the potentiometer). I am not quite sure how i will do this using some form of PI control and a small deadband. Any help or ideas would be greatly appreciated since i don't have any experience with servos or PCM which has to be sent to the motor to control direction. I also seem to be having problems with the RF link. I made up a null modem cable and have been testing the link between two PC's using hyperterminal on both ends. I can recieve the characters properly when i hold down the key. There is one exception though, when the key is first pressed i get a garbage character at the start of the stream and when i press and release a key, all that i manage to get is a garbage character. I also modified the MSComm example program to send a string of characters all at once. When this is done i just get garbage characters even though the baud rates are the same. Any suggestions or ideas would be greatly appreciated. Thanks Jason -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist