August 12, 2010 8:47 PM
Very Basic Beginner Assembly Tutorial III: How to Use Avrdude
by Anna Kaziunas FranceSee the Very Basic Beginner Assembly Tutorial: How to Use Gavrasm to compile an .asm flie
Note: If you do not yet have avrdude installed or if you are a windows user and need avr studio - see Lady Ada’s tutorials for detailed information on how to download, setup, configure and use these programs. Lady Ada’s AVR software installation tutorial:
Again - Lady Ada has excellent detailed tutorials on how to use avrdude check the out for details on what the all the commands are and what they do - I will just give the very basics here to help you program a chip.
Open your command line interface and navigate to the directory that contains the file you want to flash to the microcontroller.
Connect your AVR programmer to your computer - I prefer the usbtiny (also created by Lady Ada and available at a reasonable price from adafruit studios).
If your board has an resonator / external clock you will need to set the fuses first before attempting to program the microcontroller. You must do this first. However, once the fuses are set - you do not have to do it again. The fuses are set only once. You can reprogram the microcontroller as many times as you want after the fuses are set.
example to set fuses:
parts used in this example:
avrdude -p t44 -c bsd -U lfuse:w:0x7E:m
You need to change the parts in the code above to match the parts you are using in order for it to work. Ask you instructor if you are confused.
example to set fuses: parts used in this example:
avrdude -p t45 -c usbtiny -U lfuse:w:0x7E:m
generic example to flash microcontroller:
avrdude -p microcontroller -c programmer -U flash:w:program.hex
example with actual data:
parts used in this example:
avrdude -p t44 -c usbtiny -U flash:w:freqrx3.hex
August 12, 2010 8:21 PM
Very Basic Beginner Assembly Tutorial II: How to Use Gavrasm to compile an .asm flie
by Anna Kaziunas FranceThis tutorial instructs you on how to compile an assembly language file (.asm) into a .hex flie using Gavrasm (Gerd’s AVR Assembler). the .hex file can then be uploaded to a AVR microntroller using Avrdude (or another program.)
Open your command line interface and type:
gavrasm
If Gavrasm is installed you will see (your version number may vary):
+------------------------------------------------------------+ | gavrasm gerd's AVR assembler Version 2.5 (C)2010 by DG4FAC | +------------------------------------------------------------+
You can download and install Gavrasm from here: http://www.avr-asm-tutorial.net/gavrasm/index_en.html.
*Note: if you are running a Mac OS (especially a pre-intel / PPC - Power PC Mac see my tutorial on where to get the compiled Gavrasm for PPC Macs or how to compile it yourself. *
A. navigate to the directory where the file that you want to compile is located.
- if you are unfamilar with unix commands: s To list the files in your current directory type:
ls
To change directory / navigate into a specific listed directory type (where directory name is the name of the directory you want to move to):
cd directoryname
To move upwards in the directory tree structure type”
cd ..
If you know the pathname of the directory that you want - type in the pathname of the directory preceded by “cd”
ex:
cd /Desktop/mydirectory/mydirectory2
you can find more about general unix commands b doing a general internet search.
B. After navigating the correct directory - type:
gavrasm filename.asm
where “filename.asm” is the name of the assembly file you want to compile.
Gavrasm will inform you if there are warnings. For the most part you can ignore the warnings. Ask your Fab Academy instructor if they are something you should be concerned about.
If there are errors in compiling your file - Gavrasm will refuse to create a .hex file and will throw a bunch of error messages at you. Use these error messages to fix the problem.
If you don’t understand them - google the error or look at the datasheet for the microcontroller that you are using. See my tutorial on “Datasheet Tips”. Ask your instructor if you are confused - odds are they have encountered this many times. You must fix the errors in the program before it will compile.
August 11, 2010 8:30 PM
Very Basic Assembly Tutorial I: Where to Get Gavrasm for the Mac OS
by Anna Kaziunas FranceHaving problems compiling Gavrasm on your Mac? Here is where to get Gavrasm (Gerd’s AVR Assembler) pre-compiled binaries for the Mac OS.
Download Anna Kaziunas France’s compiled version
Download Kelly Snook’s compiled version
Download David Mellis’ compiled version
Pre-compiled binaries for Windows and Linux are available from the Gavrasm homepage. http://www.avr-asm-tutorial.net/gavrasm/index_en.html
May 19, 2010 1:54 AM
Final Project Plan: PuppetMaster Universal Remote
by Anna Kaziunas France
My final project for Fab Academy is a universal remote I am calling PuppetMaster, due to its ability to wirelessly control out of reach objects / devices using the fingers. This device enables the user to remotely control infrared receiving devices (such as a television or stereo) from a maximum distance of 100 - 150 feet. The user of PuppetMaster will be able to operate the remote by using switches embedded in the fingertips. The board and power supply will be worn around the wrist like a watch or bracelet. (This makes weight and a small form factor a major design consideration for this project). Additional controls will be added in later stages. (see details below)
Form Factor / General Idea Mockup
If IR model - Infrared LED would be placed on top of hand in wrist strap.




I intend to fab the boards myself, using the standard fab inventory parts with a few exceptions, (especially the sensors used in the later stages). The first stage (to be completed by June 1 for the fab academy final project) consists of one mode of control (IR) but other modes (radio, bluetooth and additional gestural sensors) will be added as the project progresses. (See stages outlined below.) A dial or switching mechanism will be added to switch between the modes. These additional modes (combined with the necessary code) will allow the user to control almost any device with hand gestures. I am also keen to develop a gestural language in tandem with the addition of 6-axis sensors (3 axis gyro, 3 axis accelerometer) to the device.
I intend to use a lithium battery for lighter weight and longer life - that may need to come later, I am not sure I will have time to design a power supply.
Prototype in stages, adding functionality and additional control channels / technologies in each stage
1.0 Stage 1: Infrared
1.1. Use infrared to turn off on devices, navigate devices (most likely television)
1.1.1. Most likely commands:
1.1.1.1.On
1.1.1.2.Off
1.1.1.3.Up channel
1.1.1.4.Down channel
1.1.1.5.Other specialty features?
1.2. Power supply -> LiPo model uses lightweight lithium battery and outputs 5V
1.2.1 This is perfect for the TV-B-Gone style board I want to create / modify / fab
1.3 Parts List for puppetmaster (phase 1 - IR)
1.4. Complete working prototype by 6/01/2010
2.0 Stage 2: Radio Control
2.1. Add radio control to Stage 1 prototype
2.2. Enable mode switching on input device - different modes - different gestures
2.3. Experiment with driving a RC device.
2.4. Complete working prototype by 6/30/2010
3.0 Stage 3: Bluetooth
3.1. Add Bluetooth to Stage 1 prototype
3.2. Enable mode switching on input device - different modes - different gestures
3.3. Experiment with driving a RC device.
3.4. Complete working prototype by 7/30/2010
4.0 Stage 4: 6-axis motion sensors
4.1. Add additional sensors to interface:
4.1.1. 6-axis motion sensors (3 axis gyro, 3 axis accelerometer) to input gestures.
4.2. Complete working prototype by 11/01/2010
5.0 Stage 5: Gestural Language
5.1. Utilize 6-axis motion sensors (3 axis gyro, 3 axis accelerometer) to input gestures.
5.2. Creation of full blown gestural language (possibly based on sign language)
5.3. Complete working prototype by 11/01/2010
6.0 Stage 6: Personal LAN
6.1. Connect to the internet to create personal LAN.
6.1.1. Most likely by fabbing a board that can plug into an iphone,
6.1.2. This board could then provide any other user devices with data access
6.1.3. Could connect to Premonition system
6.2. Complete working prototype by 11/01/2010
| Stage | Description | Deliverable | Date Range |
| 1.0 | Infrared | Working infrared remote prototype | 05/16/2010 - 06/01/2010 |
| 2.0 | Radio Control | Working infrared remote prototype + radio control | 06/01/2010 - 06/30/2010 |
| 3.0 | Bluetooth | Working infrared remote prototype + radio control + bluetooth | 07/01/2010 - 7/30/2010 |
| 4.0 | 6-axis Sensors (gyro, acelorometer) | Stages 1 or 2 plus working sensor prototype | 06/01/2010 - 11/01/2010 |
| 5.0 | Gestural Language | Gestural language mapped to the 6-axis sensors | 06/01/2010 - 11/01/2010 |
| 6.0 | Personal LAN | Local area network driven by iphone data access that can wirelessly provide data to other personal devices. | 08/01/2010 - 11/01/2010 |
February 17, 2010 2:16 PM
New bazaar tutorial
by Noah BedfordUsing bazaar with the fab academy repository
This tutorial doesn't have the server setup part like the previous one did, and goes a bit more into managing files.
-\n
January 11, 2010 5:21 PM
Intro to Bazaar
by Noah BedfordFirst, inform bazaar as to your personage:
bzr whoami "Mr. Foo <mrfoo@as220.org>"
Then, make a directory for your repository: mkdir repository
Initialize the repository:
bzr init
Add the current directory:
bzr add *
Make the first commit:
bzr commit -m "Hello World"
Now, every time you want to add files, run
bzr add <files>
again, and
bzr commit -m "Message".
start an ssh server (openssh-server in ubuntu, check the box in the preferences window in OSX), and run
bzr branch sftp://user@ip-address/path/to/directory
Then
bzr pull
To update the repository, bzr commit again and then
bzr push
Have fun!
-\n
Very Basic Beginner Assembly Tutorial III: How to Use Avrdude
Very Basic Beginner Assembly Tutorial II: How to Use Gavrasm to compile an .asm flie
Very Basic Assembly Tutorial I: Where to Get Gavrasm for the Mac OS
Final Project Plan: PuppetMaster Universal Remote