I am using a Pickit 3 development board and I'm going to integrate two servos (FUTABA 0216) and a PLC to it. basically what I am trying to do is have the PIC monitor two inputs from the PLC.

when input 1 receives a pulse, then I want servo 1 to rotate say 120deg clockwise then back.

When input 2 receives a pulse, then i want servo 2 to rotate say 120deg counter-clockwise then back.


any segestions on code to accomplish this?

Thanks in advance for any help