Firstly, I should say I seem to have solved the problem.
But what happened was, I have a project with a PIC16F722 controlling a MCP4021 pot. The 2-wire serial (CS/UD) are connected directly to RA1 and RA2 on the PIC.
I started writing the program in assembler and I thought it was correct, but it wouldn't work at all. So I hooked up my USB logic analyser to CS/UD to see what was going on.
The waveform I saw was correct, and the pot went to the correct value when the LA was connected, but still failed to work without it.
At first I thought maybe it was a missing ground, but that wasn't the case. Then I tried decoupling caps everywhere and that did nothing either.
Finally I tried 10K resistors from VDD to CS and UD. This worked flawlessly!
The issue is this. There's nothing I can see in either device's datasheet about any of the used I/O being open drain. The pot datasheet doe s say that CS has an internal pullup, but that doesn't seem to be doing it's job, as I need to pull it up myself for it to work. I know RA3 is generally open drain which is why I haven't used it. Could I get a sanity check from someone of whether it's actually mentioned in the datasheets because if this isn't its a pretty big omission.