Wisconsin
Offline
God Member
Karma: 4
Posts: 994
I LOVE THIS STUFF!!!!
|
 |
« on: May 02, 2012, 06:13:42 pm » |
Hello,
So I've always worked with the ATmega328p and I have put it on a breadboard and uploaded sketches and such that way.
I want to know if the ATmega2560 is generally the same deal? Obviously it doesn't come in a DIP package, but how would I upload sketches to it if I were solder the 2560 onto a breakout or a circuit board? Is it the same with the TX and RX?
BONUS: I need help setting up a usb or serial connection or w/e, so if anybody has any resources on adding that ability to upload sketches from the usb to the microcontroller, that would be great!
|
|
|
|
|
Logged
|
Accelerate to 88 miles per hour.
|
|
|
|
Global Moderator
Melbourne, Australia
Offline
Shannon Member
Karma: 218
Posts: 13897
Lua rocks!
|
 |
« Reply #1 on: May 02, 2012, 07:48:15 pm » |
If it had a bootloader you could use Tx and Rx along with an FTDI cable. Or you could wire up the ISCP interface to the SPI pins. Or both, in case you needed to use ICSP to put the bootloader there in the first place.
|
|
|
|
|
Logged
|
|
|
|
|
Wisconsin
Offline
God Member
Karma: 4
Posts: 994
I LOVE THIS STUFF!!!!
|
 |
« Reply #2 on: May 02, 2012, 08:24:22 pm » |
Okay I think I get what you are saying. Lemme put it this way, say its set up like this http://arduino.cc/en/uploads/Tutorial/ArduinoUSBSerial.pngOnly the thing on the breadboard is the mega2560. Could I do the same dealio?
|
|
|
|
|
Logged
|
Accelerate to 88 miles per hour.
|
|
|
|
Global Moderator
Melbourne, Australia
Offline
Shannon Member
Karma: 218
Posts: 13897
Lua rocks!
|
 |
« Reply #3 on: May 02, 2012, 08:43:33 pm » |
Yes I presume (apart from the difficulty of doing that with the SMD chip). But it would need the bootloader on the chip. A "raw" chip might not come with it.
|
|
|
|
|
Logged
|
|
|
|
|
Wisconsin
Offline
God Member
Karma: 4
Posts: 994
I LOVE THIS STUFF!!!!
|
 |
« Reply #4 on: May 02, 2012, 08:44:48 pm » |
Can't I just do the same process on getting the ATmega2560 bootloader on there as I would an ATmega328P, other than selecting the proper bootloader?
|
|
|
|
|
Logged
|
Accelerate to 88 miles per hour.
|
|
|
|
Global Moderator
Melbourne, Australia
Offline
Shannon Member
Karma: 218
Posts: 13897
Lua rocks!
|
 |
« Reply #5 on: May 02, 2012, 11:27:28 pm » |
What process would that be? When you select "burn bootloader" it needs an external programmer.
The bootloader uses data from the serial ports (Tx, Rx) to modify the sketch in flash memory. It can't replace itself.
And even if it could, on a raw chip from the manufacturer the bootloader is not there anyway.
On the diagram you linked to are only connections to the serial ports. Burning a bootloader requires either a high-voltage programmer like the AVR Dragon, or a programmer that connects to the SPI pins: MOSI/MISO/SCK and RESET. The methods for burning a bootloader are built into the chip, but they have to be done using SPI or high-voltage programming.
It's no big deal, you may as well add the pins needed for that, you would need them anyway to run any sort of SPI device.
|
|
|
|
|
Logged
|
|
|
|
|
SE USA
Offline
Faraday Member
Karma: 33
Posts: 3621
@ssh0le
|
 |
« Reply #6 on: May 02, 2012, 11:46:54 pm » |
you can use a pre existing 168/328 setup as a SPI programmer, its 4 wires (not counting +5 and ground) and not rocket science, hell its an example in the IDE since post .18 your biggest issue is soldering down that high pitch, high pin count part and coming up with a board for it for the price and effort you might as well just get a mega, here is a cheap one http://arduino.cc/forum/index.php/topic,102760.0.htmlI got one, its slow boating its way from china, but cr0sh likes it
|
|
|
|
|
Logged
|
http://arduino.cc/forum/index.php?action=unread;boards=2,3,4,5,67,6,7,8,9,10,11,66,12,13,15,14,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,86,87,89,1;ALL
|
|
|
|
Wisconsin
Offline
God Member
Karma: 4
Posts: 994
I LOVE THIS STUFF!!!!
|
 |
« Reply #7 on: May 03, 2012, 09:29:16 am » |
Well I would need a development board although I really want to use the 2560 elsewhere, using the arduino bootloader.
|
|
|
|
|
Logged
|
Accelerate to 88 miles per hour.
|
|
|
|
|
|
Wisconsin
Offline
God Member
Karma: 4
Posts: 994
I LOVE THIS STUFF!!!!
|
 |
« Reply #9 on: May 03, 2012, 11:04:33 am » |
ehhh, looks great although I think i'll just get the mega clone. I can solder those pitches fine its just developing it.
I think i'd rather pay for the entire development board for $32.99 rather than the breakout for $45+
|
|
|
|
|
Logged
|
Accelerate to 88 miles per hour.
|
|
|
|
0
Offline
God Member
Karma: 6
Posts: 918
Arduino rocks
|
 |
« Reply #10 on: May 03, 2012, 04:41:39 pm » |
As Nick pointed out.. this: http://arduino.cc/en/uploads/Tutorial/ArduinoUSBSerial.pngis not the diagram for flashing the bootloader.. that is for using your Arduino as a passive/pass-through FTDI type device to get/upload your sketches 'through' the Arduino to the target chip/circuit on the breadboard. For bootloading you use RESET D10 D11 D12 D13 (SPI bus) and you leave your Atmega328 chip in the Arduino (where as you take it out for pass-through sketch uploading)
|
|
|
|
|
Logged
|
|
|
|
|
Wisconsin
Offline
God Member
Karma: 4
Posts: 994
I LOVE THIS STUFF!!!!
|
 |
« Reply #11 on: May 03, 2012, 05:54:22 pm » |
Yes, I've done that before. I may have mistyped but I was wondering if that was the set up for uploading sketches.
|
|
|
|
|
Logged
|
Accelerate to 88 miles per hour.
|
|
|
|
|