Relevant background for this project is here: https://www.electro-tech-online.com/microcontrollers/124301-indirect-data-addressing-when-done.html
I thought a progress note might be appreciated by those who have helped so far and decided a more meaningful title also was needed.
Today, I got the first real data from the Memsic MXD2020E accelerometer. At zero g, the 100Hz output is at 50% duty cycle, i.e., high period is 5 mS. That changes about 35 uS per degree of tilt for tilts less than 10°. For my application, I would like to resolve to at least 0.5°, which will equate to being within 3/8" of level at a distance of 42".
Counts are measured using this routine:
With 4 MHz clock on my 12F509, that requires 5 uS per count or roughly 7 counts per degree. Experimentally, I got a 17-count difference when I raised the sensor about 2 degrees. Is there any faster way to do it?
Here's what my baby looks like:
As for success in contacting Memsic to get MXC6202G accelerometer that reports directly in I2C, so far nada.
John
I thought a progress note might be appreciated by those who have helped so far and decided a more meaningful title also was needed.
Today, I got the first real data from the Memsic MXD2020E accelerometer. At zero g, the 100Hz output is at 50% duty cycle, i.e., high period is 5 mS. That changes about 35 uS per degree of tilt for tilts less than 10°. For my application, I would like to resolve to at least 0.5°, which will equate to being within 3/8" of level at a distance of 42".
Counts are measured using this routine:
Code:
Data_count
btfss Data_Y ;still high?
goto BIN2BCD ;decimal formats hi_count and sends to LCD
incf hi_count ;data counter
goto Data_count ;Data_count takes 5 cycles per count
;******************************************************************************
With 4 MHz clock on my 12F509, that requires 5 uS per count or roughly 7 counts per degree. Experimentally, I got a 17-count difference when I raised the sensor about 2 degrees. Is there any faster way to do it?
Here's what my baby looks like:
As for success in contacting Memsic to get MXC6202G accelerometer that reports directly in I2C, so far nada.
John