You’ll find an example program which reads values from the ADC and outputs them via the serial port. What next? Take a look at the folder uc/analog2usb in my repository. Ok, now we have a AVR with a serial boot loader installed. If you use a different programmer than the MK2 you can change the parameters in the Makefile. The makefile uses avrdude to flash the chip. Insert the ATMega8 into your AVR-MK2 programmer and type make program and the boot loader will be flashed and the fuses of the AVR are set accordingly (clock is set to 8MHz).The folder uc/avrprog_boot_v0_85 contains the boot loader.Check out my repository using mercurial ( hg clone ).The boot loader presented in this post will enable you to do so. If non of these events occur in a specified time, the boot loader hands the control on to the main program.įor many applications it is nice to be able to change the program running on the microcontroller without the need of a special programming hardware. This program usually waits for some kind of action like a pulled up pin or data reception via the serial port. The idea is: When the AVR wakes up from reset a special program is started, called the boot loader. This is not unusual for nowadays microcontrollers but for a legacy like device like an AVR it is really nice to have. One great thing about AVR microcontroller is that they can “program theirselves”.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |