将两片LM3S8962用I2C总线相连,一台为主机,另一台为从机,将从机的地址设置为0xA2,主机和地址0xA2的从机通信完全正常。主机使用I2C广播呼叫地址和从机通信,从机无法产生中断。也就是说,LM3S8962的I2C不能使用广播地址。太郁闷了。
看看NXP的LPC2200控制器的I2C(参见其英文数据表P159): I2C Slave Address register (I2ADR - 0xE001 C00C) These registers are readable and writable, and is only used when an I2C interface is set to slave mode. In master mode, this register has no effect. The LSB of I2ADR is the general call bit. When this bit is set, the general call address (0x00) is recognized.
Bit Symbol Description Reset value 0 GC General Call enable bit. 0 7:1 Address The I2C device address for slave mode. 0x00
LPC2200控制器的I2C在从机模式下就可以既接收从机地址,也可以接收广播地址。 看来选芯片还是要选择大厂家的主流芯片,Luminary这方面还是做的不够好 |