Problem getting I2C port 1 and 5 working on MOD54415
Posted: Fri Oct 30, 2020 1:08 pm
Hi!
I'm a newbee to the Netburner environment, so maybe this is a super easy thing, but I can't get I2C ports other than 0 working.
Port 0 works fine. But when I change to port 1 or 5, I can't get it to work.
I am using MOD54415 on MOD-DEV-70CR.
Trying Port 1, the id-scan goes super-slow, and when finished, finds a bunch of (non-existing) addresses, except the one I have connected.
Trying Port 5, the scan finds ONLY my connected device (not the actual address on the module), and when I try to send data to it, it crashes.
I am using the IC2-AddressScan code as template. So using MultiChannel_I2CInit, MultiChannel_I2CStart etc.
Also, maybe I misunderstand the concept here, but no matter what address I set in the MultiChannel_I2CInit call, the port always shows up as address 0x51 (7 bit). I would think that it would show up as the address used while initiating it?
To be clear, the ONLY thing I change when trying the other port numbers is the value of I2C_MODULE_NUM. Like
#define I2C_MODULE_NUM 5
..
..
const uint8_t slaveAddr = 0x08; // Address of the NetBurner I2C peripheral
MultiChannel_I2CInit ( I2C_MODULE_NUM, slaveAddr );
Best regards
Per
I'm a newbee to the Netburner environment, so maybe this is a super easy thing, but I can't get I2C ports other than 0 working.
Port 0 works fine. But when I change to port 1 or 5, I can't get it to work.
I am using MOD54415 on MOD-DEV-70CR.
Trying Port 1, the id-scan goes super-slow, and when finished, finds a bunch of (non-existing) addresses, except the one I have connected.
Trying Port 5, the scan finds ONLY my connected device (not the actual address on the module), and when I try to send data to it, it crashes.
I am using the IC2-AddressScan code as template. So using MultiChannel_I2CInit, MultiChannel_I2CStart etc.
Also, maybe I misunderstand the concept here, but no matter what address I set in the MultiChannel_I2CInit call, the port always shows up as address 0x51 (7 bit). I would think that it would show up as the address used while initiating it?
To be clear, the ONLY thing I change when trying the other port numbers is the value of I2C_MODULE_NUM. Like
#define I2C_MODULE_NUM 5
..
..
const uint8_t slaveAddr = 0x08; // Address of the NetBurner I2C peripheral
MultiChannel_I2CInit ( I2C_MODULE_NUM, slaveAddr );
Best regards
Per