This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
when I used ADS7828 IC, I have faced a "READING DATA" problem. below show how I wrote the firmware read the CH1 value , ( below shown part of code in my firmware , I2c Initiation and other begin code work well. )
uint8_t txBuffer2[1];
uint8_t rxBuffer2[2];
txBuffer2[0] = 0x90; // address byte for write
uint8_t txBuffer3[1];
uint8_t rxBuffer3[2];
txBuffer3[0] = 0xC4; // command byte for select ch1 and Internal Reference OFF and A/D Converter ON ( not sure that last 4 bit setting )
uint8_t txBuffer4[1];
uint8_t rxBuffer4[2];
txBuffer4[0] = 0x91; // address byte for read
while (1){
i2cTransaction.targetAddress = 0x48 ;
i2cTransaction.writeBuf = txBuffer2;
i2cTransaction.writeCount = 1;
i2cTransaction.readBuf = rxBuffer2;
i2cTransaction.readCount = 0;
if (I2C_transfer(i2c, &i2cTransaction))
{
}
else
{
}
i2cTransaction.targetAddress = 0x48 ;
i2cTransaction.writeBuf = txBuffer3;
i2cTransaction.writeCount = 1;
i2cTransaction.readBuf = rxBuffer3;
i2cTransaction.readCount = 0;
if (I2C_transfer(i2c, &i2cTransaction))
{
}
else
{
}
i2cTransaction.targetAddress = 0x48 ;
i2cTransaction.writeBuf = txBuffer4;
i2cTransaction.writeCount = 1;
i2cTransaction.readBuf = rxBuffer4;
i2cTransaction.readCount = 2;
if (I2C_transfer(i2c, &i2cTransaction))
{
}
else
{
}
}
but I always received 0x0F+ACK and 0XFF+NACK . so what is problem.? how can I solve this problem I want to read CH1 voltage reading. when I variable CH1 voltage always reply 0x0F+ACK and 0XFF+NACK. Nothing any deferent result.
Hi Nishad,
Can you please forward your schematic and some detail about your application with the ADS7828?
sure . circuit schematic I will attached with this reply. I want to read 8 channel voltage . but still receving 0x0F & 0XFF as a output bytes .
You have turned off the reference and have no external reference connected to the ADS7828. That would be the most likely reason why you see 0xFFF as a conversion result. Please enable the reference and let us know what you see.