Raspberry Pi GPI pins and encoders

Thanks Riban… but so it’s not usable? Why do I have this pattern… forgive my ignorance

Is this the original zynthian 2to 1 board which dealt with 2 encoders ?

That schematic shows a MPC23008 which is an I2C GPI interface. The module you showed earlier uses a TCA9458A which is an I2C multiplexer. They are very different devices.

1 Like

Thanks… then I was wrong to order the chip… Now I have to reorder it and wait another month… :roll_eyes: :roll_eyes: :roll_eyes:
Can the CD74HC4067 fit?
I remembered that the multiplexer I bought is the same as the ones used with Arduino in my MiniMoog…

What problem are you trying to solve?

I built a minimal Zynthian with a Raspberry P3 B+ and I have to connect the 4 encoders… Zynthian minimal....😉 - #3 by Lanfranco
I found an MPC23008 chip in the drawer… so I do with this, as I did in the Zynthian I’m using now.
Thanks again for the speed of your replies.

Or you could connect the encoders directly!

I tried but also with gpio readall, but I can’t connect the encoders. I connected the 4 switches and they work.
To find the pins can I ground one pin at a time?
I would have liked to make do but unfortunately I can’t…

To use encoders directly connected you must find 12 spare GPI pins, i.e. not Tx, Rx, I2C or I2S. Then assy these pins in webconf wiring.

I did this on the Raspberry p4 with few problems… but on the P3 it gives me absurd values on the gpio readall…
The switches (which work fine) are connected to the physical pins 37,33,31,36
Which according to the scheme are the GPIOs: 26,13,6,16
While to work, on Webconf I wrote the GPIO pins (thanks to gpio readall)23,27,22,25…

This Raspberry pi3 B+ is the first board I bought years ago… I’ve done many projects with it… Could it be that some pins don’t work anymore?

I still need you… (What a bummer!!!)
So I connected the 4 encoders to the integrated MPC…
wiring

The IC is seen but the 4 encoders don’t work…
Immagine

I’m not sure that MCP23008 works for encoders. It’s possible that code doesn’t support this config, sorry. MCP23008 was used for switches only in the V1, but it was replaced by MCP23017 when encoders were also moved out of GPIO. You should use a MCP23017 that is well tested and supported for encoders & switches.

Regards

1 Like

Many thanks Jofemodo. :wink:

Oh yes it does. Where even was a special preset in the code known as prototype-kees in the beginning, which was based on the 23008.

Are you really sure? Perhaps if you config the MCP23008 like a MCP23017 and you don’t use the second bank. I never tried…

1 Like

… but Jofemodo, in my first homebuilt Zynthian, I mounted this IC and it works from the first start up…

1 Like

OK. Then, most probably, zyncore lib is managing the chip as a MCP23017, using only the first bank.

1 Like

I solved… this P3 B+ raspberry I had used for a thousand projects and probably there are some pins that don’t work… I swapped it with a P3 B+ that I used for Kodi which is even more recent… now it works all with the encoders connected directly to the GPIO… The damaged one for Kodi is fine…
Thank you

3 Likes

:wink:

1 Like

3D printer?.. But I think you use wood which is much nicer :heartbeat:

1 Like