Author Topic: Burning Bootloader Into An ATMEGA CHIP (2560,328...etc)  (Read 7789 times)

0 Members and 1 Guest are viewing this topic.

Offline ChrisGreece52Topic starter

  • Frequent Contributor
  • **
  • Posts: 829
  • Country: gb
  • Electronics Engineer - Hacker - Nerd
Burning Bootloader Into An ATMEGA CHIP (2560,328...etc)
« on: February 03, 2013, 11:15:00 pm »
I want to do it some day soon and i dont know how...
1)what should i need to build
(i think i am going to need only a serial to usb and a serial that communicates with the chip)
2)What is the process
3)Can the bootloaded Chip be programmed after the process or shall i do anything else?

Thank you.
 

Online notsob

  • Frequent Contributor
  • **
  • Posts: 703
  • Country: au
Re: Burning Bootloader Into An ATMEGA CHIP (2560,328...etc)
« Reply #1 on: February 03, 2013, 11:21:49 pm »
young grasshopper, it is probably time that you visited avrfreaks.net and some arduino forums
 

Offline adam1213

  • Regular Contributor
  • *
  • Posts: 120
  • Country: au
Re: Burning Bootloader Into An ATMEGA CHIP (2560,328...etc)
« Reply #2 on: February 04, 2013, 02:04:40 am »
Why do you want to burn the bootloader onto these chips? Is your aim to be able to program the chips in the first place?
 

Offline ChrisGreece52Topic starter

  • Frequent Contributor
  • **
  • Posts: 829
  • Country: gb
  • Electronics Engineer - Hacker - Nerd
Re: Burning Bootloader Into An ATMEGA CHIP (2560,328...etc)
« Reply #3 on: February 04, 2013, 06:12:34 am »
Ive seen projects where they burn a bootloader and program/use the Atmega on a board for controlling other stuff like stepper motors and stuff.
as for the link thanks.
 

Offline psycho0815

  • Regular Contributor
  • *
  • Posts: 150
  • Country: de
    • H-REG Blog
Re: Burning Bootloader Into An ATMEGA CHIP (2560,328...etc)
« Reply #4 on: February 04, 2013, 09:12:19 am »
To programm a mcu you generally need a programmer. So you write your code, compile it and flash it to your microcontroller via the ISP Interface using your programmer.
A Bootloader is alittle programm that eliminates the need for a programmer by providing another means of loading the programm into the flash. usually the UART Interface. Together with a USB-TTL converterchip that means you can programm your chip via usb. That's what arduino does. However you do need a programmer to install the bootloader and if you have a programmer, you don't really need a bootloader, so depending on what your endgoal is a bootloader might not be particulary useful for your needs.
If you like, check out my blog (german):
http://h-reg.blogspot.de
 

Offline Thor-Arne

  • Supporter
  • ****
  • Posts: 500
  • Country: no
  • tinker - tinker, little noob.....
Re: Burning Bootloader Into An ATMEGA CHIP (2560,328...etc)
« Reply #5 on: February 04, 2013, 11:03:58 am »
Hi Chris.

You can also buy a pre programmed ATmega 328, and a crystal and a couple of capacitors. Then you can use the Uno as a "programmer", just make sure you get a pre progammed one that has the same version as your Uno.

Also, you could take a look at the Arduino Nano. These are really small.

I also suggest you check out the Arduino home page, forum and playground. There should be a lot of tips and tricks there.
 

Offline tld

  • Regular Contributor
  • *
  • Posts: 86
  • Country: no
    • Personal Website
Re: Burning Bootloader Into An ATMEGA CHIP (2560,328...etc)
« Reply #6 on: February 04, 2013, 11:26:07 am »
I want to do it some day soon and i dont know how...

Well, we can certainly fix that, can't we? :)

1)what should i need to build
(i think i am going to need only a serial to usb and a serial that communicates with the chip)

What you need is an ISP, or In-System-Programmer.

You can build that, but it can be a bit of a chicken and egg problem.  You could make a programmer with an atmega328, but you'd have to program the atmega before you can use it to program an atmega...

