Hello~
I am trying to read ADC value with ADS1119.
The ACK response from ADS1119 is also being received well.
However, the ADC value is actually displayed as 0.
I've looked at data from the internet, but I don't know, so I'm going to leave a question here.
Below is the function I made to read ADC.
I am talking on the premise that the subfunctions work correctly.
Please let me know if there is any misunderstanding of the concept
Take good care of me.
u16 ADS1119_B6_Read(uint8_t address)
{
if((Get_A_DRDY)==0)
{
i2c_Start();
ads_adress = (0x40+address)<<1;
address |= 0x01; //0 = write
i2c_write(ads_adress);
i2c_write(0x10);
ads_adress = (0x40+address)<<1;
ads_adress |= 0x01; //0 = write
i2c_Start();
i2c_write(ads_adress);
H_result = i2c_read();
ADS1119_SendACK(0);
L_result = i2c_read();
ADS1119_SendACK(1);
end_result = (H_result<<8)|L_result;
return end_result;
}
}