As far as i'm aware the 11bit Id doesn't include the DLC so when using an Information Request message the IO expander doesn't know what to send back.
Using CANRemote eg,
can2.write(CANMessage(0,0,8,CANRemote,CANStandard))
This broadcasts a READ A/D REGS information request message aimed at the I/O expanders. This works and the expanders return their data but they are all returned with ID 0 as that is what was sent. If you put an destination ID for the Expanders to filter, the message is no longer valid and the expanders do not respond.
Then BREAKTHROUGH... whilst writing this I realised I had to set bit 3 of the IRM ID =1 and the masks on my chips where comparing this bit and therefore the filters were ignoring the message. So...
CANMessage(648,test,8,CANRemote,CANStandard))
where 648 (288 in hex) is its ID + bit 3 set + the message type your requesting (0 for READ A/D).
test can be 0 but there needs to be something in there,
8 is the DLC for READ A/D,
and the rest is self explanatory.
Thanks for the reply otherwise I wouldn't of looked at this again :)
Awstriker
Hi,
Just a quick question, I'm trying to read the A/D regs on the MCP25050. To do this I need to send a IRM with ID 0, DLC 8 and no data. But the CAN message for the NXP wont let me put "no data" in the message. I've tried zeros and FF etc.
Any ideas?
Awstriker