MCP3008 with output all 0?
Posted: Mon Oct 16, 2017 11:20 pm
I've seen a few threads on the topic of getting a MCP3008 to work with the RPI, but I've not found them helpful in resolving my issue. I'm using an RPI3 and have directly wired from the GPIO header to a breadboard with the MCP3008 on it. I'm testing the Adafruit demo code that reads out all 8 values, but everything appears as 0 for me. I have two inputs wired in on inputs 0 and 1. SPI is enabled on the RPI and have tried both software and hardware types of interfaces to the chip. I'm following the original demo setup with:
# Software SPI configuration:
CLK = 18
MISO = 23
MOSI = 24
CS = 25
mcp = Adafruit_MCP3008.MCP3008(clk=CLK, cs=CS, miso=MISO, mosi=MOSI)
To see what's going on, I wired into my MSO scope and attached the screenshot with labels added to the traces. I see communication being sent to the chip, but no response being sent. The product documentation for that chip describes certain CS values being toggled to get the chip talking, but I'm not seeing that. Does anyone have insights here?
thanks
# Software SPI configuration:
CLK = 18
MISO = 23
MOSI = 24
CS = 25
mcp = Adafruit_MCP3008.MCP3008(clk=CLK, cs=CS, miso=MISO, mosi=MOSI)
To see what's going on, I wired into my MSO scope and attached the screenshot with labels added to the traces. I see communication being sent to the chip, but no response being sent. The product documentation for that chip describes certain CS values being toggled to get the chip talking, but I'm not seeing that. Does anyone have insights here?
thanks