void MAX11614_Config(void)
{
ADC_IIC_Start();
ADC_IIC_Send_Byte(0x66);//д
ADC_IIC_Wait_Ack();
ADC_IIC_Send_Byte(0xa8);//SET_UP
ADC_IIC_Wait_Ack();
ADC_IIC_Send_Byte(0x01);//CONFIG 1
ADC_IIC_Wait_Ack();
ADC_IIC_Stop();
}
void MAX11614_Read(uint8_t *adc_data)
{
uint8_t i;
ADC_IIC_Start();
ADC_IIC_Send_Byte(0x67);//¶Á
ADC_IIC_Wait_Ack();
for(i=0;i<16;i++)
{
*adc_data=ADC_IIC_Read_Byte(1);
adc_data++;
//ADC_IIC_Wait_Ack();
}
ADC_IIC_Stop();
}
以上是配置和读取的程序,IIC总线驱动COPY的24c02的时序!!!
|