Course Materials




MUSIC 250A / CS377C
Human Computer Interaction Theory and Practice:
Designing New Devices

    Step-by-step lab tutorial



      This step-by-step tutorial is geared for students with little familiarity with Linux. This guide will provide assistance for various steps of lab 1 to help you get acquainted with common commands and programs that will be used throughout the course.

      Setup - downloading the avrlib and avrlib demos

      • To copy things to your directory from a browser, simply click on the linked file. A window will pop up announcing that you have choses to download a file. Select the option "Save this file to disk." This opens another window asking where the file should be saved. Select the location of your ~/250a folder and hit "save."
      • To decompress a file, change directories in a terminal window until you are in the directory the file is located in. Type tar xzf avrlib_ccrma-20020923.tar.gz to extract the files.

      Examining *.c files

      • Read through the demo code and see if you can understand what the program does, and how. Each demo illustrates some aspect of the hardware's capabilities.
      • Good programs to use to inspect the *.c files are pico and xemacs.
        ~/avrlib-demo/demo1> pico flash.c
        ~/250a/avrlib-demo/demo1> xemacs flash.c &

      Trying out programs

      • First, make sure the hardware is set up correctly. The board should be powered, and a serial cable should join the programming connector to the computers serial port.
      • Double check the program's comments to make sure that you have your jumper cables configured correctly.
      • Next, compile the files by typing make in the file directory. This creates several files in the directory, most notably a *.hex file which is to be downloaded to the processor.
      • Upon sucessful compilation, type make load to download the compiled code on the microprocessor.

      back



    Send comments about this page to gurevich@ccrma.stanford.edu
    Last modified: Wed Sep 25 15:13:54 PDT 2002