16F877A - TWO FUTABA SERVOS AND USART
Posted: Fri Mar 26, 2010 1:17 am
Hello all,
I’m working on a project using two Futaba servos with programming based on an example found in this user forum. The servos work fine but the example program uses all of port “C” on the 16F877A. My problem is that I need to use the USART function for RS232 communication and it won’t function due to the way the program uses all of port C. I have tried different ways to free up RC 6 and 7 (RC/TX) but have been unsuccessful, and not having great programming skills (I use FlowCode Pro v3) I am unable to change the program to use say port D instead of port C.
I tried masking port c and changing the output symbols to another port but there is more to it than just that. I see some strange code in the Int. routine, little square boxes that I’m not sure how to do with a keyboard and I'm not sure what they mean. I need some help to change the code so it will use another port to operate my two Futaba servos and still have a working USART function. Is it possible to use the Int. routine as it is used in this program and still have the off chip communications work. I have uploaded the example program that I am referring to. Any help would be appreciated.
Also can you please give info based on using FlowCode V3.6, I ask because I found the same example in the FC v3 section of the forum that had changes made but I think they were done with V4 because I can’t open them to see what was changed or if they have another port being used. Thanks guys.
Cris
I’m working on a project using two Futaba servos with programming based on an example found in this user forum. The servos work fine but the example program uses all of port “C” on the 16F877A. My problem is that I need to use the USART function for RS232 communication and it won’t function due to the way the program uses all of port C. I have tried different ways to free up RC 6 and 7 (RC/TX) but have been unsuccessful, and not having great programming skills (I use FlowCode Pro v3) I am unable to change the program to use say port D instead of port C.
I tried masking port c and changing the output symbols to another port but there is more to it than just that. I see some strange code in the Int. routine, little square boxes that I’m not sure how to do with a keyboard and I'm not sure what they mean. I need some help to change the code so it will use another port to operate my two Futaba servos and still have a working USART function. Is it possible to use the Int. routine as it is used in this program and still have the off chip communications work. I have uploaded the example program that I am referring to. Any help would be appreciated.
Also can you please give info based on using FlowCode V3.6, I ask because I found the same example in the FC v3 section of the forum that had changes made but I think they were done with V4 because I can’t open them to see what was changed or if they have another port being used. Thanks guys.
Cris