I am having a hard time understanding the MCP4162 Datasheet.

The application for the digi pot is have an Ardunio to control the wiper resistance so I can have a constant desired output voltage regardless of input signal. So depending on the input signal the digipot will find the ideal resistance to get close enough to the target output voltage of 1.98V.

Example: Set Output Voltage = 1.98V

Input = 1.414Vp

\$Digi pot = ((\frac{V_o}{V_in})-1)*R1\$

\$Digi pot = ((\frac{1.98}{1.414})-1)*1000\$

\$Digi pot = 400\Omega\$

Input = 0.5Vp

\$Digi pot = ((\frac{V_o}{V_in})-1)*R1\$

\$Digi pot = ((\frac{1.98}{0.5})-1)*1000\$

\$Digi pot = 2960\Omega\$


simulate this circuit – Schematic created using CircuitLab

I have read the datasheet multiple times and I still don't which register is the one I need to be changing.

The one I would assume is the 0x04 address where it's described below. The datasheet only tells you about 2 registers and what their bits do when you write into them.

and I dont understand the equation stated in the datahseet that tells you the output resistance.

enter image description here

enter image description here

  • \$\begingroup\$ which register is the one I need to be changing - that would depend on what you want to achieve... \$\endgroup\$ – Eugene Sh. Jul 6 '18 at 18:21
  • \$\begingroup\$ Sorry about that, The application I am trying to use it for is an non inverting amplifier and putting digi pot in the negative feedback loop so I can have a constant gain. \$\endgroup\$ – Pllsz Jul 6 '18 at 18:24
  • \$\begingroup\$ @EugeneSh. I have inserted a schematic of what I want to do with the chip. \$\endgroup\$ – Pllsz Jul 6 '18 at 18:27
  • \$\begingroup\$ Something is wrong. If your pot were a simple resistor, you would have a constant gain. I think you are trying to build an adjustable gain amplifier, but your question, as is, does not make sense. \$\endgroup\$ – Scott Seidman Jul 6 '18 at 18:32
  • 1
    \$\begingroup\$ Oh man no no you're right. It doesnt make sense. I meant a constant output Voltage, regardless of input signal. \$\endgroup\$ – Pllsz Jul 6 '18 at 18:34

According to the datasheet, you're going to want to write to Volatile Wiper 0, and 1.

The TCON Register is used for configuring how the devices outputs are connected, you'll probably have to set that up on powerup. Although the defaults might be ok.

You can ignore the non-volatile variables. Those are used if you want to program the chip and then run it without a micro attached.

  • \$\begingroup\$ OH! How did you figure that out? For the life of my I couldn't find out how... Do you know how to translate the byte into the register for the desire resistance? \$\endgroup\$ – Pllsz Jul 6 '18 at 19:09
  • \$\begingroup\$ "A value in the volatile wiper register selects which analog switch to close, connecting the W terminal to the selected node of the resistor ladder." It's on page 36 of the datasheet. ..yeah these datasheets are terrible for newbies. \$\endgroup\$ – Drew Jul 6 '18 at 19:21
  • \$\begingroup\$ Ahh I see, and yeah I would have to agree. would you know what to do with the equation on page 35 & 36? Also by the looks of it, its a 9 bit register do you know for example the resistance value if I put like 0x03 into it? \$\endgroup\$ – Pllsz Jul 6 '18 at 19:26
  • \$\begingroup\$ I would say that R = (Rab*3)/256 + 75Ohms. So you need to know the Rab resistance. What is the number after mcp4162 (103 or what)? But do not forget that the Rab resistance tolerance is +/-20% \$\endgroup\$ – G36 Jul 6 '18 at 19:52
  • \$\begingroup\$ Yeah that's where I get confused, what is Rab? you mean the 1k? \$\endgroup\$ – Pllsz Jul 6 '18 at 20:20

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.