SlideShare une entreprise Scribd logo
1  sur  4
Télécharger pour lire hors ligne
Programming Atmega using BootLoader 
 

Many  expensive  programmers  exist  for  the  Atmega,  but  after  many  hours  of  research,  we  have  put 
together  this  guide  to  explain  how  to  program  the  Atmega  without  the  use  of  a  programmer.    The 
programmer  like  AVR  ISP  MKII  USB  or  STK500  is  required  only  once  before  the  Atmega  can  program 
itself.  The key to self‐programming is Atmega’s bootloader capability. 

Gather resources 
Ensure that you have the following resources ready: 

    1.   Atmega 324 (bootloader hex files are provided ) 
    2.   Ensure 16Mhz external crystal because bootloader is programmed for this frequency setting 
    3.   STK500 or AVR ISP MKII USB Programmer (one‐time use) 
    4.   Latest version of AVR Studio – Download from Atmel’s website 
    5.   Install MegaLoad.Net program (provided) 
    6.   Make a note of the location of bootLoader_512Byte_Atmega324_9600bps.hex file. 
    7.   Power up your PCB and connect the ISP programming cable to your PCB. 

Program the BootLoader  
    1. Open AVR Studio and choose to connect to your Atmega to program the bootloader 
       AVR Studio   Tools   Program AVR   Connect 
    2. Either choose STK500 and COM port or AVR ISP MKII USB depending on your programmer 
    3. Ensure correct chip type is selected by going to “Program” tab and selecting “Atmega324P” 




SJVE                                                                                               Page 1 of 4 
4. Go to “Board” Tab and select “125Khz” ISP Frequency and click “Write” 




                                                      
   5. Go to “Fuses” tab and choose the following configuration ‐ note the 5 check marks and uncheck 
      everything else: 




                                                                                                    
   6. Choose “Program” to program the fuse bits. 
   7. Go back to “Board” Tab and select “1Mhz” and click “Write” 




SJVE                                                                                     Page 2 of 4 
8. Go to the “Program” Tab and click on the “…” button next to “Input HEX File” under FLASH 
       section and browse to bootLoader_Atmega324_9600bps.hex  file and hit Program button: 




                                                       
    9. You have successfully loaded the bootloader software. 

                                




SJVE                                                                                      Page 3 of 4 
Program the chip using the self­programming bootloader software 
After loading the bootloader program, the actual programming hex file can be loaded easily using the 
MegaLoad.Net program. 

    1. Compile your project in CodeVision or similar compiler. 
    2. Locate your program’s HEX file in your CodeVision project directory 
    3. Connect your serial cable to microcontroller’s serial input which is PD0 and PD1.  Reference your 
       PCB manual for details on how to setup serial input and output. 
    4. Turn on your microcontroller. 
    5. Open MegaLoad.Net and click on “OPEN” for FLASH file and browse to the hex file from step 2. 
    6. Click on “Open Port” button until Port opens up. 
    7. Your Atmega should have programmed automatically after the COM PORT opened up, if not, 
       then hit the “reset” switch on the PCB. 
    8. To load new programming file, compile your project in CodeVision and hit Atmega’s reset switch 
       and MegaLoad.Net will automatically install the new file.  If you do not want to program the 
       chip, simply close MegaLoad.Net to avoid unintentional programming. 

 
Tips for advanced users 
    1. You  could  use  “bootLoader_Atmega324_38400bps.hex”  file  when  you  programmed  the  boot 
       loader.  This way, MegaLoad.net would program 4 times faster when you open the COM PORT 
       at  38400bps.    The  only  slight  problem  is  that  if  you  are  using  Xbee  wireless  transceivers  to 
       program, you would need to change the Xbee’s transmission rate to 38400bps as well.  You can 
       use  XCTU  to  easily  do  it.    In  theory,  wireless  transmission  errors  occur  more  at  higher  bps  so 
       consider it before you use 38400, although Xbee’s tend to be very reliable. 

References 
http://www.microsyl.com/ 
http://www.imagecraft.com/ 

 




SJVE                                                                                                     Page 4 of 4 

Contenu connexe

Tendances

ClusterDesktop how-to transfer sound on your remote device
ClusterDesktop how-to transfer sound on your remote deviceClusterDesktop how-to transfer sound on your remote device
ClusterDesktop how-to transfer sound on your remote deviceEmil Parashkevov
 
Configuracionde router camilaloaiza
Configuracionde router camilaloaizaConfiguracionde router camilaloaiza
Configuracionde router camilaloaizaOnce Redes
 
3 g modem_tutorial
3 g modem_tutorial3 g modem_tutorial
3 g modem_tutorialaljarous
 
Athens IoT Meetup #3 - Introduction to ESP8266 (Pavlos Isaris)
Athens IoT Meetup #3 - Introduction to ESP8266 (Pavlos Isaris)Athens IoT Meetup #3 - Introduction to ESP8266 (Pavlos Isaris)
Athens IoT Meetup #3 - Introduction to ESP8266 (Pavlos Isaris)Athens IoT Meetup
 
Server Room Configuration
Server Room ConfigurationServer Room Configuration
Server Room ConfigurationChandler Morgan
 
rpi_audio configuration steps
rpi_audio configuration stepsrpi_audio configuration steps
rpi_audio configuration stepsKenny (netman)
 
Top 10 Microcontrollers and Development Boards for Students
Top 10 Microcontrollers and Development Boards for StudentsTop 10 Microcontrollers and Development Boards for Students
Top 10 Microcontrollers and Development Boards for StudentsMadhavi Sharma
 
C pci 3971-datasheet_en_1
C pci 3971-datasheet_en_1C pci 3971-datasheet_en_1
C pci 3971-datasheet_en_1Yasir Mehmood
 
Readme e
Readme eReadme e
Readme eanonidj
 
Instructions for Use of the Renesas C Compiler for the Robo Interface
Instructions for Use of the Renesas C Compiler for the Robo InterfaceInstructions for Use of the Renesas C Compiler for the Robo Interface
Instructions for Use of the Renesas C Compiler for the Robo InterfacePaulo Marcelo Pontes
 
Installing and deploying ubuntu server box
Installing and deploying ubuntu server boxInstalling and deploying ubuntu server box
Installing and deploying ubuntu server boxJuan Carlos Pérez Pardo
 
Quick start vera with rfx_com
Quick start vera with rfx_comQuick start vera with rfx_com
Quick start vera with rfx_comDomotica daVinci
 
Remotely Attacking System Firmware
Remotely Attacking System FirmwareRemotely Attacking System Firmware
Remotely Attacking System FirmwarePriyanka Aash
 

Tendances (20)

Microcontroller part 1
Microcontroller part 1Microcontroller part 1
Microcontroller part 1
 
ClusterDesktop how-to transfer sound on your remote device
ClusterDesktop how-to transfer sound on your remote deviceClusterDesktop how-to transfer sound on your remote device
ClusterDesktop how-to transfer sound on your remote device
 
Configuracionde router camilaloaiza
Configuracionde router camilaloaizaConfiguracionde router camilaloaiza
Configuracionde router camilaloaiza
 
Read me
Read meRead me
Read me
 
3 g modem_tutorial
3 g modem_tutorial3 g modem_tutorial
3 g modem_tutorial
 
Athens IoT Meetup #3 - Introduction to ESP8266 (Pavlos Isaris)
Athens IoT Meetup #3 - Introduction to ESP8266 (Pavlos Isaris)Athens IoT Meetup #3 - Introduction to ESP8266 (Pavlos Isaris)
Athens IoT Meetup #3 - Introduction to ESP8266 (Pavlos Isaris)
 
Microcontroller part 9_v1
Microcontroller part 9_v1Microcontroller part 9_v1
Microcontroller part 9_v1
 
Server Room Configuration
Server Room ConfigurationServer Room Configuration
Server Room Configuration
 
Microcontroller part 7_v1
Microcontroller part 7_v1Microcontroller part 7_v1
Microcontroller part 7_v1
 
rpi_audio configuration steps
rpi_audio configuration stepsrpi_audio configuration steps
rpi_audio configuration steps
 
Top 10 Microcontrollers and Development Boards for Students
Top 10 Microcontrollers and Development Boards for StudentsTop 10 Microcontrollers and Development Boards for Students
Top 10 Microcontrollers and Development Boards for Students
 
Microcontroller part 2
Microcontroller part 2Microcontroller part 2
Microcontroller part 2
 
C pci 3971-datasheet_en_1
C pci 3971-datasheet_en_1C pci 3971-datasheet_en_1
C pci 3971-datasheet_en_1
 
Microcontroller part 8_v1
Microcontroller part 8_v1Microcontroller part 8_v1
Microcontroller part 8_v1
 
Readme e
Readme eReadme e
Readme e
 
Instructions for Use of the Renesas C Compiler for the Robo Interface
Instructions for Use of the Renesas C Compiler for the Robo InterfaceInstructions for Use of the Renesas C Compiler for the Robo Interface
Instructions for Use of the Renesas C Compiler for the Robo Interface
 
Installing and deploying ubuntu server box
Installing and deploying ubuntu server boxInstalling and deploying ubuntu server box
Installing and deploying ubuntu server box
 
Quick start vera with rfx_com
Quick start vera with rfx_comQuick start vera with rfx_com
Quick start vera with rfx_com
 
Azbox me
Azbox meAzbox me
Azbox me
 
Remotely Attacking System Firmware
Remotely Attacking System FirmwareRemotely Attacking System Firmware
Remotely Attacking System Firmware
 

Similaire à Program Atmega using BootLoader without an external programmer

Creating an Embedded System Lab
Creating an Embedded System LabCreating an Embedded System Lab
Creating an Embedded System LabNonamepro
 
Pic programming gettingstarted
Pic programming gettingstartedPic programming gettingstarted
Pic programming gettingstartedAjit Padmarajan
 
Android Application Development Environment Setup
Android Application Development Environment SetupAndroid Application Development Environment Setup
Android Application Development Environment SetupIan Pinto
 
AutoDock, AutoGrid, AutoDockTools (GUI), and Open Babel Tutorial
AutoDock, AutoGrid, AutoDockTools (GUI), and Open Babel TutorialAutoDock, AutoGrid, AutoDockTools (GUI), and Open Babel Tutorial
AutoDock, AutoGrid, AutoDockTools (GUI), and Open Babel TutorialJohn Cahill
 
ABC Consolidated Financial InfoABC Companys current financial inf.docx
ABC Consolidated Financial InfoABC Companys current financial inf.docxABC Consolidated Financial InfoABC Companys current financial inf.docx
ABC Consolidated Financial InfoABC Companys current financial inf.docxransayo
 
Get Started with MicroPython ESP32
Get Started with MicroPython ESP32Get Started with MicroPython ESP32
Get Started with MicroPython ESP32fanghe22
 
Get Starte with MicroPython ESP32
Get Starte with MicroPython ESP32Get Starte with MicroPython ESP32
Get Starte with MicroPython ESP32fanghe22
 
Taishaun_OwnensCNS-533_Lab
Taishaun_OwnensCNS-533_LabTaishaun_OwnensCNS-533_Lab
Taishaun_OwnensCNS-533_LabTaishaun Owens
 
2018.02.11 installation guide rhapsody in c and cpp
2018.02.11 installation guide rhapsody in c and cpp2018.02.11 installation guide rhapsody in c and cpp
2018.02.11 installation guide rhapsody in c and cppFrank Braun
 
Diyobd2 solved fa qs for fgtech galletto 2 master
Diyobd2 solved fa qs for fgtech galletto 2 masterDiyobd2 solved fa qs for fgtech galletto 2 master
Diyobd2 solved fa qs for fgtech galletto 2 masterspobd2
 
