Multiple DS1867s digital pots with the basic stamp
I'm wanting to daisy chain 3 of these as I need to control 6 op-amp gain stages and need to conserve I/O pins as much as possible.
It's the non volatile version of the DS1267 for which I did find a snippet of code for in a N&V article, but it was for a single 1267, not multiples daisy chained.
I was hoping that someone has used this before and may have some working code they might share, which·would·surely·save me hours of stumbling blindly about the keyboard.
Searches for help·(here and google)·have not been particularly encouraging thus far.
I know this has to be pretty simple stuff to some of ya'll,
Thanks in advance,
Darlene
Post Edited (Geekgirl) : 1/23/2009 3:31:32 AM GMT
It's the non volatile version of the DS1267 for which I did find a snippet of code for in a N&V article, but it was for a single 1267, not multiples daisy chained.
I was hoping that someone has used this before and may have some working code they might share, which·would·surely·save me hours of stumbling blindly about the keyboard.
Searches for help·(here and google)·have not been particularly encouraging thus far.
I know this has to be pretty simple stuff to some of ya'll,
Thanks in advance,
Darlene
Post Edited (Geekgirl) : 1/23/2009 3:31:32 AM GMT
Comments
So just 3 pins are needed for any number of chips.
http://datasheets.maxim-ic.com/en/ds/DS1267.pdf
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Think Inside the box first and if that doesn't work..
Re-arrange what's inside the box then...
Think outside the BOX!
Post Edited (metron9) : 1/23/2009 4:33:26 AM GMT
I'm waiting on the chips, expecting them from digikey today, actually, ... so I haven't had a chance to try using them yet and I'm not too experienced yet using SPI.
They may be as easy to set up as the data sheet makes it look, but it's always nice to have or start with some working code to then customize to fit specific needs.
Darlene
They operate similar to shift registers. Think of it this way. The chip simply reads a pin level of High or Low but it reads it only when you tell it to through the clock line. So the level of High or Low is set and then the clock is toggled, the chip reads its pin and stores the bit. When it stores the bit it shifts the bit into a memory location. Since it has 17 bit positions you shift 17 bits into the chip and it takes care of putting the bits into its memory location. So the direction it stores the bits is important high to low or low to high and the timing of how short the clock signal is important to find out the maximum data rate you can send as well as shifting the correct number of bits.
When you chain them the bits flow through from one to the other so the 18th bit when pushed into chip1 makes the first bit you sent flow out of chip1 into chip2. As you shift in the second batch of 17 bits the first batch ends up in the second chip like putting marbels in a tube push one in one end and the one near the other end falls out.
Check out bit shifts in this link to see how the bits are actually working on the inside of the chip.
http://en.wikipedia.org/wiki/Bitwise_operation
Actually you dont even need a processor to communicate. Two buttons could be used to set a high or low level and toggeling the clock pin could be used to shift in the bits. Since it is SPI typically there is no minimum speed.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Think Inside the box first and if that doesn't work..
Re-arrange what's inside the box then...
Think outside the BOX!
Post Edited (metron9) : 1/23/2009 1:39:55 PM GMT
http://forums.parallax.com/showthread.php?p=552892
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Engineering