Society of Robots - Robot Forum
Software => Software => Topic started by: kunaldgr8 on February 05, 2012, 06:52:10 AM
-
can anyone tell my how to burnbootloader in arduino diecimila without any need of extra hardware
-
Do you mean you want to burn a new bootloader? If so you have to have a programmer that avrdude supports.
-
But on arduio datasheet it is given that bootloader is already burned in its atmega 168. cant i directly burn it useing ide.?????????
-
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
-
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
-
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 (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
-
then what is Burning bootloader??????
-
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
-
1 More question if my memory gets filled then how can i delete my programs from my arduino
-
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.
-
Then do i need to buy a shield or something if i want to store a larger program
-
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.
-
no i was just asking
-
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 (http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=97382) to better understand what code optimization is ;)
Good luck.
-
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