Larson and toubro
Larson and toubroLarson and toubro
Larson and toubroanoopc1998
 
InstallationGuide.pdf
InstallationGuide.pdfInstallationGuide.pdf
InstallationGuide.pdfsahirzakaria
 
verilog basics.ppt
verilog basics.pptverilog basics.ppt
verilog basics.ppt8885684828
 
Getting started with IBM Rational Rhapsody in Ada
Getting started with IBM Rational Rhapsody in AdaGetting started with IBM Rational Rhapsody in Ada
Getting started with IBM Rational Rhapsody in AdaFrank Braun
 
How to work with code blocks
How to work with code blocksHow to work with code blocks
How to work with code blocksTech Bikram
 
Unit III ARM Interface and ARM Programming
Unit III ARM Interface and ARM Programming Unit III ARM Interface and ARM Programming
Unit III ARM Interface and ARM Programming Dr. Pankaj Zope
 
Virtual box installation
Virtual box installationVirtual box installation
Virtual box installationNiranjan Pandey
 

Similaire à Program Atmega using BootLoader without an external programmer (20)

Creating an Embedded System Lab
Creating an Embedded System LabCreating an Embedded System Lab
Creating an Embedded System Lab
 
Pic programming gettingstarted
Pic programming gettingstartedPic programming gettingstarted
Pic programming gettingstarted
 
Android Application Development Environment Setup
Android Application Development Environment SetupAndroid Application Development Environment Setup
Android Application Development Environment Setup
 
AutoDock, AutoGrid, AutoDockTools (GUI), and Open Babel Tutorial
AutoDock, AutoGrid, AutoDockTools (GUI), and Open Babel TutorialAutoDock, AutoGrid, AutoDockTools (GUI), and Open Babel Tutorial
AutoDock, AutoGrid, AutoDockTools (GUI), and Open Babel Tutorial
 
ABC Consolidated Financial InfoABC Companys current financial inf.docx
ABC Consolidated Financial InfoABC Companys current financial inf.docxABC Consolidated Financial InfoABC Companys current financial inf.docx
ABC Consolidated Financial InfoABC Companys current financial inf.docx
 
Get Started with MicroPython ESP32
Get Started with MicroPython ESP32Get Started with MicroPython ESP32
Get Started with MicroPython ESP32
 
Get Starte with MicroPython ESP32
Get Starte with MicroPython ESP32Get Starte with MicroPython ESP32
Get Starte with MicroPython ESP32
 
Taishaun_OwnensCNS-533_Lab
Taishaun_OwnensCNS-533_LabTaishaun_OwnensCNS-533_Lab
Taishaun_OwnensCNS-533_Lab
 
2018.02.11 installation guide rhapsody in c and cpp
2018.02.11 installation guide rhapsody in c and cpp2018.02.11 installation guide rhapsody in c and cpp
2018.02.11 installation guide rhapsody in c and cpp
 
Diyobd2 solved fa qs for fgtech galletto 2 master
Diyobd2 solved fa qs for fgtech galletto 2 masterDiyobd2 solved fa qs for fgtech galletto 2 master
Diyobd2 solved fa qs for fgtech galletto 2 master
 
Larson and toubro
Larson and toubroLarson and toubro
Larson and toubro
 
InstallationGuide.pdf
InstallationGuide.pdfInstallationGuide.pdf
InstallationGuide.pdf
 
MDT Step public
MDT Step publicMDT Step public
MDT Step public
 
verilog basics.ppt
verilog basics.pptverilog basics.ppt
verilog basics.ppt
 
Getting started with IBM Rational Rhapsody in Ada
Getting started with IBM Rational Rhapsody in AdaGetting started with IBM Rational Rhapsody in Ada
Getting started with IBM Rational Rhapsody in Ada
 
How to work with code blocks
How to work with code blocksHow to work with code blocks
How to work with code blocks
 
Unit III ARM Interface and ARM Programming
Unit III ARM Interface and ARM Programming Unit III ARM Interface and ARM Programming
Unit III ARM Interface and ARM Programming
 
