BeanieBots
Moderator
Read post 30 by Technical.All the inputs are held low with resistors but I can try putting them low with the PICAXE first.
I really hope I find something wrong!
Looks like they might be on to something there!
Read post 30 by Technical.All the inputs are held low with resistors but I can try putting them low with the PICAXE first.
I really hope I find something wrong!
Do you mean about pulsing enable? Should enable be pulsed low then left high or pulsed high then left low? Should there not be a resistor?Read post 30 by Technical.
Looks like they might be on to something there!
It only runs from 4.5-5.5 doesn't it?including the PICAXE
symbol MOT_ENABLE = B.4
symbol XOUT_H = %00000000
symbol XOUT_L = %00000001
symbol YOUT_H = %00000010
symbol YOUT_L = %00000011
symbol ZOUT_H = %00000100
symbol ZOUT_L = %00000101
'SetFreq k500
'pokesfr $D3,2
hi2csetup i2cmaster,%00110010,255,i2cbyte
init:
low ENABLE
pause 500
high ENABLE
low MOT_ENABLE
pause 500
hi2cout $0C,($00,$42)
pause 500
main: readi2c XOUT_H,(b0)
sertxd ("x=",#b0," ")
readi2c YOUT_H,(b0)
sertxd ("y=",#b0," ")
readi2c ZOUT_H,(b0)
sertxd ("z=",#b0," ")
sertxd (CR,LF)
goto main
Did the device operate at I2CSLOW or I2CFAST before you removed it from the development board ?However, it won't work using "i2cslow" or "i2cfast", only "255" - no matter what frequency I set the PICAXE to.
That is possible, the internal hardware scaled up to 32MHz being too fast to run at the slowest speed the chip desires. The easiest solution is probably to SETFREQ to a lower speed to do the I2C comms.It doesn't work at all when run at 32Mhz though.