I have a raspi5/mcp3008 problem that i am unable to solve.
The MCP responds only to channel 0. Channel 1 seems to do something in concert with ch0. looks like its measuring differential. ch 2/3, 4/5 and 6/7 dont do anything.
I have put a scope on the contraption and the DATAOUT (pin12 to MOSI) gives the data for ch0 regardless the value in the program.
Counting bits on the scope dont make sense apart from ch0.
I tried to includea picture os the scope screen but failed
Its strange the the bit config on the DATAIN line (Din to MISO ) seems fixed, does not change whatever the program says.
Advise would be very welcoma as i exhausted my braincells.
Steffen
The MCP responds only to channel 0. Channel 1 seems to do something in concert with ch0. looks like its measuring differential. ch 2/3, 4/5 and 6/7 dont do anything.
I have put a scope on the contraption and the DATAOUT (pin12 to MOSI) gives the data for ch0 regardless the value in the program.
Counting bits on the scope dont make sense apart from ch0.
Code:
from gpiozero import MCP3008from time import sleepcount = 0channel = 0tmp = MCP3008(channel) def meetmcp(channel): tmp = MCP3008()# print (tmp.value) waarde = (tmp.value * 3.3-0.5)*100 print (str(round(waarde,1)))while True:# meetmcp(channel=7) meetmcp(channel=0) count +=1 print(count) sleep(0.5)
Its strange the the bit config on the DATAIN line (Din to MISO ) seems fixed, does not change whatever the program says.
Advise would be very welcoma as i exhausted my braincells.
Steffen
Statistics: Posted by Old Wollies — Mon Feb 03, 2025 9:09 pm