Controlling individual pins with C code

Hi all,
I’m trying to figure out how to control individual pins (for example the pin to which the base servo is connected, Channel 0) using C code. All I find on the web is about controlling servos that are directly attached to the Atmega8’s port pins.
Can anyone help me plz?
Thanks in advance for your answer, have a good day!

I’m curently doing this on a PIC, but the Atmega8 should be able to do it as well.

Some C compilers (like CCS, I think) have routines to drive R/C servos. If not, then you can set up a PWM timer to run the pin.

OR, use a pair of interrupts (run by timers) for the frame and run time of servos, and easily control up to 8 servos. The frame ISR selects one of the 8 servos, the timer ISR is set with the run time of the servo. You toggle a servo pin on/off in response to these two ISR routines. This works for PICs, and I’d assume AVRs as well. I currently run 4 servos for Loki (see thread in bipeds).

HTH

Alan KM6VV