I have been wanting to replace the analog poteniometers with digital pots. I picked up a few from Sparkfun (Microchip MCP4131). They are very easy to get working; just throw them on the SPI bus with a chip select and give it 16 bits to set the pot value. These chips only support 7 bit values (only 127 different values) but that may be good enough (they're definitely good enough to get started).
Since I am now throwing a bunch of chips on the SPI bus, I am running out of pins to use as data and chip selects. Enter the 74hc595 shift register! I decided to use two of these to extend my outputs. One is used as the band and mode selection; the band selection uses the lower three bits (fed into the 3-8 decoder) with two other bits to select the mode (only USB or LSB). This leaves a few more pins for other modes or other future expansion. The other '595 is being used as the peripheral chip selects; currently only selecting the digital pots. The great thing is that I used the built in SPI pins and library to drive the chips -- very cool!
A knob on the UI and digital poteniometers and bus drivers |
No comments:
Post a Comment