Micontroller question

Discussion in 'General Electronics Chat' started by ajbenny, Apr 29, 2015.

  1. ajbenny

    Thread Starter New Member

    Apr 29, 2015
    Could someone explain to me how four MCP4142 digitPots could be added to a single microcontroller and how many I/O pins would be required
  2. atferrari

    AAC Fanatic!

    Jan 6, 2004
    More than adding what you usually do is to control something with the micro.

    BTW, what micro is that and how much do you know about it? Have your read at least something in the datasheet?

    Sorry, I forgot to ask: how many pins of that pot you use to control it? Could you tell the function each one controls?
  3. tshuck

    Well-Known Member

    Oct 18, 2012
    You would need the two, common SPI lines: MOSI/SDO and SCK. Then, you'd need an individual #CS for each potentiometer. Then bring only one #CS low corresponding to the potentiometer you wish to address and send your data over the SPI interface.

    So, for 4 potentiometers, you'd need the two required SPI lines, plus four, individual #CS lines for a grand total of six pins.

    Note: the SDI and SDO functions on the potentiometers are multiplexed and are controlled by the potentiometerv- beware of bus contention.