Program a servo

Can we program a servo with out using servo programmer by using atmega or any other way directly or
can we make a servo programmer plz help me out

Im under the impression you are new to servos?
No problem, your in the correct place.

First off all to put you at rest… no we dont need a servo programmer persay, to make the servo move. And yes you can use a atmega or the like to make it move…

Servos are controlled with a 5vdc positive-going variable pulse width that repeats every 20mS. The pulse length determines the servo output shaft position but the 20mS frame rate is not position critical. The frame rate does need to repeat at least every 20mS or it will lose power or even stutter. The servo was designed for pulse widths that vary from 1.0mS to 2.0mS, where 1.5mS is centered. In the normal range the servo will move +/- 45 degrees from the centered (neutral) position.

Most servos can be positioned to around +/- 90 degrees from neutral by expanding the range to 0.75mS to 2.25mS. However, care must be taken to avoid commanding a servo beyond its capabilities. Personal experience with Hitec servos reveals all of the standard size servos can achieve a full 180 degree range. Micro and special purpose servos are often limited to less than 180 degrees to maybe about 120º.

Hitec digital servos are a special case. They only recognize a range of 0.90mS to 2.10mS and will only provide a +/- 70 degree range of motion unless the end stops are changed with their servo programmer. When I change the range of a Hitec digital servo I simply set the left and right end stop values to 200. This provides a full 180 degree rotation but still uses the 0.90mS to 2.10mS pulse range. Another anomaly with Hitec digital servos is they do not require constant updating to hold position. Once a digital servo has received a single positioning pulse it will hold position until it is powered down or receives a new positioning pulse.

Second here is an outline of what a servo is, how it works and ways to use it.
viewtopic.php?f=31&t=3172

Also if you need help with code, We are all here to help.