Shop OBEX P1 Docs P2 Docs Learn Events
Problem with MCP42100 ditital potentiometer — Parallax Forums

Problem with MCP42100 ditital potentiometer

jeff-ojeff-o Posts: 181
edited 2010-09-24 06:43 in Propeller 1
Hello everyone,

In the interests of Full Disclosure, I'm a Propeller n00b, but I'm learning fast (I think?) I'm excited about using the Propeller in my current project as well as future ones!

I'm having a bit of trouble with the Microchip MCP42100 digital potentiometer, and the matching Object downloaded from the Object exchange. Specifically, it doesn't seem to be working.

I loaded the test demo in the object folder, and it compiles and uploads properly. I can measure the signals going to the pins on the digitpot with my scope, and they appear fine to me - CS goes low, CLK is... clocking, and there's changing data going in through SI (data in). However, the "wiper" remains fixed in the center (the default value when first turned on).

This data was all collected at 2am last night and I haven't had a chance to fool around with it since then. But, I figured I'd ask here in case anyone has experience with this chip, before I kill by brain trying to figure out what the problem could be.

Thanks for your help!

Comments

  • W9GFOW9GFO Posts: 4,010
    edited 2010-09-23 07:29
    Do you have the SHDN and RS pins pulled high?

    Rich H
  • jeff-ojeff-o Posts: 181
    edited 2010-09-23 07:36
    Yup, RS and SHDN are pulled high. power and ground are present on the chip where necessary.
  • W9GFOW9GFO Posts: 4,010
    edited 2010-09-23 07:59
    Did you check both wipers? The demo code as written only changes one of the wipers.

    Aslo, as you are measuring the resistance of the pot, you need to measure between the wiper and either A or B. If you measure the resistance between A and B, it will not change.

    That's all I can think of right now. The next step I think is to show us how you have it wired up and post the code.

    Rich H
  • jeff-ojeff-o Posts: 181
    edited 2010-09-23 08:20
    I checked both wipers, both measure about 45k from A or B to the wiper. I tried modifying the code to control one, the other, or both wipers but nothing changed.

    I have the CS, CLK and SI pins connected to pins 22, 23 and 24 on the Parallax Propeller USB proto board. I know that data is going into the chip because I can see it flash by on my scope (and probing directly on the pins of the digipot).

    Aside from changing the pin assignments, the code is identical to the object I linked to.

    I've got two of these parts, maybe I'll try the other one when I get home...
  • jeff-ojeff-o Posts: 181
    edited 2010-09-23 21:06
    OK, more experimentation.

    I modified the code so that it would repeatedly write "255" to the digital potentiometer. I did so, so that I could watch it on my scope and see the pattern. It it certainly transmitting what it's supposed to - so why is the digital pot not responding?

    Very strange...

    Work continues...
  • jeff-ojeff-o Posts: 181
    edited 2010-09-23 21:20
    Well everyone, I am rather embarrassed to say, I got it working. There was an *ahem* unsoldered pin *cough*

    Ah well, what's a day of agonizing, eh?

    So yeah, the code works fine and I can move on to other things. ADC next? I promise to make sure all the pins are soldered, really!
  • W9GFOW9GFO Posts: 4,010
    edited 2010-09-23 22:14
    Glad you got it working, so which pin was it?

    Rich H
  • jeff-ojeff-o Posts: 181
    edited 2010-09-24 06:43
    It was the SI pin. See, I had wires soldered from the propeller pin to a pin adjacent to the SI pin on the digital pot, but not to the actual SI pin. The problem was obscured by wiring, and by the fact that the simple act of probing the SI pin caused it to make contact with the pin that actually contained a signal.

    So, I'd measure the pin with my scope and see a signal, but as soon as I'd remove the scope probe the connection would open again.

    *sigh* the perils of working sleep-deprived...
Sign In or Register to comment.