STM -32
STM -32STM -32
STM -32
 
learning STM -32
learning STM -32 learning STM -32
learning STM -32
 
Virtual box installation
Virtual box installationVirtual box installation
Virtual box installation
 

Program Atmega using BootLoader without an external programmer

  • 1. Programming Atmega using BootLoader    Many  expensive  programmers  exist  for  the  Atmega,  but  after  many  hours  of  research,  we  have  put  together  this  guide  to  explain  how  to  program  the  Atmega  without  the  use  of  a  programmer.    The  programmer  like  AVR  ISP  MKII  USB  or  STK500  is  required  only  once  before  the  Atmega  can  program  itself.  The key to self‐programming is Atmega’s bootloader capability.  Gather resources  Ensure that you have the following resources ready:  1. Atmega 324 (bootloader hex files are provided )  2. Ensure 16Mhz external crystal because bootloader is programmed for this frequency setting  3. STK500 or AVR ISP MKII USB Programmer (one‐time use)  4. Latest version of AVR Studio – Download from Atmel’s website  5. Install MegaLoad.Net program (provided)  6. Make a note of the location of bootLoader_512Byte_Atmega324_9600bps.hex file.  7. Power up your PCB and connect the ISP programming cable to your PCB.  Program the BootLoader   1. Open AVR Studio and choose to connect to your Atmega to program the bootloader  AVR Studio   Tools   Program AVR   Connect  2. Either choose STK500 and COM port or AVR ISP MKII USB depending on your programmer  3. Ensure correct chip type is selected by going to “Program” tab and selecting “Atmega324P”  SJVE    Page 1 of 4 
  • 2. 4. Go to “Board” Tab and select “125Khz” ISP Frequency and click “Write”    5. Go to “Fuses” tab and choose the following configuration ‐ note the 5 check marks and uncheck  everything else:    6. Choose “Program” to program the fuse bits.  7. Go back to “Board” Tab and select “1Mhz” and click “Write”  SJVE    Page 2 of 4 
  • 3. 8. Go to the “Program” Tab and click on the “…” button next to “Input HEX File” under FLASH  section and browse to bootLoader_Atmega324_9600bps.hex  file and hit Program button:    9. You have successfully loaded the bootloader software.      SJVE    Page 3 of 4 
  • 4. Program the chip using the self­programming bootloader software  After loading the bootloader program, the actual programming hex file can be loaded easily using the  MegaLoad.Net program.  1. Compile your project in CodeVision or similar compiler.  2. Locate your program’s HEX file in your CodeVision project directory  3. Connect your serial cable to microcontroller’s serial input which is PD0 and PD1.  Reference your  PCB manual for details on how to setup serial input and output.  4. Turn on your microcontroller.  5. Open MegaLoad.Net and click on “OPEN” for FLASH file and browse to the hex file from step 2.  6. Click on “Open Port” button until Port opens up.  7. Your Atmega should have programmed automatically after the COM PORT opened up, if not,  then hit the “reset” switch on the PCB.  8. To load new programming file, compile your project in CodeVision and hit Atmega’s reset switch  and MegaLoad.Net will automatically install the new file.  If you do not want to program the  chip, simply close MegaLoad.Net to avoid unintentional programming.    Tips for advanced users  1. You  could  use  “bootLoader_Atmega324_38400bps.hex”  file  when  you  programmed  the  boot  loader.  This way, MegaLoad.net would program 4 times faster when you open the COM PORT  at  38400bps.    The  only  slight  problem  is  that  if  you  are  using  Xbee  wireless  transceivers  to  program, you would need to change the Xbee’s transmission rate to 38400bps as well.  You can  use  XCTU  to  easily  do  it.    In  theory,  wireless  transmission  errors  occur  more  at  higher  bps  so  consider it before you use 38400, although Xbee’s tend to be very reliable.  References  http://www.microsyl.com/  http://www.imagecraft.com/    SJVE    Page 4 of 4