AdxL345
I'm probably staring at something I can't see.
Here's my program and its debug output.
When I move the ADXL345 the only value that changes is b3 (from 163 to 164). I was expecting all the values to change.
I've tried 1k, 4.7k, 10k and no pull-up resistances with the same result
.I'm running the picaxe and ADXL345 off two LR14 batteries (3V).
Any idea what I'm missing?
I'm probably staring at something I can't see.
Here's my program and its debug output.
When I move the ADXL345 the only value that changes is b3 (from 163 to 164). I was expecting all the values to change.
I've tried 1k, 4.7k, 10k and no pull-up resistances with the same result
.I'm running the picaxe and ADXL345 off two LR14 batteries (3V).
Any idea what I'm missing?
Code:
#PICAXE08M2
#no_data
HI2CSETUP I2CMASTER, 0xA6, i2cslow, i2cbyte
pause 500
HI2COUT 0x31,(0x01) 'Put the ADXL345 into +/- 4G range
pause 500
HI2COUT 0x2D,(0x08) 'Put the ADXL345 into Measurement Mode
pause 500
main:
HI2CIN 0x32,(b1,b2,b3,b4,b5,b6)
debug
goto main
;The SDO pin is connected to ground, CS pin is connected to VCC
;SCL is connected to pin C.1, SDA is connected to pin c.2, both are pulled high by 4.7k resistors
Last edited: