An alternative for 4051 analog multiplexer with SPI feature ?

Grumpy_Mike:
Sorry no idea what you are talking about.

This is a classic x-y problem. What are you trying to do?Only by having the A/D built into the chip. I don't see your problem with the 4051, can you explain what is wrong with that?
You need 3 pins to act as a data select lines. If you cascade them then you will need n pins to get 2n analogue inputs. If that is too high a price in terms of pins then you can use a MCP23S17 to get 16 outputs from the SPI bus ( 4 pins ) or the MCP23017 for the same from the I2C bus ( 2 pins ).

well i am trying to save some pins from the arduino, so far i have 2 MAX7219 which will be chained together, then 2 shift registers also chained together, i was trying to make SPI with these 4 but seems it's not possible so i must keep them chained 2 by 2 and therefore i must use for now 6 pins and i have to use a shift register (shift in) to expand Digital pins, and an analog expander so i thought maybe i can save some pins by making the I/O expander and the analog expander as SPI and then runaway from adding another atmega328 because i wont be using the arduino board but after uploading my sketch i will remove the atmega and use in alone with the other components,
so if things didn't work out and i had to add another atmega then i must make a I2C connected between the first atmega and the second