SPI problem

Hi,

I'm trying to get Arduino to control DS1801+ digital potentiometer. Datasheet available here: hxxp://datasheets.maxim-ic.com/en/ds/DS1801.pdf . The IC SPI implementation is very straight forward, just need to send 2 bytes in LSB order to set the pot to the desired values. I downclocked the SPI on Arduino to the lowest possible freq (IC supports up to 10Mhz) so it is not an issue here. So, now I'm only able to successfully send about 6 to 10 2 byte commands to the chip and then Arduino communication is broken. I have the Diecimila version with the LED (Prototype Limited Edition) and I have read about other people having trouble with NG version with LED. Could it be an issue here? Actually I can see the LED blinking when the data is being sent. I measured voltage on PIN 13 while the LED is ON and it's 5V. Maybe it's just an issue when the pin is in the SPI CLOCK mode? This is just a part of bigger project and it's a huge show stopper for me. Any help will be appreciated.

What exactly is "broken" ?

To verify that the arduino still sends data to the chip, try adding LEDs to SS, CLK and MOSI as well. Use a resistor of at least 1k, maybe a bit more. The LEDs don't have to be bright. Some flickering there should indicate that data is still going out. Of course a scope would be better to watch CLK and MOSI for debugging.

I'm only able to successfully send about 6 to 10 2 byte commands to the chip and then Arduino communication is broken.

Do you mean the arduino stops sending data or the devices stop receiving it?

Do you have this problem if only one device is on the SPI bus? If not it could be due to pin loading (unlikely) or both or no device being enabled when communication is taking place.

Thanks for your answers. I switched to DS1807 digital pot which uses I2C so I bypassed the SPI problem. But I am still curious about the cause of my SPI trouble.

I don't have a scope at this moment to check what is going on over there but I am going to borrow one from a friend to debug it further. I think this will be the best way to investigate it.

Thanks, Chris