Hi! I've been trying to use a MCP4151 digital potentiometer with an ATTiny85 through software SPI using the ATTinyCore's universal SPI lib. The Tiny does not have hardware SPI like the Mega but the library detects this and uses the right SPI solution automatically (from what I could gather).
I can see my CS pin go down and up but unfortunately I don't have a logic analyzer to help with debugging what's going own in between at my DO pin. My code is basically textbook and the circuit itself is pretty simple so I'm pretty stumped as to why I can't see the resistance between the wipers change.
Here's the (very poorly drawn) schematics of what's on my bench
Here's my Arduino IDE settings
I have tried setting the clock to 1MHz and reburning the bootloader but from my understanding of the MCP4151 datasheet, the maximum clock should be at 1MHz if supply is less than 2.7v and I am using a 5v regulated supply (the same as the AT) which pushes the max clock speed to 10MHz, so I figure 8 MHz is ok - unless I got the whole thing wrong.
I am using the digital pot example included with the library except that I pick channel 0 instead of looping through 6 channels. Here it is: https://github.com/SpenceKonde/A...
Please let me know if you have any questions and thank you for your time!!
EDIT: source and schem in attachment!
EDIT 2: Welp, it seems that I might have confused MISO/DO and MOSI/DI. With MISO I thought the *slave* was sending instructions to the *master* and that would correspond to DI but I might have to read a bit more about those. Anyhow, I moved my connection to the pot's SDI to the MISO/DO pin and everything is working fine.
Thank you for reading! This seems like a nice forum so I might just hang around! :)