Associate III
June 27, 2025
Question
Interface with ADC via I2C (ADC Part No: TLA2528)
- June 27, 2025
- 4 replies
- 631 views
Hai..,
We are using a custom board with STM32H743IIT6 soldered to it. For our application, we need more Analog Inputs so we have used TLA2528 chip. Below is the code for it..
tx_buf[0] = TLA2528_PIN_CFG;
tx_buf[1] = 0x00;
HAL_I2C_Master_Transmit(&hi2c4, TLA2528_I2C_ADDR, tx_buf, 2, HAL_MAX_DELAY);
tx_buf[0] = 0x10;
tx_buf[1] = 0x00;
HAL_I2C_Master_Transmit(&hi2c4, TLA2528_I2C_ADDR, tx_buf, 2, HAL_MAX_DELAY);
tx_buf[0] = TLA2528_CHL_SEL;
tx_buf[1] = 0x00;
HAL_I2C_Master_Transmit(&hi2c4, TLA2528_I2C_ADDR, tx_buf, 2, HAL_MAX_DELAY);
tx_buf[0] = 0x01;
tx_buf[1] = 0x08;
HAL_I2C_Master_Transmit(&hi2c4, TLA2528_I2C_ADDR, tx_buf, 2, HAL_MAX_DELAY);
HAL_Delay(20);
HAL_I2C_Master_Receive(&hi2c4, TLA2528_I2C_ADDR | 0x01 ,rx_buf, 2, HAL_MAX_DELAY);
result = (rx_buf[0] << 8 | rx_buf[1] );While Debugging we could only get the value as "0x00". Could you please help us with this issue?
we have attached the TLA2528 Datasheet below for your reference.
Thanks & Regards
M. Govind.
