Thursday, February 3, 2011

The battle of two Clocks.... Independent and Stubborn!

Working for a Weighscale company has given me the opportunity to play around with many different 20/24-bit Delta-Sigma Analog-to-Digital Converters (ADCs) and they all behave a little differently when you clock the data out.

  • Some ADCs clock out the previous conversion if you talk to it a little early (before the conversion is complete).... this is ideal!
  • Some ADCs clock out 0xFF's when you talk to them a little early.... this is ok since you can just throw away that conversion and you've only lost one data point.
  • And some ADCs go into "Self Calibration Mode" and are dead to the world for 100ms if you talk to them too early..... this sucks and is a very poor design in my point of view.
This problem arises because the micro is running on one clock and the ADC is running on its own independent clock and eventually they drift far enough apart to where you end up reading the ADC too early. See my pretty picture of the MISO line indicating the conversions are starting the drift together.... until bamn! self cailbration mode:)
Most ADCs give you a means of syncing the clocks back up to the ADC by monitoring the MISO line, but that just makes the software messy. Anyway just wishing all ADC manufacturers would stick to the clock out the previous conversion rule when talking to the ADC early.

No comments:

Post a Comment