0
\$\begingroup\$

I'm trying to provide an ADC output to two different microcontrollers. Wondering if this is at all possible. If yes, then how could I be able to achieve it?

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
7
  • \$\begingroup\$ Why you think this is not possible ? \$\endgroup\$
    – Mitu Raj
    Nov 19 '19 at 6:12
  • \$\begingroup\$ Which ADC do you want to use? \$\endgroup\$
    – JRE
    Nov 19 '19 at 6:37
  • \$\begingroup\$ @MituRaj because most ADCs require a clock or READY signal to push data out of the output pin. And I'm not sure how this could be achieved if multiple microcontrollers will be reading \$\endgroup\$ Nov 19 '19 at 7:43
  • \$\begingroup\$ @JRE I haven't decided on an ADC yet, but I'm looking at ADS1231 or ADS1115 for now. Subject to changes. The use case here, is to read a load cell \$\endgroup\$ Nov 19 '19 at 7:45
  • \$\begingroup\$ Who source the clock ? and at what Frequencies ? \$\endgroup\$
    – Mitu Raj
    Nov 19 '19 at 8:12
0
\$\begingroup\$

The ADC probably uses SPI or I2C. In both cases, there's one master MCU that generates the clock signal. The secondary MCU would in practice "snoop" the digital lines to pick up the traffic, without contributing to or disturbing the synchronizing clock signal.

You can in theory do this, but the non-standard programming involved means you're spending a lot of work for little benefit as your MCU HAL library won't help you. The better way is to let one MCU handle all communication with the ADC, and in turn use some other channel to forward the result to the secondary MCU.

ADC  -->  primary MCU  -->  secondary MCU

If the ADC uses SPI, you can use the same SPI bus but with a separate enable pin between the two MCUs, and configure the secondary MCU as a SPI slave.

If the ADC uses I2C, you can use the same I2C bus without extra pins. Just configure the secondary MCU as I2C slave with a unique address, listening for the forwarded data from the master MCU.

There will be a slight delay for the secondary MCU to receive the data, but this model is easier to implement.

\$\endgroup\$
1
  • \$\begingroup\$ Except that the 'snooping' micro-controller would be snooping on a metastable data. \$\endgroup\$
    – Mitu Raj
    Nov 19 '19 at 11:50

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.