ok, i'M burning the midnight oil - and after spending ages on this problem, almost the minute after I posted here i sorted it.
Here was the offender (on my PIC)..
it should be SSPSTAT.6 = 1 ....... I reckon that due to that setting (clock edge to tx data on) my digipot was therefore missing a data bit ...which essentially offset the data I was sending it. (which didn't cause a knockon effect to the command byte, because the digipot SPI control bits are i the middle of the first byte sent & were all zeros)Code:SSPSTAT.6 = 0
Bookmarks