Pages

Wednesday 18 March 2015

Programming With AVR Microcontroller: Chapter 2

BURNING THE CODE        
  1. AVR osp-2
  1. click on avr osp
  2. The default avr osp 2 will look like this

3.First you need to configure your avr osp to check its connected to the same com port or not    and default Baud rate 


4.you can manually select the device which you are using or else u can even auto detect it  



5.In device select which device you are using as here I am using ATmega 16 I have selected that .Even you can Auto Detect your device that option will automatically Detect your Device which you are using




6.after pressing auto detect you will see this means that your microcontroller has been detected and it read to flash program on to it



7.To flash the program on the Microcontroller You Browse the program and Then click on program after click on the program it will flash the program.



8.Browse your hex file where you have  store



9.After clicking on program it will erase the previous content of the chip and will flash the program on to the chip 



10.After  the completion of the flash it will compare the flash data if its equal than it means that your flash is successful and it will show “Equal”


2.SINA PROG 2.1

  • If You are using ISP Atmega Programmer to Burn the code In Your Microcontroller than this Programmer will surely come in handy
  • Its simple to use and You can easily use the Microcontroller For External Crystal Frequency
 
  • If You Want to Change Internal Frequency Or want To use External Crystal Frequency than You can change the Fuse.
 

  • Here You Can Set Internal Frequency To
  1. 1 MHz
  2. 2 MHz
  3. 4 MHz
  4. 8 MHz
  • If You want to use External Frequency than select Ext.Crys.
(If Ext Crys Doesn’t work properly than Try changing the BC valve as shown in Below Pic)


  • Usually For Atmega 16 it comes out to be BC 32 KHz and For Atmega 32 BC 16 KHz but try with Other Valve if this Doesn’t Works.