A Driver for the Electronics Australia Pocket Sampler

A simple linux kernel module to drive the August 1996 EA Pocket Sampler.

Kit Documentation

Some time ago (1999-05-11) Max Lock emailed me about the driver and hardware unit, he was kind enough to email me some PDFs of the kit plans. These are a little more modern than mine, this unit has a precision voltage reference and requires no calibration, identical ADC hardware though.

Some Pictures of the Hardware

Talking To It

A simple linux char device driver was written to talk to the device.

eapsampler.c

It implements:

Honors O_NONBLOCK and is concurrent read() safe. It should compile on linux 1.2.13, 2.0.3x and 2.2.1x, and most likely will work on later kernels too.

The User/Kernel Protocol

read() Returns lines of 4 integers. The first two are the sample time, epoch seconds, and microseconds (from do_gettimeofday()). The third is the level switch position for that sample (2 or 20 volts). The forth is the raw sample, 0-255.

In single shot mode (see below), a single sample is returned on read(), later reads on the same file descriptor will return 0 bytes readable. In periodic sampling mode, a blocking read() will occur, making the device node appear like a pipe.

write() Writting to the device controls the sampling interval. An integer in plain text is written to the device to change the sampling period. A zero will yield single shot mode, any other value will cause a sample to be taken every 100ms times that value. The default intial value is zero, or single shot mode.

open(), select(), and close() work as expected.

The code is here: eapsampler and eapsampler-2.0.tar.gz

[Back] © 2002 Alan Yates <alany(at)alanyates(dot)com>

Valid XHTML 1.0! Valid CSS!