This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
请问如何使用MSP430FR2433的IIC来读取内部HDC1080的温湿度?我应该参考哪个例程,我查询官网发现相关例程都是IIC连接两个MSP430?
再請教一下,如果我只是想MSP430与搭载的HDC1080通信,我只参考了master.c,当我完成程序时,我发现调用I2C_Master_WriteReg与I2C_Master_ReadReg时为何都不进入中断?
从机IIC例程中这里的中断使能是不是写反了?case:CMD_TYPE_0_MASTER往下的三个case
case (CMD_TYPE_0_MASTER):
SlaveMode = RX_DATA_MODE;
RXByteCtr = TYPE_0_LENGTH;
UCB0IE &= ~UCTXIE; // Disable RX interrupt
UCB0IE |= UCRXIE; // Enable TX interrupt
break;
case (CMD_TYPE_1_MASTER):
SlaveMode = RX_DATA_MODE;
RXByteCtr = TYPE_1_LENGTH;
UCB0IE &= ~UCTXIE; // Disable RX interrupt
UCB0IE |= UCRXIE; // Enable TX interrupt
break;
case (CMD_TYPE_2_MASTER):
SlaveMode = RX_DATA_MODE;
RXByteCtr = TYPE_2_LENGTH;
UCB0IE &= ~UCTXIE; // Disable RX interrupt
UCB0IE |= UCRXIE; // Enable TX interrupt