//初始化
Ch423_Output.v = 0;
MDrv_IIC_CH423_WriteByte(CH423_SYS_CMD, BIT_IO_OE)
MDrv_IIC_CH423_WriteByte(CH423_OC_L_CMD, Ch423_Output.v)
我連續(xù)寫0C的低8位(OC0~7)和高8位(OC8~15),在我寫高8位的時候總是會把0C7的電平反過來,OC8~15是正常的,這怎么解決?
如下:
MDrv_IIC_CH423_WriteByte(CH423_OC_L_CMD, (Ch423_Output.v & 0x00FF));
MDrv_IIC_CH423_WriteByte(CH423_OC_H_CMD, (Ch423_Output.v >> 8));
熱門產(chǎn)品 :
CH641: PD及無線充電專用MCU