Shop OBEX P1 Docs P2 Docs Learn Events
Newbie vs. DS1868 Digital Pot — Parallax Forums

Newbie vs. DS1868 Digital Pot

Greg NortonGreg Norton Posts: 70
edited 2007-05-17 04:51 in BASIC Stamp
Hello All,

I'm attempting to interface my BS2 with a DS1868 digital pot. So far I'm not getting anywhere and I need some advice here. I wrote a quick program that should just ramp the voltage from 0-5 and back down. When I measure the output with my DVM, it just sits at around 0.14 volts and does nothing else. I have hooked things up as follows:

VCC to +5
GND to GND of power supply
H0 to +5v
L0 to GND
W0 to DVM positive input
/RST to pin 2 of BS2
CLK to pin 1 of BS2
DQ to pin 0 of BS2

So here are the questions:

What should be done with Vb pin on the 1868? If I leave it floating I get the 0.14 volts on the output. If I ground it, I get 0 volts on the output. I have no idea what this pin is for. The datasheet mentions -3.3V to GND voltage levels for this pin. I would really appreciate any enlightenment on this subject.

Another area I suspect is a problem is my code, I have read the datasheet to say that the first bit output should be the stack select bit, then MSB to LSB of the two values. Have I got the shiftout statement correct?

Is my output subroutine in general correct? I tried to implement the timing diagram shown but you never know.

I don't have a logic analyzer to view the activity on the serial interface and I haven't been too successful seeing anything with the USB oscilloscope.

Thanks.
Greg

Post Edited (Greg Norton) : 5/17/2007 4:07:54 AM GMT

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-05-17 04:51
    1) The Vb pin is the substrate bias pin. Any voltage applied to the pot must be equal to or greater than Vb. If, for example, you're applying an AC signal to the pot (used as a volume control say), you have to apply a negative voltage to Vb. If the signal is plus or minus 1V, then Vb has to be -1V or lower. The total voltage difference between Vb and Vcc has to be no more than 6.6V (Vb=-3.3V, Vcc = +3.3V). If Vb is at ground, then Vcc can be +5V (which is what you need with the Stamps). For your setup, you have to ground Vb. If you're getting 0V at the wiper, that's a correct initial value.

    2) I think you have the bit order correct.
Sign In or Register to comment.