i2cdetect shows entries on all addresses when using spi device - Raspberry Pi Forums


hello!

using c wiringpi program lfo module synthesizers.
have mcp4725 dac connected i2c bus on pi , worked fine until added mcp3208 adc on spi bus.

if run app, dac on i2c bus not working anymore.
checked output of i2cdetect , shows devices on adresses (only 1 dac connected), after ran app. after reboot works fine , command shows right address.

after reboot:
image

after run app:
image

narrowed down 1 line in code:

code: select all

pinmode(cs_mcp3208, output);
cs_mcp3208 8 (ce0 on pi).

if exit app before line i2cdetect shows right address, if exit app right after line, problem occurs.

mcp3208 works fine , can read analog inputs mcp4725 not working anymore if set pin 8 output, if nothing connected pin 8.

know causes or problem is? possible use i2c , spi devices @ same time?
:)

check wiring, sda grounded?


raspberrypi



Comments

Popular posts from this blog

Error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode - Raspberry Pi Forums

class MPU6050 has no member named begin

missing filename after '-o'