That said, you might already have the required hardware.  If you have an Arduino, you can use it.  Read more here:
http://arduino.cc/en/Tutorial/ArduinoISP

That's not a very great programmer, but it'll get the job done.

If you don't have an arduino to use, you can pick up a cheap programmer from $2 and up, on eBay and various other such places.

Search for things like usbtinyisp, uspasp, and so on.

Even if you have an arduino to program with, I'd still order a dedicated ISP.  They're faster, and they're $2.

Note that you *can* fuzz up a chip, in which case you might need what's called a HV-programmer to fix it.

As long as you first understand what you're doing, and then do it, you'll likely be fine most of the time, except for when you make mistakes.

2)What is the process

In a tiny nutshell, something like:

avrdude -c usbtiny -p attiny2313 -U flash:w:test_leds.hex

You can either flash your program directly, or flash a bootloader.

Adafruit has more info:

http://www.ladyada.net/learn/avr/avrdude.html

3)Can the bootloaded Chip be programmed after the process or shall i do anything else?

I'm not entirely sure if you understand the relationship between bootloading and programming.

You can program a chip *before* you bootload it.  Actually, bootloading it is just programming it with a bootloader.

One of the good things about having an ISP, is that you can program the chip *directly*, without a bootloader.  You can do that in the Arduino-interface I think, or directly from command-line.

If you do want to use a bootloader, you'd need correct frequency etc, for it to work properly.  Other than that, you're good to go.

Hope this helps.

tld

 

Offline IanJ

  • Supporter
  • ****
  • Posts: 1665
  • Country: scotland
  • Full time EE & Youtuber
    • IanJohnston.com
Re: Burning Bootloader Into An ATMEGA CHIP (2560,328...etc)
« Reply #7 on: February 04, 2013, 12:10:36 pm »
ChrisGreece52,

Power up your new Arduino, download the Arduino IDE and start experimenting with C++, adding/using libraries and interfacing to various hardware. Once you do that THEN you can think about what you may need to do in the future.

I'm not trying to dictate, far from it.........just enjoy Arduino for what it is at the moment and get some experience under your belt and on the workbench (without adding any extra cost I might add). Your decisions and choices will change once you've done that.

PS. The only thing I might suggest you do fairly early on is to use an external editor such as Notepad++..............the Arduino IDE editor sucks!
You can also use Visual Studio 2010 by installing Visual Micro plugin for VS.........but only do that if you are already used to VS.

Ian.
Ian Johnston - Original designer of the PDVS2mini || Author of the free WinGPIB app.
Website - www.ianjohnston.com
YT Channel (electronics repairs & projects): www.youtube.com/user/IanScottJohnston, Twitter (X): https://twitter.com/IanSJohnston
 

Offline jaqie

  • Regular Contributor
  • *
  • Posts: 104
  • Country: 00
  • Genuine Girl Techie
Re: Burning Bootloader Into An ATMEGA CHIP (2560,328...etc)
« Reply #8 on: February 04, 2013, 12:17:36 pm »
translated from techie to human for you:

The basics of it are this. the arduino starter devices (like uno, duimelinova, mega, and the like) are little tiny computers called embedded computers.  They don't use a hard drive and cd drives and stuff, they have storage built into the little chip just enough to do little things.  The ones you buy, unless they specifically say they don't, have come with one that can boot up and run things already.  How do you get things onto it? you use the arduino programmer language on your main pc, then tell it to send the data to the arduino via a cable, which is different or each arduino you buy. some go through usb, some you have to buy a special usb to ttl cable, et cetra.

the only time you have to put the bootloader onto the chip is when it didn't already have one (or you accidentally erased it!), and almost always the only way you get one without the right bootloader already on it is if you buy just the chip itself and not the whole board or kit as one package.  Then you have to get fancy.
 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11701
  • Country: my
  • reassessing directives...
