As the topic title says I’m having trouble getting a AS5048B sensor to talk to a Wixel via I2C. I’ve used I2C to connect Wixels to other devices but this one is giving me difficulty.
At the moment I’m just trying to get it to respond to the Wixel sending out it’s address but all I get are timeouts (no ACK or NACKs). I also wrote a quick scanning app that pings all addresses from 0 to 127, but it returns nothing but timeouts as well. Scanning with other I2C devices connected works as expected.
I’ve connected the AS5048B to an Arduino Uno without any hassle. The Uno is a 5V device, but the AS5048B supports both 5V and 3.3V operation so hopefully that won’t have any bearing on the problem.
Here’s the datasheet: https://media.digikey.com/pdf/Data%20Sheets/Austriamicrosystems%20PDFs/AS5048A,B.pdf
And here’s the main loop from my scanning app:
void main()
{
uint8 i2cAddress = 0;
BIT nack;
systemInit();
usbInit();
i2cPinScl = param_scl_pin;
i2cPinSda = param_sda_pin;
while(1)
{
boardService();
updateLeds();
usbComService();
sendTextToUSB();
if (getMs() - lastUpdate >= 100)
{
if(i2cAddress < 128)
{
i2cStart();
nack = i2cWriteByte(i2cAddress << 1);
if (!i2cTimeoutOccurred)
{
printf(" %d responded with a", i2cAddress);
if (nack)
{
printf(" NACK.\r\n");
}
else
{
printf(" ACK.\r\n");
}
}
else
{
i2cTimeoutOccurred = 0;
}
i2cAddress++;
}
else
{
printf("Scan complete.\r\n");
i2cAddress = 0;
}
lastUpdate = getMs();
}
}
}
Thanks in advance for any assistance you can give.