USBasp is an in-circuit programmer for Atmel micro-controllers. It is a nice option if you're just starting with micro-controllers, especially those from Atmel and aren't willing to spend much on a programmer. USBasp uses in-circuit programming interface for uploading your compiled code to the micro-controller.
Before we can use the USBasp we need to make sure that we install the drivers correctly. If you are a Linux or Mac OS user, there's no need to install any driver as your machine will automatically detect the USBasp. So driver installation comes for Windows user like me. It is easy to install the drivers for USBasp, all you need to do are just carry out few steps that I will be telling.
Step 1
Download the Zadig application from here. Zadig is an application that has a set of some generic usb drivers and one of them is for USBasp. Now plug in USBasp before running the application.
Step 2
Once you have started the Zadig application, check if you can find USBasp in list of device in the drop down menu. If you're not seeing USBasp in the list make sure you plugged the USBasp properly. If you have plugged in your USBasp again and still not seeing name of your device in list, click on the 'Options' button and click on 'Show all devices' and you should be able to see USBasp.
Zadig
Step 3
Once you see the usb device in drop-down list, select the driver you want to install in our case we need to select 'libusb-win32(v1.2.6.0)' for USBasp and then click 'Install Driver'. This will install the driver for USBasp driver in few seconds. After driver is installed open device manager and you should be seeing USBasp under libsub devices.
Click on Install Driver
Driver Successfully Installed
USBasp showing up in device manager
So in just 3 easy steps we have successfully installed driver for USBasp programmer, now if you want to check if device is properly communicating with computer you can just check it using AVRDUDE(part of WinAVR) in command line or by using AVRDUDESS (GUI for AVRDUDE). Start AVRDUDESS and select USBasp in select programmer drop-down menu and click detect on right hand side of the window, you will see that some LED on your USBasp flickers that means computer has successfully communicated with USBasp, at bottom you will see 'Unable to detect MCU' that's because we haven't hooked up any micro-controller to the USBasp. In next post I will be telling how to set-up an Atmega328/P chip for getting started with actual coding.
in AVRDUDESS
I have also made a video tutorial for the same post you can also watch that to understand better.
Now that you have probably installed the driver for USBasp , it's time that we move on to mount the basic circuit for Atmega328 and get it running on the breadboard. You can get a new Atmega328/P micro-controller or just scavenge one from an Arduino UNO lying around. Before we mount the circuit on breadboard here's the of components that are required. Atmega328/P (28 PIN DIP package) 22pf Ceramic Capacitors Qty 2 nos. 16MHz crystal Qty 1 nos. [have 2-3 in spare just in case the one in use is damaged] Tactile Switch/Push Button Qty 1 nos. Resistor 10K Ohm Qty 1 nos. LED 1 nos. Breadboard Connecting Wires The schematic below shows how to configure Atmega328/P on breadboard. I have posted a hand drawn schematic as well as an eagle schematic. Before you mount the circuit lets understand functions of pin that we are using to make a basic circuit of Atmega328/P. Configuring Atmega328/P [Click to Open) Pin 1 [PC6(RE...
Thanks for explaining ;)
ReplyDelete