View Full Version : AutoPilot Programming and Eprom chip
JettPilot
May 22, 2005, 12:05 AM
Here is a picture of my AP4 autopilot that controls Heading (ailerons) and Altitude (elevator). It can be remotely controlled for on and off from the transmitter. Small, simple and effective, it is an awesome little device. It seems pretty well thought out except for one major item - When the autopilot is turned on it totally ignores stick inputs. No matter how much aileron or elevator you send it just totally ignores it when the autopilot is activated. I would like to reprogram this to mix in stick inputs with its altitude and heading information. Kind of like the FMA copilot does, it keeps the plane level but a stick input will mix with the level feature to allow you to override it if you need to.
Does anyone know how to download the programming from the chip on this unit ? The eprom chip is a PIC16F876A... I found writers for this chip that are pretty cheap on the net, but I have no idea how to download the programming from the chip. I dont want to reinvent the wheel, but I think that if I could see the programming, I could modify it to do what I need and load it back into the chip. I have never done anything like this before but I learn fast and am pretty good at figuring things out. Any information you guys could give me about this and how hard it will be would be greatly appreciated.
radiohound
May 22, 2005, 02:04 AM
Does anyone know how to download the programming from the chip on this unit ? The eprom chip is a PIC16F876A...
As long as it wasn't programmed with code protection ON, that should be easy. However, it is highly unlikely that this is the case......
It will not be readable if the code protect selection was made during programming.
sesat
May 22, 2005, 06:36 AM
Reverse engineering somone elses private code without pemission is not cool.
JettPilot
May 22, 2005, 11:26 AM
Sesat,
I have no idea who makes this autopilot, and modifying it to do what I need it to do is just not an issue.. Lots of people, no... MOST people here modify thier equipment and dont contact the manfacturer to get permission. This is a hobby for me and there is nothing "Uncool" about experimenting with different ways to get my UAV and autopilot to do what I need it to do.
radiohound
May 22, 2005, 02:09 PM
I agree you would legaly be able to modify the code as long as it was for your own personal use, and you did not duplicate the device, and did not share the program with others. You basically bought the rights for one device.
That said, any programmer who did not intend for you to share the program with others, and wanted to make a proffit from such things would turn the code protection bit on, rendering retrieval of the code impossible.
I think you will have better luck using open source code from here:
http://rcpilot.sourceforge.net/modules/rcap/index.php
and to edit the code to your liking. In fact, it looks like your AP4 "designer" may have just added code to the rcap opensource when he/she made the AP4. The rcap does not have elevator control, but all else is there. Same microcontroller, same way of setting pots for servo reaction....Looks like different pins were utilized at least, and the unecessary rs-232 chip was removed.
JettPilot
May 22, 2005, 02:45 PM
Very cool Radio Hound ! I will look at that code. Having to program the entire elevator would be that much more work, it would be easier just to take the existing code and modify it... Looking at the open source autopilot, it has an extra chip on it, and is quite a bit different than mine. I would guess that the code would be quite different.. I dont want to design an entirely new auto pilot, its beyond my abilities, but modifying some code is something I might be able to pull off :) . How can a retreive the code from my chip ? How would I know if a protection bit is turned on ? Any advice on encoders ? I see several made that hook to a PC for about 50 bucks, will those work ok ?
moon-dawg
Dec 01, 2005, 10:21 AM
Jet Pilot,
Have you made anymore progress on downloading the program from the PIC of your AP-4?
JettPilot
Dec 01, 2005, 07:17 PM
Jet Pilot,
Have you made anymore progress on downloading the program from the PIC of your AP-4?
No, I just decided to use a different autopilot. From what I understand I run the risk of erasing the chip totally by trying to download it with the security bit enabled...
poynting
Dec 01, 2005, 11:11 PM
It doesn't seem like it would be too hard to mix the outputs of this autopilot with the output of your RC receiver with an external PIC, if you know already know PIC programming. Not ideal, but possible.
vBulletin® Copyright ©2000-2009, Jelsoft Enterprises Ltd.