Author Topic: bootloader in diecimila  (Read 2155 times)

0 Members and 1 Guest are viewing this topic.

Offline kunaldgr8Topic starter

  • Full Member
  • ***
  • Posts: 84
  • Helpful? 0
bootloader in diecimila
« on: February 05, 2012, 06:52:10 AM »
can anyone tell my how to burnbootloader in arduino diecimila without any need of extra hardware

Offline joe61

  • Supreme Robot
  • *****
  • Posts: 417
  • Helpful? 16
Re: bootloader in diecimila
« Reply #1 on: February 05, 2012, 08:13:39 AM »
Do you mean you want to burn a new bootloader? If so you have to have a programmer that avrdude supports.

Offline kunaldgr8Topic starter

  • Full Member
  • ***
  • Posts: 84
  • Helpful? 0
Re: bootloader in diecimila
« Reply #2 on: February 05, 2012, 08:45:53 AM »
But on arduio datasheet it is given that bootloader is already burned in its atmega 168. cant i directly burn it useing ide.?????????

Offline joe61

  • Supreme Robot
  • *****
  • Posts: 417
  • Helpful? 16
Re: bootloader in diecimila
« Reply #3 on: February 05, 2012, 08:58:46 AM »
Yes, you can. What's the question again?

You can program the arduino with the USB cable using the IDE.

You can also burn a new bootloader using the IDE, but you have to have a hardware programmer connected to the six pin interface.

Joe

Offline kunaldgr8Topic starter

  • Full Member
  • ***
  • Posts: 84
  • Helpful? 0
Re: bootloader in diecimila
« Reply #4 on: February 05, 2012, 10:11:31 AM »
no i mean that after i write my code then to put it in my board is it must to buy a hardware programer or i can put my hex file without it

Offline joe61

  • Supreme Robot
  • *****
  • Posts: 417
  • Helpful? 16
Re: bootloader in diecimila
« Reply #5 on: February 05, 2012, 10:57:27 AM »
You can program the arduino with the USB cable using the IDE.

If you're unfamiliar with the IDE, see the introductory page at http://arduino.cc/en/Guide/Environment . Also notice the other links at the top of the page. These provide access to documentation on various aspects of the language, libraries, etc.

After you write your code use the upload button (described in the link) to program the arduino through the USB cable.

Joe

Offline kunaldgr8Topic starter

  • Full Member
  • ***
  • Posts: 84
  • Helpful? 0
Re: bootloader in diecimila
« Reply #6 on: February 05, 2012, 11:23:55 AM »
then what is Burning bootloader??????

Offline joe61

  • Supreme Robot
  • *****
  • Posts: 417
  • Helpful? 16
Re: bootloader in diecimila
« Reply #7 on: February 05, 2012, 11:35:44 AM »
The bootloader is software on the Arduino that lets you write programs to the chip using the USB cable rather than a hardware programmer.

Until the bootloader is there, you have to use a hardware programmer. Clearly then you can't use the USB cable to write a bootloader to the chip without a hardware programmer. It sounded like you were trying to set up a bootloader on a new chip or something.

If that's not what you're doing, then since the Arduino comes with a bootloader already there, you don't have to worry about it. In other words, if what you want to do is put your program onto the Arduino, just use the IDE, and forget about the bootloader. You don't need to deal with it.

Joe

Offline kunaldgr8Topic starter

  • Full Member
  • ***
  • Posts: 84
  • Helpful? 0
Re: bootloader in diecimila
« Reply #8 on: February 05, 2012, 10:32:33 PM »
1 More question if my memory gets filled then how can i delete my programs from my arduino

Offline rbtying

  • Supreme Robot
  • *****
  • Posts: 452
  • Helpful? 31
Re: bootloader in diecimila
« Reply #9 on: February 06, 2012, 12:48:36 AM »
Only one program gets stored in the Arduino's flash memory, each upload overwrites the previous program. If your program is too large, it won't let you upload it at all.

Offline kunaldgr8Topic starter

  • Full Member
  • ***
  • Posts: 84
  • Helpful? 0
Re: bootloader in diecimila
« Reply #10 on: February 06, 2012, 01:01:38 AM »
Then do i need to buy a shield or something if i want to store a larger program

Offline newInRobotics

  • Supreme Robot
  • *****
  • Posts: 1,015
  • Helpful? 48
  • N.I.R.
Re: bootloader in diecimila
« Reply #11 on: February 06, 2012, 02:37:12 AM »
Then do i need to buy a shield or something if i want to store a larger program
What sort of monster program have You written that it takes all the space available?
My guess is that You did not use optimization option. Use that, and Your code size will be reduced as well as code will be executed in more efficient manner.
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian W

Offline kunaldgr8Topic starter

  • Full Member
  • ***
  • Posts: 84
  • Helpful? 0
Re: bootloader in diecimila
« Reply #12 on: February 06, 2012, 05:31:54 AM »
no i was just asking

Offline newInRobotics

  • Supreme Robot
  • *****
  • Posts: 1,015
  • Helpful? 48
  • N.I.R.
Re: bootloader in diecimila
« Reply #13 on: February 06, 2012, 06:17:00 AM »
no i was just asking
As far as I'm aware, there are no ways to extend memory used to place software (hex file). One of the main disadvantages (maybe some considers it an advantage) is that You have to know all ins and outs of how to write efficient uC software, otherwise You'll soon end up running out of resources provided by uC. Read [TUT][C]Optimization and the importance of volatile in GCC to better understand what code optimization is  ;)

Good luck.
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian W

Offline joe61

  • Supreme Robot
  • *****
  • Posts: 417
  • Helpful? 16
Re: bootloader in diecimila
« Reply #14 on: February 06, 2012, 09:57:09 AM »
Then do i need to buy a shield or something if i want to store a larger program

The short answer is you'd have to buy another chip that either has more memory, or can access external memory.

The longer answer is that you'd have to be doing quite a bit to run out of memory with an Arduino. The chip itself does a lot of things without requiring supervision by the program. For example, say you're building a photovore, so you need to read two analog inputs, and use those values to set PWM output for motors. That might only require enough code to set up the registers, and nothing at all in the main loop.

I got into this stuff as a Unix/linux programmer, and it took some doing for me to get used to how much stuff these little 8-bit chips can do on their own.  The compiler settings used by the Arduino environment are setup to optimize for size, and the optimizer does a good job. For now, I'd say don't worry about it, just write programs. If you run out of memory, worry about it then.

Joe

 


data_list