standalone MEGA 2560

Can anyone direct me on how to go about for a standalone Mega 2560...

Besides soldering the Atmega 2560 to a PCB board what are the steps to get it working like an arduino mega.

Thanks

Guidelines for 328 apply to 2560 as well. See http://arduino.cc/en/Tutorial/ArduinoToBreadboard.

connect up 16 MHz xtal, two 22pf caps, 10K reset pullup resistor, 100nF/0.1uF caps on the VCC/AVCC pins.
Connect up ICSP header with +5, Gnd, Reset, SCK, MISO, MOSI.
Apply power, bootload with Atmel AVR ISP MKii, or wth Nick Gammon's Arduino as ISP sketch.

Thanks for the reply.

According to this link Arduino - Home, to burn the bootloader do I need both the AVR programmer and the FT232 USB to serial breakout board?

Can I only use the AVR programer alone since it connects to the MISO, MOSI, SCK, RESET of the microcontroller and it has a USB on the other end to connect to PC?

Why is the need for the FT232 breakout board?

Thanks

HH75:
Thanks for the reply.

According to this link Arduino - Home, to burn the bootloader do I need both the AVR programmer and the FT232 USB to serial breakout board?

No.

HH75:
Can I only use the AVR programer alone since it connects to the MISO, MOSI, SCK, RESET of the microcontroller and it has a USB on the other end to connect to PC?

Yes.

HH75:
Why is the need for the FT232 breakout board?

You need it to program the chip after you disconnect MISO, MOSI, SCK, RESET.

So in another word,

I can use the AVR programmer to burn the bootloader and also to download the software code that I have written for the chip?

No, not exactly. If you download a sketch with the AVR programmer it will overwrite the bootloader. If all you need is to download the sketch then you can skip the bootloader and just use the AVR programmer for downloading sketches.

The bootloader is only needed if you use it along with the FT232 USB and download the sketch via the FT232 USB connection. Another use of the FT232 USB is for serial communication to the PC using the serial monitor program.

Burning a bootloader using the IDE's Tools:Burn Bootloader also sets the fuses for correct operation. Do that first before loading any sketch, even if the sketch is to be loaded via File:Upload Using Programmer (after which the sketch starts after any reset, the bootloader is wiped out).

CrossRoads:
Burning a bootloader using the IDE's Tools:Burn Bootloader also sets the fuses for correct operation. Do that first before loading any sketch, even if the sketch is to be loaded via File:Upload Using Programmer (after which the sketch starts after any reset, the bootloader is wiped out).

My process for programming standalone Atmel processors so far has been to use the AVR ISP II ($35) with the programming software included in Atmel Studio to do the programming. This will write the ELF file created by Arduino up to the chip over the programming port, and has a section for setting whatever fuses you want. In addition, you can use it with the AVR Dragon's ($50) High Voltage programming mode to fix bricked chips. In addition, if you want to use Atmel Studio to actually write code, either programmer will allow you to debug your code running in-system, which is great.

I used to use Atmel Studio, but got tired of waiting for it to start up and went back to using the IDE.
Burning the bootloader from there kept the fuses consistent with the Arduino boards.

Hi guys,

I am an amateur and it is difficult for me to understand...

Do I need to burn the bootloader in the first place? Is it just to set the fuses and in case I need to use the FT232? These fuses refer to??

Can I skip that and proceed to download my software into the chip? Will it work?, of course the sketch is a working sketch on the Arduino?

I will only need the FT232 if I need serial communication with the chip else I don't need it?

Browse the data sheet re: the fuses. They do things like determine the clock source, clock speed, etc.
The fuses need be set to use the 2560 as an Arduino Mega.
If you want to use the chip as something else, you could do something as simple as Nothing with the fuses and use the default settings.

If you use an AVR ISP Programmer, you can set the fuses and install a bootloader; this is done via the SPI pins.
You can also download a sketch and not have a bootloader (whether you did anything with the fuses or not) using the AVR ISP Programmer.

If you have a bootloader installed, then you can use a USB/Serial adapter (FT232 chip, CP2102 chip, ATmega16U4 programmed as USB/Serial adapter) to download sketches via the serial interface.

The bootloader installed from the IDE expects the chip to be running at certain speed to sync up with the IDE software on the computer for serial downloads.
The fuses help determine that, along with choice of crystal/resonater for an external clock.

You can of course write your own bootloader to run at different speeds, and make up a matching boards.txt entry for the speeds you are using.

Hope that clarifies things.

To clarify a bit further.

Do I need to burn the bootloader in the first place? Is it just to set the fuses and in case I need to use the FT232? These fuses refer to??

You need to only burn the bootloader once per chip. Yes to primarily set the fuses, to select the proper clock settings. The fuses have nothing to do with the FT232, they are not related.

Can I skip that and proceed to download my software into the chip? Will it work?, of course the sketch is a working sketch on the Arduino?

You can skip the bootloader, if you have done it at least once before(to set the fuses). You can then download the sketches directly to the chip, using your AVR programmer, as many times as you need for testing.

I will only need the FT232 if I need serial communication with the chip else I don't need it?

Yes.

Thanks guys for the clarification.

It has been most informative.

Hi,
Do you know if I can use this AVR programmer to download my sketch? It is called Pololu USB AVR Programmer.

Thanks

pololu_usb_avr_programmer.pdf (1.51 MB)

Yes, you can. I was able to use it to program with the Arduino IDE to program some ATtiny84/85/13 chips.

The Pololu USB AVR Programmer driver installs several virtual COM ports. You need to use the "Pololu USB AVR Programmer Programming Port(COMxx)" port. Select this COM port in the IDE Tools->Serial Port menu.

You will need to add this Pololu definition to the \arduino-1.0.4\hardware\arduino\programmers.txt file.
(Note: you need to restart your IDE after editing this file)

pololu.name=Pololu
pololu.communication=serial
pololu.protocol=stk500v2

Make sure you select the Pololu programmer under Tools->Programmer menu. And use the Upload Using Programmer.

Thanks.

I read this from the pololu user guide, "it does not currently work with Atmel’s line of XMega microcontrollers"

Does this means that it cannot be use on the Mega 2560?

Thanks

HH75:
Thanks.

I read this from the pololu user guide, "it does not currently work with Atmel’s line of XMega microcontrollers"

Does this means that it cannot be use on the Mega 2560?

Thanks

It will work fine with the MEGA2650, exactly the same as with the 328, just different pin numbers to hook up. 2560 is not an XMEGA chip.

XMEGA is a different line and the X will always be in the chip name. It's not a placeholder for a number, it's an actual X character. For example, the ATxmega128A1 is an XMEGA chip. XMEGAs have the AVR core but significant differences in the way ports are set up. They usually have other features (they come with a real DAC for example) added and can run at higher clock speeds. Not too many people mess with them. I got a few from Atmel on a sample order (free is my favorite price, especially if I just want to mess with it) and I am going to try them out with my AVR ISP II programmer which supports them.

They are fairly impressive, but I just don't know where they see real world use. More info:

I have wired up my mega2560 and try to download the sketch into it using the pololu avr programmer.

I have set up the the programmer to use Pololu and Upload using programmer.

But I am getting error msg "avrdude stk500v2_command() command failed "

There are 2 virtual com port and I have tried both.

Sometimes I get this error "avrdude: usbdev_open(): did not find any USB device "usb""

What is your command line for avrdude?

How old is your Pololu AVR programmer? You might need to update the firmware to v1.0.7 if it's not already at that version. I think the older version 1.0.1 supported AVRISPV2, not STK500V2.