It was a 16f1823, using the hardware SPI. After sending the email I decided to take it all apart and reconnect everything (hardware version of turning of and back on again) and as I disconnected the bus pirate the lines jumpe= d up to 5v swings. So I figured that the culprit must have been the bus pirate, I did not go back to it, and read the bus on my 'scope, one transaction at a time. There is a little ringing on the lines, but it appears to be working and I have moved on to making them talk to each other= .. -----Original Message----- From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu] On Behalf Of Richard Sent: Thursday, April 13, 2017 21:44 To: piclist@mit.edu Subject: Re: [EE] Problems with SPI requirements On 4/10/2017 3:47 PM, toftat@cowshed.us wrote: > As I am currently pulling my hair out over this, I figured I'd access=20 > the hive mind. > > tl;dr SPI is not working, I suspect mainly because I have no clue as=20 > to what I ought to be doing with resistance and capacitance. I am=20 > seeking some guidance from those who've been successful > > I am a hobby-ist making some LED lights for my dock, I have posted=20 > about problems communicating with the NRF24L01 module previously but=20 > that was mainly higher level. I am currently finding problems with the=20 > hardware aspects of SPI. While I think I have the code doing what I=20 > expect I am seeing some strange behaviour. The SPI is brought out to a=20 > header where I connect it via 20cm of dupont wire to a breakout board=20 > so I can connect my bus pirate into the circuit. As I am testing I=20 > have my 'scope attached to the connector instead of the NRF (looping=20 > ground to MISO) when I probe /CS, I see a nice mostly square wave from=20 > rail to rail (0-5v), there is a little ripple on the switching. When I=20 > probe the clock and the MOSI lines, they are not reaching the 5v rail,=20 > it seems to be around 1v, and very noisy which I am assuming is=20 > causing the bus pirate to multiply by 2 (ie I send 0x41, and receive=20 > 0x82) I have tried the bus pirate in logic probe mode and it only=20 > detects the /CS line not the clock or MOSI. It feels like these lines=20 > are open drain and need pull ups, although everything I have read=20 > indicates SPI does not need this. > > Are there any other simple conditioning tricks I might try here? What=20 > are best practices for SPI? I can post the code, the circuit, and even=20 > take a picture of the 'scope trace if you'd like. This is really the=20 > last part of the project before installing everything onto the dock. > > Thanks for any input > > Anthony Anthony, Which microcontroller are you using? Richard -- http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/chang= e your membership options at http://mailman.mit.edu/mailman/listinfo/piclist --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .