[sdiy] SPI Digital Potentiomters and PIC 18.. not working.. help!

Daniel Kruszyna dan at krue.net
Mon Mar 14 17:17:31 CET 2005


On Mon, Mar 14, 2005 at 09:50:01AM -0500, Bill Berzinskas wrote:
> I'm using a microhip spi digital potentiometer..  i'm sending data as follows
> 
> CS high > low
> write command byte (00010001)
> write data byte
> cd low > high
> 
> and nothing is working..   what am i missing?    i'm sending the data from a pic18f

What SPI mode are you using? The microchip pots latch data on the
positive edge of SCK. Going from the datasheets, it looks like you need to
set CKP=1 and CKE=0. Although I'm an avr guy so I may be wrong here.
Unfortunately, knowing a device has an "SPI compatible interface" isn't enough
info since the timing can vary.

-- Daniel




More information about the Synth-diy mailing list