Sunday, 20 November 2016

Tutorial 1: Bootloading Atmega 328p with USBasp programmer [Easiest]

 Bootloading Atmega 328p with USBasp Programmer [Easiest]


Hello arduino lovers,

The most common issue with Arduino is how to make a Standalone.

One way is to use your on board chip onto your standalone project but wait... why? 

When you can boot load your chip in less than 30 seconds with the help of USBasp programmer by setting only 4 fuse bits.

Let's begin.

List of Components

Hardware

1) Zero PCB or Breadboard

2) Atmega 328P

3) 16 MHz Crystal 

4) 22 pf capacitor

5) USBasp Programmer 

Software 

1) AVRDUDESS 2.4

2) Arduino IDE  

Tested on WIN 7 professional, AVRDUDESS 2.4 & Arduino 1.6.0. 

Step 1: Setting up connections

Follow circuit below



 Add 16MHz crystal alongwith 22pf capacitors. Sorry, lazy enough to draw.

Results: Don't confuse about pin base i used 40 pin becoz that's available at the moment.

 



Step 2: Setting up fuse bits.

After making connections as per circuit, its time to set fuse bits to your Atmega328.

Caution : Implement this step with full attention, writing wrong fuse bits might kill your chip.

Open AVRDUDESS and follow below figures

Figure 1: Select programmer USBasp



Figure 2: Detect your chip version, if connections are ok it'll automatically detect your chip



Figure 3: Writing fuse bits. 
Note that chip comes with default fuse bits as (yours may vary)
L- 0x62
H - 0xD9
E - 0x07
L - 0xFF


Replace these fuse bits with the following
L - 0xFF
H - 0xDE
E - 0x05
LB - 0x3F    
and tick set fuse option and then click write as shown

 
 Voila! You have successfully written fuse bits.

Step 3: Burning the beast oh! sorry Boot loader.

Choose the path as shown in figure.




 After choosing path from AVRDUDESS, click on program button as shown.



Wait for some time say 10-20 seconds until logs will cease to come in black area. That's it.

You have successfully loaded boot loader into Atmega 328 p. You can use it as standalone or as a replacement in Arduino board.

Hope, you liked this article. Don't forget to share.

Take a look at video tutorial
https://www.youtube.com/watch?v=nh3h9gwOF4Q

   

No comments:

Post a Comment