I have ArduPilot Mega (red PCB) with blank Atmega 328p MCU and can't make PPM encoder work.
1. Got latest sources from GIT
2. Build firmware
3. got ardupilot_mega\ardupilot-mega\Tools\ArduPPM\ATMega328p\Encoder-PPM.hex file
4. flashed this firmware using command avrdude -e -c stk500v2 -p m328p -P com4 -U flash:w:Encoder-PPM.hex -U efuse:w:0xF4:m -U hfuse:w:0xD9:m -U lfuse:w:0xFF:m -U lock:w:0x0F:m)
5. I have 16MHz signal on oscillator, and blue LED is slowly blinking (So MCU works and fuses seem to be OK)
6. I have connected RX to all 8 input lines
7. Connected to PC using FTDI cable (power comes from this cable) - Sensor board is disconnected.
8. Checked signal on Input lines - 5V. Looks good to me.
Problem is - ArdupilotMegaPlanner connects to board, but reads no signal from RC receiver.
I fear that question is best answered by a comparison test with a new red board. I'm on red board #4 (my mistakes).
I remember reading in the wiki that input 8 should not be connected, except for a special mode or something.
Not sure if that is relevant, but I thought, I'd offer a suggestion. If I find it I will comment with a link
I did not mentioned, but I tested with and without 8'th pin. It makes no difference.
Andreas, do you have ability to read firmware from mega328p?
How are you powering the board? I think the USB power does not power the Rx as standard.
You might want to look at this mod: http://diydrones.com/profiles/blogs/simple-apm-2560-power-hack
Receiver is powered via 5V power supply. If I connect servo motor it is controlled via RC transmitter as should.
Today with fresh head, I found solution. There is confusion with programming fuses.
avrdude -e -c stk500v2 -p m328p -P com4 -U lock:w:0xFF:m
avrdude -e -c stk500v2 -p m328p -P com4 -U hfuse:w:0xDF:m -U lfuse:w:0xFF:m -U efuse:w:0xFE:m
avrdude -e -c stk500v2 -p m328p -P com4 -U flash:w:Encoder-PPM.hex -- started to work!
avrdude -e -c stk500v2 -p m328p -P com4 -U lock:w:0xCF:m -- after this line MCU stops responding (flashing)
Saulius i got the same problem, only difference i got it as a consequence when my Xbee 2.4 onboard failed, I think it got shorted (with no human error apparently), momentarily drained the Lipo, i landed arducopter and when i took a deeper look at the APM1.4 red pcb, a trace was fried , i jumpered it, but since the day i am unable to read RC signals. Also Atmega 328p is getting darn hot. Unable to solve the problem, gonna RMA it. But still the big question is WHAT ALL WENT WRONG??
Hi Umer, your problem is completely different from mine but you should upload a photo indicating which track was fried and your setup. It would help a bit.
You should try flashing firmware using SPI programmer to see if Mega328p is alive.
I tried Programming the Atmega328p (PPM encoder/failsafe) using AVR ISP MKII programmer,
Renamed the file as firmware.hex and replaced it with firmware.hex in PPM_Encoder.hex ( i have also tried with the original firmware.hex. SAME ISSUE AS DISCUSSED BELOW)
Now when i run the firmware_arduino_328_16mhz.bat file
Probably you have killed MCU.