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.

How to set up ADC081C021 High Speed mode?

Other Parts Discussed in Thread: ADC081C021

I'm using Raspberry Pi along with library WiringPi to gather data from CIS scanner. As A/D converter I use ADC081C021 with I2C connection. According to datasheet to put converter into High Speed mode I must send Hs master code (00001XXX) before master device sends slave address. My problem is - I send slave address selecting slave device:

if ((fd = open (device, O_RDWR)) < 0)
return wiringPiFailure (WPI_ALMOST, "Unable to open I2C device: %s\n", strerror (errno)) ;

 if(i2c_smbus_access (fd, I2C_SMBUS_WRITE, 0b00001000, I2C_SMBUS_BYTE, NULL)) ;
 return wiringPiFailure (WPI_ALMOST, "Unable to select High Speed mode: %s\n", strerror (errno)) ;

if (ioctl (fd, I2C_SLAVE, devId) < 0)
return wiringPiFailure (WPI_ALMOST, "Unable to select I2C device: %s\n", strerror (errno)) ;

 

When I try sending address before that (yellow part above) I got input/output error.  Can anybody help, or show me error of my thinking?

  

  • Hi Adam,

    The SDA and SCL waveforms to put the ADC081C021 into High Speed mode are shown in Figure 26 in the datasheet. The best way to debug this is to look at the SDA and SCL waveforms on an oscilloscope as you try to put the ADC in Hs mode. Compare what is on the oscilloscope with the figure and make sure that the controller is sending the correct commands.

    Mike