tecnition_ted
New Member
Hi All, I am having problems getting any settings or reading from a DS3502. I have tried a simple test code to just read the pot wiper location to try and communicate with the device without success. All is ok if I use an Arduino so the picaxe should work ok.
Data sheet is here:
It looks simple, two registers 00h for the wiper setting and 02h for the mode.
I have set the address of the device to 50h by grounding both A1 and A2
I have tried 400khz and 100khz
If I can read the device then I should be able to send a write to set the wiper so far no luck reading with a Picaxe.
Can anyone see what I am doing wrong?
(sorry duplicate post put first one in finished projects)
Code:
setup:
hi2csetup i2cmaster,$50,i2cfast,i2cbyte
main:
i2cslave 0x50, i2cfast, i2cbyte
readi2c 0x00,(b0)
debug
PAUSE 1000
Goto main
It looks simple, two registers 00h for the wiper setting and 02h for the mode.
I have set the address of the device to 50h by grounding both A1 and A2
I have tried 400khz and 100khz
If I can read the device then I should be able to send a write to set the wiper so far no luck reading with a Picaxe.
Can anyone see what I am doing wrong?
(sorry duplicate post put first one in finished projects)