Example Problem: Accelerometer Interface
Accelerometer output has one wire!
- Acceleration coded as the duty cycle
- pulse-width/cycle-length
- cycle time = 10ms
Write a C program that measures the acceleration
- Input is low-order bit of variable X
- Assign result to variable Z
- Make up whatever you need