Maker Pro
Maker Pro

Programming PIC to sontrol 6x SERVOs

You have a delay in the handler. This means you really don't understand how it is supposed to work, so let me try to explain it.

Bob

Hi B,
When you say I have a delay, do you mean this: 'WaitUs timxh ?
The apostrophe is when it is commented out. I realised my mistake.

Thanks, I'll try again tomorrow.
C.
 
Ah, okay. Like I said, I was not familiar with the language you are using.

Bob
Hi B,
How does this look so far?
I can see that there are some mistakes,and some lines for testing, that need removing.
If you can look at the INTERRUPT LOOP, and see if it looks something like your ideas.

I have a waitms 14, which will be calculated later as a TMR0 delay.

Should there be OFF delays as well, or should it work with only ON/DELAY/OFF?
C.
 

Attachments

  • 18LF4431 SERVO 250618 1100.txt
    10.6 KB · Views: 55
Hi B,
Thank you for your patience explaining how the TIMER works.
It is almost working, but needs Oshonsoft language skills to go farther.
Much appreciated,
Camerart
 
Last edited:
Hi,
Update!
I'm concentrating on other things at the moment, so this is a summary.
I have now got the SERVO ouputs to work, using PPM (I think) with a timer interrupt.
C
 
Top