The Accelerometer Interface
The first step in developing the CerfGlove was to install and take readings of the 2-axis accelerometer. Before we could do this we needed to set up the hardware and connect it to the CerfBoard. We decided to use an ADXL202EB dual axis accelerometer and board for our hardware. We outfitted the accelerometer board with a 1.3MW resistor which gave use a period of around 8.65ms or about 115 samples a second maximum. We connected the accelerometer to the CerfBoard's GPIO pins in the following configuration:
By doubling the GPIO pins associated with the accelerometers, we would be able to assign a unique IRQ to both the rising and falling events. The next task was to calculate the absolute maximum and minimums for the individual accelerometer's duty cycles. Since each accelerometer is an independent piece it is necessary to treat them as such and measure them independently. I then devised an equation to deliver a linear scale from 0 to 1023 in both directions according to how many StrongARM OSCR ticks were counted between the rising and falling of the last cycle. There are two important items of note here: (1) The OSCR runs at 3.6864 MHz and (2) notice that we kept our ISRs as small as possible in the code.
The
code we developed was compiled as a character driver using the
Now that we have discussed the basis for how the driver code behaves, all that is left is reading the actual code itself. For your convenience, the code is posted here.
Next - The TCP/IP Server For StrongARM Linux