Control servos using receiver output data ( Ardupilot Mega AT1280)

Hi,

Does anyone had codes to program servos by reading receivers data and output it to the servos? I tried writing my own code, but it doesn't work. please help me! Thanks alot!

http://rcarduino.blogspot.com/2012/01/how-to-read-rc-receiver-with.html