User:Sandip Pune

From Fab Lab Wiki - by NMÍ Kvikan
Revision as of 20:46, 15 January 2010 by Sandip Pune (Talk | contribs)

Jump to: navigation, search

How to Download the programme file for hello world circuits There are three steps need to follow to complete the task

  1. write code for assembly if you are writing new codes or use assembly code available for hello circuit.
  2. compile assembly code to hex code using "gvrasm"
  3. download the hex AVR using "avrdude"

Step1 if working on a linux/Ubuntu, go to the terminal window to search the assembly file in the PC, type "which_ file". then change to the directory where the assembly file is by using command "cd name of directory"

type "Ls" to see list of file.there asm file will appers.

Step 2

  1. in the terminal window type "gavrasm file.MTA.asm, hit enter
  2. assembly file will convert to hex file and this file is ready to send to the micro controller of circuit.

Step3

  1. download "avrdude in-circuit programmer" from URL http://fab.cba.mit.edu/about/fab/

avrdude programmer for different Tyne microcontroller are

    1. tiny45 load hex file, bsd cable: avrdude -p t45 -c bsd -U flash:w:file.hex
    2. tiny45 load hex file, dasa cable: avrdude -p t45 -P /dev/ttyUSB0 -c dasa -U flash:w:file.hex
    3. tiny45 load hex file, dragon: avrdude -p t45 -P usb -c dragon_isp -U flash:w:file.hex
    4. tiny44 load hex file: avrdude -p t44 -c bsd -U flash:w:file.hex
    5. tiny44 use 20 MHz xtal: avrdude -p t44 -c bsd -U lfuse:w:0x7E:m
    6. mega88 load hex file: avrdude -p m88 -c bsd -U flash:w:file.hex
    7. mega88 use 20 MHz xtal: avrdude -p m88 -c bsd -U lfuse:w:0x76:m
    8. mega644 load hex file: avrdude -p m644 -c bsd -U flash:w:file.hex
    9. mega644 use 20 MHz xtal: avrdude -p m644 -c bsd -U lfuse:w:0x76:m
  1. if you are using tiny 45 microcontroller with serial port and ICP cable then select avrdude -p t45 -c bsd -U flash:w:file.hex
  2. in the terminal window type, avrdude -p t45 -c bsd -U flash:w:file.hex eg. avrdude -p t45 -c bsd -U flash:w:hello.RGB.45.MTA.hex
  3. connect circuit serial port to computer and power supply to circuit
  4. after doing this hit enter in the terminal window the message appears as shown in "Image:AVRDUDE.png
  5. circuit is ready with programme.
  6. if programme is not installed in microcontroller then you will get the message as shown in Avrdude not respond.JPG
  7. trouble shoot the circuit and cable.