Electronics For You

B d tub yb eyd v b DB ER U VBUU B B Y

- B I

Normally, ATMbL’s AVR microcontr­ollers are progrDmmed XVLng prRgrDmmer­s. There are many ways to program Whe AVR mLFrRFRnWr­ROOerV, VXFh DV in-system programmin­g, parallel progrDmmLn­g Dnd XVLng ERRWORDder. Advantage with the bootloader method LV WhDW yRX dRn’W need Dny exWernDO hDrdwDre WR ORDd Whe hex fiOe Rn Whe microcontr­oller. A bootloader program is placed inside the boot section of the )ODVh memRry, WR hDndOe FRmmXnLFDW­LRn wLWh Whe hRVW PC Dnd IDFLOLWDWe prRgrDmmLn­g RI ERWh )ODVh Dnd ((PROM.

Programmin­g using bootloader

7he ERRWORDder firmwDre ORDded Rn Whe microcontr­oller allows in-system programmin­g directly via TuD and RuD pins of the microcontr­oller. The code responsibl­e for in-system programmin­g via serial port resides in the configXrDE­Oe ERRW memRry VeFWLRn RI Whe mLFrRFRnWr­ROOer. :hen VLgnDOOed XVLng external switch while resetting the microcontr­oller, it gets active and waits IRr FRmmXnLFDW­LRn IrRm Whe PC IRr ORDdLng Whe hex fiOe Rn Whe mLFrRFRnWr­ROOer’V flDVh memRry. 7he PC VendV 1 1 0 0 Whe hex fiOe WR Whe mLFrRFRnWr­ROOer. 7he code residing in the boot section loads Whe hex fiOe Rn Whe mLFrRFRnWr­ROOer’V flDVh memRry.

lnce the programmin­g process is complete, newly loaded code can be exeFXWed Ey preVVLng reVeW. OnFe Whe code is loaded on the microcontr­oller, UAR7 LV Iree Dnd FDn Ee XVed IRr RWher applicatio­ns.

Note that the bootloader gets invoked only if boot switch is kept pressed while the microcontr­oller is reVeW XVLng reVeW switch.

The Flash memo-

 ??  ?? Fig. 2: Circuit to program the microcontr­oller using the bootloader
Fig. 2: Circuit to program the microcontr­oller using the bootloader
 ??  ?? Fig. 1: Program memory organisati­on
Fig. 1: Program memory organisati­on
 ??  ??

Newspapers in English

Newspapers from India