Some basic question about AVR chips and Arduino

ern, can i say the bootloader as serial to USb downloader? enable the code to be downloaded through usb

Vincent19:
ern, can i say the bootloader as serial to USb downloader?

Grammatically, no.

enable the code to be downloaded through usb

You would actually be uploading it through USB, not downloading it.

uploading it to 5he chip right ? if no then what is bootloader actually?

Vincent19:
uploading it to 5he chip right ? if no then what is bootloader actually?

See reply #8

Vincent19:
uploading it to 5he chip right ? if no then what is bootloader actually?

Yes, code is uploaded to the chip.

How can I know that 2kb is used for the bootloader file ? I want to see for the difference when I upload bootloader and remove bootloader but I cant see it ><

The optiboot (used on an UNO) is 1467 bytes (hardware/arduino/bootloaders/optiboot/optiboot_atmega328.hex). That's how you can know it.

I mean for the total available size for the sketch. When I burn bootloader, the chip memory would be reduced by approximate 2kb right ? But where can I see it ?

Vincent19:
How can I know that 2kb is used for the bootloader file ? I want to see for the difference when I upload bootloader and remove bootloader but I cant see it ><

See the difference in what? The size? Add 2K if you are using the bootloader to upload the sketch, don't if you are not.

I mean I want to see the difference in the size..LOL. Cause I want to experiment something..Heheh..

Vincent19:
I mean I want to see the difference in the size..LOL. Cause I want to experiment something..Heheh..

Well you could always look at the maximum upload memory size defined for each entry in the arduino core file 'boards.txt'.

You can see that the Uno has a value of:
uno.upload.maximum_size=32256

While the Duemilanove has a value of:
atmega328.upload.maximum_size=30720

The difference is the size of the bootloader memory size protection options used to hold the two different bootloaders used by these too boards.

Lefty

I mean I want to see the changes on the same chip..Is it possible ?

The situation is like this :

Now I have a fresh atmega 328, So I want to see the maximum memory

Next, I burn bootloader into the fresh atmega chip. Then I want to see the maximum memory for now.

Is it possible ?

In the same vein, I have a similar question but not so technical. I ended up blasting the analog channels and now I get "processor out of sync" and it won't accept a program or run the existing one. Clearly this is bad. If I install a new Atmega328 chip on the card, (assuming that nothing else is destroyed), can I program it in-situ using the Arduino software and get a working unit once more? Just curious. The chips are only a couple of bucks versus a new card being 20-30 dollars.

Thanks.

thorargent:
In the same vein, I have a similar question but not so technical. I ended up blasting the analog channels and now I get "processor out of sync" and it won't accept a program or run the existing one. Clearly this is bad. If I install a new Atmega328 chip on the card, (assuming that nothing else is destroyed), can I program it in-situ using the Arduino software and get a working unit once more? Just curious. The chips are only a couple of bucks versus a new card being 20-30 dollars.

Thanks.

Yes, assuming no other components got zapped a simple replacement of the 328p chip will get you operational, that's one of the greatest advantages of a arduino board that uses a socketed DIP uP chip. However to save you some greef if you haven't already learned how to burn bootloaders onto blank chips or if you don't own a hardware programmer or a second functioning arduino board I would suggest you buy your chip with a bootloader already burned into the chip for just a few dollars more. SparkFun has them as well as other speciality vendors.

Lefty

Vincent19:
I mean I want to see the changes on the same chip..Is it possible ?

The situation is like this :

Now I have a fresh atmega 328, So I want to see the maximum memory

Next, I burn bootloader into the fresh atmega chip. Then I want to see the maximum memory for now.

Is it possible ?

  1. Look at the datasheet to determine the maximum amount of program memory.
  2. Burn the bootloader.
  3. Grab a calculater
  4. Take the number determined in step one and subtract 2K.
  5. The result will be the amount of memory left.

I want to see it from system the memory left.

Is it possible ?

No, not from my experiences...I have tried.

  1. google avr-size;
  2. run it on your computer.
  3. done.

Hey guys, if I use the internal oscillator runs at 8MHz, it is for sure will be different for the speed right ?

So I want to ask, if I use 16MHz external crystal, I run delay(1000), it will delay for 1s right ?

Is it any difference if I use 8MHz internal oscillator to run delay(1000) ?

How can I create another board (Atmega 328 instead of atmega 328P so that I do not need to always change the signature when burn the bootloader.

If I am using arduino UNO, for sure I can not configure it to use internal 8MHz crystal right unless I do a breadboard arduino right ? Am I correct ?

Thank you