Problem with interfacing MCP4651-502E digital potentiometer using I2C

Hello everyone,

i am using two MCP4651 dual digital potentiometers, i also attached PCB schematic, which i want to control from arduino uno thru I2C. Here’s datasheet for MCP4651, so you don’t have to look for it:

I am trying to write my value into the wiper 1 register like on page 49 of datasheet. But every command i try, i get not acknowledged. I also attached screenshot of oscilloscope.

Here’s my code:

#include <Wire.h>

void setup() 

void loop()

The I2C protocol clearly works, or i would not get acknowledged address and i tried both potentiometers, both wipers, writing, incrementing and decrementing. Not a single success. If anyone knows what am i doing wrong, i would be grateful.

Here's the screenshot, it was too big for upload

Address 40 means all A0,A1,A4 grounded. pullup_resistors missing ?? scope shows 3.6V Should be closer to 5V ?

Move 4 code_lines (transmission) to setup(). (Why repeat write unaltered data?)

How do you know that the viper isn't set correctly?

Yep, addresses are 40 and 41. There are 2k7 pullup resistors, it can operate between 1.8V and 5.5V so i chose 3.3V. I have it in loop cos i was incrementing the wiper before, forgot to move it in setup after.

Well for MCP46XX you need to send 3 bytes : address, command and value, and you can see in the scope that address was sent OK, it acknowledged, but after the command was sent, it did not acknowledge. Also i was measuring that wiper, and it was constant.