Author |
Message |
Topic: Multi channel servo control(Serial communication problem) |
ktaye1987
Replies: 8
Views: 12158
|
Forum: General CCS C Discussion Posted: Tue Nov 06, 2012 7:21 pm Subject: Multi channel servo control(Serial communication problem) |
I would say that if accurate timing is important, do NOT use an ISR for the serial port, because it will unpredictably delay the operation of the timer interrupt. Instead, poll for incoming characters ... |
Topic: Multi channel servo control(Serial communication problem) |
ktaye1987
Replies: 8
Views: 12158
|
Forum: General CCS C Discussion Posted: Tue Nov 06, 2012 4:55 am Subject: Multi channel servo control(Serial communication problem) |
If you want a speedy response delay_ms(xx) is bad news.
It ties up the processor so nothing else can happen, (as you have found).
Use one of the built in timers to generate delays, if you must.
... |
Topic: Multi channel servo control(Serial communication problem) |
ktaye1987
Replies: 8
Views: 12158
|
Forum: General CCS C Discussion Posted: Tue Nov 06, 2012 4:20 am Subject: Multi channel servo control(Serial communication problem) |
Hi, I am running PIC18f46k22 to control multi servos, and get command from another micro controller. Here is my code for receiving part...
#include <18F46K22.h>
#fuses HSH,NOWDT,NOLVP,PROTE ... |
|