AirStick TDMA Firmware for ATmega16 version 1 Brian Mayton February 2008 1. INTRODUCTION This document describes the addresses and functions of the registers on the AirStick. If you add additional registers, you should update this file and turn it in with your code when you turn in the lab. Note, however, that you should not alter the register mapping or functions in a way that will break the baseline AirStick specification without first consulting a TA. 2. REGISTERS The AirStick is controlled by the iMote2 by a set of registers, similar to how you controlled the accelerometer on the basic sensor board. Some of these registers allow you to control operation of the AirStick, while others allow you to read the values measured by the sensor. Note that when you are reading from the accumulator registers, after reading the low byte, the AirStick will not update again until the high byte has also been read. 3. REGISTER MAP Address r/w Description ------------------------------- 0x00 - 0x03 (r): AirStick signature (should always be 'ASTK') 0x04 - 0x07 (r): Group identifier (4-character string that identifies the group that wrote this version of the firmware) 0x08 (r): firmware version number (increment as you make changes) 0x10 (r/w): status byte bit 0 (r/w) - Power ON bit 1 (r) - Right board present (0) or not present (1) bit 2 (r) - Left board present (0) or not present (1) bit 3 (r) - multiplexing mode - (0) for TDMA, (1) for CDMA bits 4-7 - undefined (read as 0) 0x20 (r): Accumulator for north pad, low byte 0x21 (r): Accumulator for north pad, high byte 0x22 (r): Accumulator for south pad, low byte 0x23 (r): Accumulator for south pad, high byte 0x24 (r): Accumulator for west pad, low byte 0x25 (r): Accumulator for west pad, high byte 0x26 (r): Accumulator for east pad, low byte 0x27 (r): Accumulator for east pad, high byte 0x80 (r/w): Number of samples to integrate