Thank (as ever) Bruce....I managed to get the hardware working (while testing I was sending a data byte of zeros to the digipot ....which ahem, being zeros don't show up on the PIC's SDO pin...doh, lol. Also, I was clocking data out of the pic on the wrong edge of the clock, which meant the least significant of the data byte was going awol from the digipot's perspective)
So, while I'm what's the pros and cons of s/w SPI vs hw SPI?
From the top of my head (and some assumptions)...
sw SPI ...
pros - flexibility of pin assignments, bit centric.
cons - slower? can't use interrupts in the same program (this is an assumption on my part as I know serout/debug get corrupted when interrupts are used in the same program)
hw SPI ...
pros - can use interrupts in the same program?, faster?
cons - tied to using the allocated SPI pins. byte centric?




Bookmarks