Jump to content

Problems programming PIC16F876 for RCAP

Recommended Posts

I have built the RCAP project and the only thing remaining is to program the PIC16F876. I use the PICALL programmer.

When I start to program the following message is displayed: Program error: Program: address=0000 buffer=2959 device=3FFF.

I use the following settings: osc. : XT Hardware: Watchdog Timer, Power Up Timer, Brown-out detect, Fl.Prog.Mem.Write

Any of you have an idea what can be wrong?

Link to post
Share on other sites

The error suggests that the data is not being programmed at all. Have you ever successfully pogrammed a 16F series part on it?

Are you sure you have selected the correct PIC chip in the setup? If so, then it sounds like the programmer is bad or the PICALL hardware setup/test features need investigation.

Link to post
Share on other sites

I realized that I tried to program the wrong PIC. Didn't pick the 16F876A...... So I managed to program it, but the RCAP doesn't semm to work. The diode lights up for maybe 30 secs, then it shuts off. No response on the servo at any time. Is there any "user manual" for the RCAP?

Link to post
Share on other sites
  • 11 months later...


I was really delighted to come across your ( RCAP) design so I decided to make it

After assembling it was disappointed that it does not work at all so here what I did

1- I made the PCB as in the project

2- Then I programmed the PIC using MPLAB IDE v7.20

3- I hooked up everything ( GPS-SERVO -…) but no response

4- I trouble shoot every step I made and the component on the PCB as followed :

a- I looked up the schematic diagram and I found that (R5) in deferent place other than in the illustrated picture in the project >> anyway it was not big deal to notice <<

b- after I programmed the PIC , there were no response , so I tracked the signal that should coming out from PIC pins with the oscilloscope to make sure that the PIC working and it was good as a signal but nothing going to pin26(servo)

So I tested the HEX file with the PIC IDE simulator and the result was repeating forever some certain loop and the LED that should response on the simulator does not show any thing even with or with out the on /off trigger on( pin 25 or the pass thru pin 24 )>> does it wait for some certain command or something like that ???<<

c- I used the debug hex file to see if there is any deference but no response again

after all I think I came to dead end with your project especially after I burn almost all

my brain cells >hopefully not all of it < I decided to send you this message to help me

not burning the rest of my brain so if you please can you point out what I did wrong

and which interface do I have to use in the GPS ( GARMIN/GARMIN or NMEA / NMEA) ???

BLUETHUNDE8000 > right now its just BLUE  <

Best regards

Link to post
Share on other sites

Sorry I have not checked this forum for a while and was unaware of your last post.

If the Autopilot board does not get the proper sentenances from the gps it wont do anything. It is very picky. As far as I know only the garmin outputs the format it wil lwork with. Magellan will not work. Somewhere on this forum a text file was posted that could be imported into hyper terminal and sent out the serial port @ 4800 baud. I looked for it again and I can not find it. But it did allow you to at least test the board without a GPS. I will look again if you are still in need help.

UPDATE: read this thread there is the TXT file there also http://www.rc-cam.com/forum/index.php?showtopic=666


Edited by Tom in Cincy
Link to post
Share on other sites

thank you so much TOM it was really nice of u to reply since i believed that no one will reply again , it was useful to read this text u sent to me it contains alot of good info , but it seem that i still have dificalites in the the RCAP i assembled

coz it doesn't give any response > the led does not react at all < i assemebled the whole componenet my self and i programmed the chip my self so i believe that i might be wrong in anything i used up lots of time trouble shooting it but no

result , finally i tried to purchse the whole kit but i feel unlucky that its not produced anymore , and even i can't find the preprogrammed chip to buy

well anyway dd u built it your self if there any source i can get the kit let me know

talk to you soon thnx once more TOM


Link to post
Share on other sites

I did program the pic chip myself, but was able to purchase the etched circuit board from Mike. I do not believe the hex code is encripted or write protected. You should be able to verify that the pic chip has the correct code using your programmer. When the circuit is first powered up the led should light up for 3 seconds and then go out. Make sure the led is working. I was looking at the schematic last night and it seems to me that you could build up small parts of the circuit just to do some initial tests. It looked like you only needed the pic chip, a 20mhz crystal, a few resistors, a led, and a 5 volt source to power up the pic.

Have you tried that yet?

Have you verified the hex code programming?

Have you checked the 20mhz oscillator crystal is running?

Is the pic getting 5vdc?

The circuit does work. You should be able to get yours working too.


Edited by Tom in Cincy
Link to post
Share on other sites

hi Tom

1- yes already assembled and it does not responed, i know its not write protected, but when i used a microchip hex file simulator to see what is going on

i found that the program is going in kinda indefinte loop

2- is that what you mean by verifing the hex code programming ??

3- i checked pins 9&10 that going to the crystal by ocilliscope and it gives signal but i don't know why the led is not working even i checked it alone it work ? els what do u suggesst how i might chek the 20mhz crystal so i will be sure its not the problem ?

4- yes i'm sure about the 5vdc the chip getting it

you know i have some doubt about the 20 mhz crystal so tell me hopw i might check it alone or in the curcit ????!!!


Link to post
Share on other sites
2- is that what you mean by verifing the hex code programming ??

You should be able to read back the code (hex file) that you programmed into the chip. If you read out the same code as you put in it would verify the fact that the chip is indeed programmed and the chip is still functional. I use the following software IC-Prog it is free from http://www.ic-prog.com/index1.htm. It works with a very simple and low cost programmer I bought from this site. http://www.sparkfun.com/shop/index.php?sho...t=405095&cat=3& Its model SKU Number:PIC-PG2 and sells for $12.95 I have used this combination to program all of RC-Cam's projects. It has worked flawlessly.

found that the program is going in kinda indefinite loop

I would expect if to be in a loop as any such program would loop back looking for appropriate input data.

do u suggest how i might check the 20mhz crystal so i will be sure its not the problem ?

The crystal runs the chips clock. With no clock the chip will not run. You could check the crystal oscillator with a Scope capable of 20 mhz, a frequency counter or even hear it on a shortwave receiver tuned to 20 mhz.

This is the flow of the program. As you can see it loops waiting for input.


Get PulsIn value of Neutral for the servo

Get Gain Value

Get Servo Direction


If Autopilot ON then

GoTo Autopilot


GoTo Passthru



Pulsin Receiver

PulsOut Rudder

GoTo MainLoop


Get GPS Data

Do CheckSum of Data

Fill in Vars

If Correction needed then DoCorrection

GoTo MainLoop


If Direction Normal

Turn normal

Else if Direction Reverse

Turn Reverse

GoTo MainLoop


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...