Go Down

Topic: How to programing AVR MCUs by Arduino (Read 1 time) previous topic - next topic

nevar91

Hello everyone,

I need to use a larger MCU then is ATmega328P on my Arduino Uno (ATmega1280 or 1281 proberly), but I am a beginner with a MCU programing and I want to be sure with this.
So, to programing ATm1280 by Arduino Uno I will connect SCK - slave reset on Arduino pins 13 - 10 to their´s pins on 1280 (with 16MHz ext. osc.), in the Arduino IDE I will choose Burn Bootloader - Arduino as ISP and upload ArduinoISP program. Than I´ll reconnect 1280 to Arduino serial link and after "Arduino mega (Atmega1280)" will be choosen as a board in in Arduino IDE I can programing it through Wiring and Arduino Uno board.
But ATm1281 I will have to programing through AVR Studion for a example.
Is that correct?

Thanks a lot.

putyn

first youll need to make a board for your atmega 1280/1281 since it doesn't have a dip breadboard friendly version - buying the arduino mega pcb would be the best thing since the board has all the footprints to get the atmega working + a ICSP header

if your going to program the atmega via avr studio i dont think youll need the bootloader because all the programming will be done via the ICSP programmer
i also suggest that you get a dedicated programmer if you want to use avr studio - arduino as isp its a quick solution but not sure if it was intended to be used as a dedicated programmer

nevar91

I will use my own footprint with ATmega1280/1281, but I wanna try Arduino as a ICSP before buying dedicated AVR ISCP programmer.
On it´s board are two ICSP pins. The one close to ATmega328P is assembled with a header, but the ICSP pins close to ATmega8U2 are not assembled (no header there).
I not sure which one connect with ATmega1280/1281´s ISCP.
Arduino IDE support ATmega1280 programing (the used to have it on the Arduino Mega board I think), so I hope to will be able programing 1280 on a footprint with Arduino language.

nevar91

Ok, I understand now a little bit more about it (I hope to), so let´s end it.

1) If I want to upload a program to a ATmega1280 on a my own PCB through Arduino using its language(Wiring), all what have to be done its connect ATmega1280 ICSP pins with a ICSP header on the Arduino board.
   Than I´ll sets Arduino IDE.
2) If I want to programing ATmega1280 via a serial link, it have to been uploaded a bootloader through ICSP at first.
3) If I want to programing a MCU which is not included in the Arduino board menu (ATmega1281 for an example) through Arduino ICSP, it have to been done with a hacked AVR Studion via C language.

Right or miss?

dc42


1) If I want to upload a program to a ATmega1280 on a my own PCB through Arduino using its language(Wiring), all what have to be done its connect ATmega1280 ICSP pins with a ICSP header on the Arduino board.


Not quite. Pins 1-4 and 6 of the ICSP header on your board should be connected to the corresponding pins on the ICSP header on the Arduino, but pin 5 on your board (Reset) has to be connected to pin 10 of the Arduino that you are using as a programmer.


2) If I want to programing ATmega1280 via a serial link, it have to been uploaded a bootloader through ICSP at first.

Correct.


3) If I want to programing a MCU which is not included in the Arduino board menu (ATmega1281 for an example) through Arduino ICSP, it have to been done with a hacked AVR Studion via C language.


Alternatively, create a new entry in boards.txt and add any extra conditional code needed in the core library to account for the differences between the 1281 and the 1280.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

nevar91

#5
Oct 04, 2011, 09:30 pm Last Edit: Oct 04, 2011, 09:32 pm by nevar91 Reason: 1
Thanks to dc42 and putyn.
I have looked at arduino source code a find, that C Source File included support for 1281, 2561 a order AVR MCUs, but I dont know how make it works, so I let it be for a while.
In a meanwhile I have made a atmega324P programing option to arduino through sanguino (maybe wrong...probable). Here is a screen: http://imageshack.us/photo/my-images/441/sanguinoatmega324p.jpg/
Why isnt sanguino option showed I dont know, and I am wondering if I can use a default sanguino settings (using atmgea644p) for a atmega324p if I wont be over 32kB of flash memory.

Go Up