Adc121c021 not connect

I’m trying to read ADC count by I2C based ADC121C021 module with help of ESP32 IDF by FREE_RTOS but I’m only getting ESP_FAIL sending reading function so you can help me

actually, I’m not able to get ACK from the ESP side. only received this msg
ADS-I2C: ESP_FAIL: No ack, sensor not connected…skip…

static esp_err_t read_ADS(i2c_port_t i2c_num, uint8_t *data_h, uint8_t *data_l){
    int ret;
    ESP_LOGE(TAG, "read ADC ");        
    i2c_cmd_handle_t cmd = i2c_cmd_link_create();
    i2c_master_start(cmd);
    i2c_master_write_byte(cmd, ADS_ADDRESS | WRITE_FLAG, 0x01);
    i2c_master_write_byte(cmd, 0x02, 0x01);   
    i2c_master_write_byte(cmd, 0x20, 0x00);
    i2c_master_stop(cmd);
     ret = i2c_master_cmd_begin(i2c_num, cmd, 1000 / portTICK_RATE_MS);
    i2c_cmd_link_delete(cmd);
    if (ret != ESP_OK) {
        return ret;
    }
    ESP_LOGE(TAG, "out here");        
     vTaskDelay(400 / portTICK_RATE_MS);
    cmd = i2c_cmd_link_create();
    i2c_master_start(cmd);
    i2c_master_write_byte(cmd, ADS_ADDRESS | WRITE_FLAG, 0x01);
    i2c_master_write_byte(cmd, CONV_REGISTER, 0x01);

    i2c_master_start(cmd);
    i2c_master_write_byte(cmd, ADS_ADDRESS | READ_FLAG, 0x01);
    i2c_master_read_byte(cmd, data_h, ACK_FLAG);
    i2c_master_read_byte(cmd, data_l, NACK_FLAG);
    i2c_master_stop(cmd);
    ret = i2c_master_cmd_begin(i2c_num, cmd, 1000 / portTICK_RATE_MS);
    i2c_cmd_link_delete(cmd);
    return ret;
 
}

Hi,

I do not work in ESP32 IDF. I would recommend obtaining sample code to perform an I2C bus scan to see if the ADC121C021 address appears in the scan. If it does then your hardware setup is good, if it does not then there are hardware issues with the setup to resolve.

hi thanks for replay I wanna ask that is it possible that if you can shift its in software issue or I need to make other ticket for that.