Main Site Documentation

IO-Expander MCP23S17 (SPI)


#1

Hi,

has anyone already tried to use the Microchip MCP23S17 port expander with the .NET Micro Framework? I tried it the whole day with no success…

With an AVR as SPI-Master I don’t have any problems communicating with the IC, but with the .Net MF (FEZ Mini) it just won’t work (I’m a newbie to the .NET Micro Framework).

My config line is:
config = new SPI(new SPI.Configuration((Cpu.Pin)FEZmini.Pin.Di2x, false, 1, 1, false, true, 100, SPI.SPI_module.SPI1));

Thanks in advance


#2

What is “not working”? Exceptions? Is there an ID register in the chip that you can read? This way you can make sure you have things connected correctly.

Do you own a scope or logic Analyzer?
What pins on FEZ are you using? How are they connected?

By the way, we have an IO expander on this website along with code. I am not sure if that would help since it is I2C


#3

The IO expander on the site works really well, BTW, if you decide to buy one :slight_smile: IIRC there was not a lot of info in the brochure, but the chip used is a PCA9505DGG which can source 10mA and sink 15mA per port. (600mA total)

I actually bought two to try building my own, but after seeing a plain 56TTSOP in person off the board, I’m not sure I’ll be able to get a board built for it let alone get it soldered on :slight_smile:


#4

Thank you for your answers,
when I try to communicate with the chip, it’s like there is no chip connected - I don’t receive any anser (but also no exception is thrown).
Yes, a scope or a logic analyzer would possibly help, but I don’t own one.

I think the easiest way are shift registers or the IO expander on this site.


#5

You might want to invest in a scope. there is a very fine line that you will never be able to get above if you don’t have a scope (RE: Being able to identify an issue in a matter of minutes).


#6

Another thing to consider as a “cheap-a$$” test capability for something like this is to buy a bus pirate, http://www.seeedstudio.com/depot/bus-pirate-v3-assembled-p-609.html?cPath=61_68. That thing is awesome for connecting something like an SPI or I2C device to and proving it works.


#7

The bus pirate is nice. I have one. Its worth every cent.


#8

This http://www.seeedstudio.com/depot/preorder-open-workbench-logic-sniffer-p-612.html?cPath=75

and this

can solve almost any communication issue between devices.