ESC control with PIC16f877A

Hello everyone!
This is the first time i'm dealing with brushless motors. I plan to control it using a PIC (16f877A is what i have with me). I got the esc from http://www.nex-robotics.com/products...or-driver.html . Now, when i tried it the first time the ESC did give some beeps but didn't drive the motor. But it has stopped responding altogether now. The code i'm using is here:

The code has been compiled using hitech-picc
I've checked using a simple LED at CCP1 (RC2) and it brightens up when RB2 is grounded ('working LED' at RB1 is switched off at the same event). I also checked the servo connector of the ESC which gives the 5V output as expected.
Anything i'm doing wrong?
Also, how do i check if the esc is still working and has not gone bad? (i dont have a radio)

Hoping to get a quick solution so that i can do something worthwhile this long weekend!

Interfacing with the microcontroller:
If you are driving the BLDC motor driver with the microcontroller then give out 1mS pulse
width at 50-60Hz at the beginning which corresponds to zero throttle. Turn on the BLDC
motor driver. Wait for about a second. Give 1mS pulse width at 50-60Hz which corresponds
to zero throttle. Wait for 5 seconds. Now you can change pulse width between 1mS to 2mS at
50-60Hz to control throttle of the BLDC motor.

Hope you have gone through that. 16F877a cannot give you refresh rates at 50Hz, if you are using PWM. Use timer interrupts. Dont use the CCP modules. Once you have generated the wave, check it with an oscilloscope. Then interface with the controller.

Thanks allbits
I did check the manual before starting. I plan to use timer interrupts too. Just couldn't try it out yet.
And as far as capability of 877A for generating 50Hz signal is concerned, I think you missed out the cryctal freq. i'm operating the 877A is. I'm doing it at 32.768kHz. i checked the online pwm calculator too to cross check.
And, i dont have an oscilloscope. For that, i plan to work around by using another PIC to check the output from CCP1.

I did check the manual before starting. I plan to use timer interrupts too. Just couldn't try it out yet.
And as far as capability of 877A for generating 50Hz signal is concerned, I think you missed out the cryctal freq. i'm operating the 877A is. I'm doing it at 32.768kHz. i checked the online pwm calculator too to cross check.
And, i dont have an oscilloscope. For that, i plan to work around by using another PIC to check the output from CCP1

Were waiting for your plans to finish, and to see the results of your plans.

If you have a servo motor, connect it and see if the servo is moving acording to the pulse.
I have not worked with a 32khz crystal along with a ccp module. Anyways, 1-2 ms at 50 Hz is a difficult signal with a ccp because the duty cycle is too low, so the amount of resolution available will be less for a frame of 1ms. Anyways do the math and double check the pulse out. Some DMMs have frequency and duty cycle readout , check the waveform with that.

Hey allbits!
thanks for the reply and sorry for the late rep. was busy through the week. anyway, unfortunately enough, i dont have a servo motor or an oscilloscope and have not been able to output the readings on the lcd! all going haphazardly for me!
As far as the PWM resolution is concerned, its (log(32768/55)/log(2)) = 9bits approx. which is good enough (?)
I've been trying to send the readings from the second pic to pc by serial port (i have a virtual rs-232 on my laptop, http://probots.co.in/index.php?main_...roducts_id=212)
i took up the usart files from HiTech PICC samples to test it. Have got no clue whats happening!
Is it possible that the usb-serial converter i'm using supports only one way comm. i'e PC to PIC??

Got it working! just too happy!
thanks allbits... Finally i figuered things out with the PICkit2 logic tool. I told you i'm new... so didn't know something like this even existed. anyways, its all working!
thanks again...