0
\$\begingroup\$

I am studying a bio-medical instrument where glucose in blood is measured using light reflection principle as shown:

Principle Below equation is used to determine glucose level: Equation

LED is blinked at fast rate and both LED's ADC reading is taken using single photo diode which is used as sensor. Since single sensor is used, I have to switch LED and corresponding ADC is stored in single channel ADC.

SPI based ADC is preferred in this case since it will be fast compared to I2C. But due to unavailability of SPI port pins, if I implement it with I2C, does it makes a difference considering switching of LED's takes place at high rate?

Thank you.

\$\endgroup\$
  • 1
    \$\begingroup\$ Bit-bang it with any GPIO port if you are unsure. Reading an ADC is easy this way and needs neither SPI or IIC dedicated pins. \$\endgroup\$ – Andy aka Aug 27 '15 at 10:41
  • 1
    \$\begingroup\$ High rate is a rather useless statement, give a rough estimate of the expected sample rate of the ADC (like 20 samples per second or 5000 samples per second). It's very hard to give an advice on protocols without knowing what kind of data rates are to be expected. For some people once a day is a high rate... \$\endgroup\$ – Arsenal Aug 27 '15 at 13:42
4
\$\begingroup\$

SPI will almost surely give you a higher raw data rate than I2C (perhaps tens of MHz vs. perhaps 400kHz depending on the I2C flavor) but that may not be limiting for the LED switching rate.

The photosensor output must settle after the LED has been switched and the ADC must have time to settle- the settling time may be many ADC conversions.

\$\endgroup\$
  • 2
    \$\begingroup\$ That data rate being the bit rate, not the ADC sample rate, just to be clear. \$\endgroup\$ – Brian Drummond Aug 27 '15 at 11:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.