i2c Pins


just a question regarding the I2C pins. The MCP23017 is already implemented, why not implement the SPI version 23S17?
It would be much quicker for reading keys and encoders.
using the Adresses it would be possible to use 8 of these chips with one chipselect pin.
Would make sense for the people using mega 644 /1284 to shift simple on/off functions away from the microcontroller.

Display drive should also be possible for the 8 Bit parallel Displays , i found a basic Lib here working for I2C AND SPI:


this Lib works fine with KS0108 and is very easy to modify( i use it for SED1520 )

Have you any plans in this direction?


  • SED1520 is a graphic display and would if supported be handled from u8g lib build in. This already uses spi e.g. for ST920 display and KS0108 with parallel connection is also included (not sur eif I have seen spi version).

    Hardware SPI is normally used for SD Card and on display pins no hardware spi pin is available at the right spot (e.g. reprapdiscount display) so it uses software spi. So what is faster is hard to say. SPI in general is fast but if you use the fast hardware spi you might get problems with sd card. But main reason is I have no sold display that uses spi so I never wrote a driver for it. As you see you could easily add a additional driver like i2c->4bit parallel and add it. SO if you have a working implementation for work092 make a push request and I can update it for all.
  • OK,may be you misunderstood , what i ment is using the MCP23017 / 23S17 to handle the8Bit parallel displays as I2C or SPI
    device addressed to the people working with GEN7 or other Boards with few I/O Pins.

    As I´m coming from the hardware side I´m not shure if my programming knowledge is good enough to implement, but i will try to make it.I´m looking at this just from a sporting aspect not really from a need to have it.
  • Would be great. To make it easy you should use software SPI i guess. Hardwrae spi has 4 modes and different speeds but only gets set once with sd initialization. So if the chip does not support that mode and speed it gets hard to get both running. With software spi you are quite free. 
Sign In or Register to comment.