I'd like to interface a Memsic 2125 dual axis accelerometer to an
>embedded Linux system that has some GPIO pins. So in essence,
>I'd like to emulate the Basic Stamp's pulsin function.
>
>However, the part needs to measure a PWM duty cycle with resolution
>of (at least) 1ms from 0 to 20.
>
>Does anyone have ideas on doing that? nanosleep() and friends
>appear to have good granularity, but they, and other Linux timers
>are constrained by the kernel's tick time (10ms typical).
Get a small PIC or AVR and interface it to the accelerometer. Use the serial port to get the data.
You could also use a basic stamp as the interface chip and use its serial commands to talk to linux. This isn't the cheapest solutions, but it would work.