Instructions for WinAVR users

Prayog board can be programmed directly from WinAVR IDE like any other AVR. You can use any programmer hardware supported by avrdude (like USBasp, USBTiny, PonySer etc) to download the Hex file onto the micro controller's flash. You can also use our USB Loader shield (Coming soon) to download the Hex data directly from WinAVR IDE. Steps for WinAVR are shown below…

  1. Open WinAVR IDE, There should be a blank project initially…
  2. Write your C program for AVR in the text editing area…
  3. Save the file as main.c in a new project folder (you can save with other name with .c extension)
  4. WinAVR commands in Tools menu Tools→ [WinAVR] Make Clean , [WinAVR] Make All, [WinAVR] Make Program, all use avr-gcc and avr-dude in the back end. avr-gcc is used for compilation of High language code written in C (e.g. main.c) and avr-dude is used for downloading the HEX file onto the flash of avr device. WinAVR uses MakeFile to process the commands easily. Makefiles are special kind of files that contains bunch of commands or instructions that can be executed by calling/ executing the 'make' command from commandline. WinAVR automate the process of Code compilation, linking and programming for us using these MakeFiles. To make your own Makefiles you can use an useful tool called mFile [WinAVR] it a visual tool for generating MakeFiles according to your configuration.
  5. Once you have configured your own Makefile place it into the same folder as your C code file (main.c) in.
  6. Now, you are ready to compile your code in WinAVR IDE. Go to Tools → [WinAVR] Make All (If everything is correct at your side, this should give no error and HEX should be generated in the folder where the Makefile and main.c (file.c) was stored)
  7. By default Make All command generate Hex file name same as that of your .c main source file, in my case main.hex\
  8. Connect your programmer (USBasp in my case) to the Prayog board using 10 Pin FRC connector
  9. Its time to download this main.hex (in my case, may be different for you) onto the flash of avr device. To do that, in WinAVR go to Tools→ [WinAVR] Make Program. This command will use avrdude in back end to program the flash. avrdude will use programmer name specified by you in Makefile (e.g. USBasp in my case). Tutorial on generating custom Makefile
  10. If everything goes fine,, (all your connections with Programmer, Your Overall Hardware, Power Supply etc. ) it should give output something like this in the bottom pane of WinAVR

devesh samaiya 2012/07/28 14:13 No Copyrights, Use it as if it is yours !


Fatal error: Allowed memory size of 100663296 bytes exhausted (tried to allocate 72 bytes) in /home/electroo/public_html/wiki/inc/auth/plain.class.php on line 296