Reply by wwwoholic August 15, 20082008-08-15
According to schematics BX24P uses ATmega8535 chip, wich has hardware
I2C support. I wonder, has anybody tried to use this interface from
BasicX program?

As I understand there are several questions here. First, access to TWI
registers. I hope it can be done via RAMPeek/RAMPoke.

Second, there is no way to use TWI interrupts for communication
control. I see two possibilities here: insert TWINT polling throughout
the code
or use the fact that SDA line is internally connected to INT1 input, so
theoretically I can poll TWINT from WaitForInterrupt task.

Does this look possible?

P.S. the goal of all this is to create multi-master network of BX24P
without bit-banging.
Reply by wwwo...@sympatico.ca August 15, 20082008-08-15
According to schematics BX24P uses ATmega8535 chip, wich has hardware I2C support. I wonder, has anybody tried to use this interface from BasicX program?

As I understand there are several questions here. First, access to TWI registers. I hope it can be done via RAMPeek/RAMPoke.

Second, there is no way to use TWI interrupts for communication control. I see two possibilities here: insert TWINT polling throughout the code
or use the fact that SDA line is internally connected to INT1 input, so theoretically I can poll TWINT from WaitForInterrupt task.

Does this look possible?

P.S. the goal of all this is to create multi-master network of BX24P without bit-banging.