Re: Burning Bootloader Into An ATMEGA CHIP (2560,328...etc)
« Reply #9 on: February 04, 2013, 12:46:54 pm »
Quote
are little tiny computers called embedded computers
no they are not "computer", they are "controller".
Quote
How do you get things onto it? you use the arduino programmer language on your main pc
no there is no such thing as "arduino language". and depending on what you are referring to... "programmer language" can be "english" or "ISP".
Quote
the only time you have to put the bootloader onto the chip is when it didn't already have one (or you accidentally erased it!
and when you want to modify it, or put different bootloader into it. erasing it doesnt mean you have to put it back.
Quote
Then you have to get fancy
buying the chip alone is already "get fancy".
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline jaqie

  • Regular Contributor
  • *
  • Posts: 104
  • Country: 00
  • Genuine Girl Techie
Re: Burning Bootloader Into An ATMEGA CHIP (2560,328...etc)
« Reply #10 on: February 04, 2013, 01:00:00 pm »
Someone smack this guy, please? :palm:
 

Offline ChrisGreece52Topic starter

  • Frequent Contributor
  • **
  • Posts: 829
  • Country: gb
  • Electronics Engineer - Hacker - Nerd
Re: Burning Bootloader Into An ATMEGA CHIP (2560,328...etc)
« Reply #11 on: February 04, 2013, 01:01:09 pm »
I want to do it some day soon and i dont know how...

Well, we can certainly fix that, can't we? :)

1)what should i need to build
(i think i am going to need only a serial to usb and a serial that communicates with the chip)

What you need is an ISP, or In-System-Programmer.

You can build that, but it can be a bit of a chicken and egg problem.  You could make a programmer with an atmega328, but you'd have to program the atmega before you can use it to program an atmega...

That said, you might already have the required hardware.  If you have an Arduino, you can use it.  Read more here:
http://arduino.cc/en/Tutorial/ArduinoISP

That's not a very great programmer, but it'll get the job done.

If you don't have an arduino to use, you can pick up a cheap programmer from $2 and up, on eBay and various other such places.

Search for things like usbtinyisp, uspasp, and so on.

Even if you have an arduino to program with, I'd still order a dedicated ISP.  They're faster, and they're $2.

Note that you *can* fuzz up a chip, in which case you might need what's called a HV-programmer to fix it.

As long as you first understand what you're doing, and then do it, you'll likely be fine most of the time, except for when you make mistakes.

2)What is the process

In a tiny nutshell, something like:

avrdude -c usbtiny -p attiny2313 -U flash:w:test_leds.hex

You can either flash your program directly, or flash a bootloader.

Adafruit has more info:

http://www.ladyada.net/learn/avr/avrdude.html

3)Can the bootloaded Chip be programmed after the process or shall i do anything else?

I'm not entirely sure if you understand the relationship between bootloading and programming.

You can program a chip *before* you bootload it.  Actually, bootloading it is just programming it with a bootloader.

One of the good things about having an ISP, is that you can program the chip *directly*, without a bootloader.  You can do that in the Arduino-interface I think, or directly from command-line.

If you do want to use a bootloader, you'd need correct frequency etc, for it to work properly.  Other than that, you're good to go.

Hope this helps.

tld
[/size]

Thanks for that u cleared it up very well for me to understand.
 

Offline ChrisGreece52Topic starter

  • Frequent Contributor
  • **
  • Posts: 829
  • Country: gb
  • Electronics Engineer - Hacker - Nerd
Re: Burning Bootloader Into An ATMEGA CHIP (2560,328...etc)
« Reply #12 on: February 04, 2013, 01:04:48 pm »
translated from techie to human for you:

The basics of it are this. the arduino starter devices (like uno, duimelinova, mega, and the like) are little tiny computers called embedded computers.  They don't use a hard drive and cd drives and stuff, they have storage built into the little chip just enough to do little things.  The ones you buy, unless they specifically say they don't, have come with one that can boot up and run things already.  How do you get things onto it? you use the arduino programmer language on your main pc, then tell it to send the data to the arduino via a cable, which is different or each arduino you buy. some go through usb, some you have to buy a special usb to ttl cable, et cetra.

the only time you have to put the bootloader onto the chip is when it didn't already have one (or you accidentally erased it!), and almost always the only way you get one without the right bootloader already on it is if you buy just the chip itself and not the whole board or kit as one package.  Then you have to get fancy.
[/size]

Thank you that helps
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf