EE281 Project - Ioan Tudosa

Stanford University, Fall 2001


Introduction
 
 
Design
 
 
Hardware
 
 
Software
 
 
Results
 
 
Improvements
 
Schematics

Below are the AVR-GCC files of the Transmitter and Receiver part of the project. Both files are self contained with no dependencies or multiple header file. Althouh it would have made the code clearer to divide it in several parts I am not that comfortable writing in C yet.

Receiver.c

Transmitter.c

One advice: when you want to use math.h library functions you have to tell the linker to include the object code of the library. Oherwise the GCC will have only the header with the prototype functions and will generate error. The solution is to use the -lm flag with the linker like in my makefile. A good explanation why math.h has a special treatment is found in AVR GCC forum (Basically it is because such complex function are not built in to AVR, so you have to use software routines, and gcc doesn't compile them if you don't use them. You have to tell it explicitly to do that)

Another Picture