Replacement Atmega 328P multiwii
-
- Posts: 14
- Joined: Thu Oct 24, 2013 12:42 am
Replacement Atmega 328P multiwii
I repaced Atmega 328p in my hk multiwii 328p and now i can't program it. I'm sure all pins are soldered well. I need to change some setting of my arduino soft because i'ts brand new atmega 328p? any solution's tutorial?
Re: Replacement Atmega 328P multiwii
Have you flashed an arduino bootloader to it yet?
-
- Posts: 14
- Joined: Thu Oct 24, 2013 12:42 am
Re: Replacement Atmega 328P multiwii
After I asked question above i found that flashing arduino bootloader is required but... i dont know how to do it and i really can't find working solution. Any tutoria or advise maybe?
Re: Replacement Atmega 328P multiwii
I believe you need an USBasp programmer and connect it to the ICSP pins on the Atmega.
Search on this to learn how to program a new Atmega.
Search on this to learn how to program a new Atmega.
-
- Posts: 14
- Joined: Thu Oct 24, 2013 12:42 am
Re: Replacement Atmega 328P multiwii
ok i have Usbasp but how to connect it to the board instead of preogrammer onboard. I can solder miso mosi etc directly to pins but if there is other option i dont want damage pins .
Re: Replacement Atmega 328P multiwii
I did not see any pad on this board for ICSP. So you either need to solder wires onto the Atmega or use this adapter for solderless connection:
http://www.hobbyking.com/hobbyking/stor ... arch=Atmel
This is also good to FLASH many ESCs.
http://www.hobbyking.com/hobbyking/stor ... arch=Atmel
This is also good to FLASH many ESCs.
-
- Posts: 14
- Joined: Thu Oct 24, 2013 12:42 am
Re: Replacement Atmega 328P multiwii
look at this photo:

there are 6 pins on the left next to usb conntcion. there is direct connction between those 6 pins and miso mosi sck pins so i think i can use it to connect my usbasp right?
Should i remove quartz 16 mhz for first usbasp connection and after change fuses solder it again?

there are 6 pins on the left next to usb conntcion. there is direct connction between those 6 pins and miso mosi sck pins so i think i can use it to connect my usbasp right?
Should i remove quartz 16 mhz for first usbasp connection and after change fuses solder it again?
Re: Replacement Atmega 328P multiwii
I would 'Ohm out" those pads to the atmega chip while refering to the Atmega data sheet to ensure those pads are for Flashing.
Here is a link on Flashing atmega's on an ESC (really the same chip) that shows the pins needed.
http://wiki.openpilot.org/display/Doc/F ... structions
See "Atmega8 pinout" diagram.
You need 6 pins from the Atmega: Vdd, Gnd, SCK, MISO, MOSI & RESET to program.
The XTAL does not need to be removed to Flash new code.
Here is a link on Flashing atmega's on an ESC (really the same chip) that shows the pins needed.
http://wiki.openpilot.org/display/Doc/F ... structions
See "Atmega8 pinout" diagram.
You need 6 pins from the Atmega: Vdd, Gnd, SCK, MISO, MOSI & RESET to program.
The XTAL does not need to be removed to Flash new code.
-
- Posts: 14
- Joined: Thu Oct 24, 2013 12:42 am
Re: Replacement Atmega 328P multiwii
Thanks waltr, I'll try to flash bootloader by my USBasp and post resoults.
-
- Posts: 8
- Joined: Sat Apr 19, 2014 12:06 am
Re: Replacement Atmega 328P multiwii
Norbert! Any luck? I just replaced the 328p on my HK Multiwii 328p and need to do the same thing. What I'm not sure about are the "fuse" settings for loading the bootloader.
Re: Replacement Atmega 328P multiwii
You can burn bootloader with Arduino. But I think you must burn bootloader to SMD atmel with internal clock 1Hz.
## FUSES Lo: FF Hi: DA Ex: 05
# 1) cd to Arduino 'hardware' folder
# 2) connect everything and test that comms work
CMD>> tools\avr\bin\avrdude.exe -C tools\avr\etc\avrdude.conf -c usbasp -p m328p
You should see something like
C:\Users\Kari\Documents\arduino-1.0\hardware>tools\avr\bin\avrdude.exe -C tools\
avr\etc\avrdude.conf -c usbasp -p m328p
avrdude.exe: warning: cannot set sck period. please check for usbasp firmware up
date.
avrdude.exe: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.03s
avrdude.exe: Device signature = 0x1e950f
avrdude.exe: safemode: Fuses OK
avrdude.exe done. Thank you.
# 2) program fuses
CMD>> tools\avr\bin\avrdude.exe -C tools\avr\etc\avrdude.conf -c usbasp -p m328p -v -e -U -B 1000 efuse:w:0x05:m -U hfuse:w:0xDA:m -U lfuse:w:0xFF:m
# 3) program bootloader
CMD>> tools\avr\bin\avrdude.exe -C tools\avr\etc\avrdude.conf -c usbasp -p m328p -e -U flash:w:arduino\bootloaders\atmega\ATmegaBOOT_168_atmega328.hex
## FUSES Lo: FF Hi: DA Ex: 05
# 1) cd to Arduino 'hardware' folder
# 2) connect everything and test that comms work
CMD>> tools\avr\bin\avrdude.exe -C tools\avr\etc\avrdude.conf -c usbasp -p m328p
You should see something like
C:\Users\Kari\Documents\arduino-1.0\hardware>tools\avr\bin\avrdude.exe -C tools\
avr\etc\avrdude.conf -c usbasp -p m328p
avrdude.exe: warning: cannot set sck period. please check for usbasp firmware up
date.
avrdude.exe: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.03s
avrdude.exe: Device signature = 0x1e950f
avrdude.exe: safemode: Fuses OK
avrdude.exe done. Thank you.
# 2) program fuses
CMD>> tools\avr\bin\avrdude.exe -C tools\avr\etc\avrdude.conf -c usbasp -p m328p -v -e -U -B 1000 efuse:w:0x05:m -U hfuse:w:0xDA:m -U lfuse:w:0xFF:m
# 3) program bootloader
CMD>> tools\avr\bin\avrdude.exe -C tools\avr\etc\avrdude.conf -c usbasp -p m328p -e -U flash:w:arduino\bootloaders\atmega\ATmegaBOOT_168_atmega328.hex