The 3 Address pins A0-A2 determine the I2C address that ranges from 0x20 (all pins on ground) to 0x27 (all pins on Vcc). At a last moment I decided to leave out the pull up resistors so it would be more flexible to use together with other I/O devices. The physical layout of the chip makes it quite easy to use it on a piece of strip board. The chip also has 2 configurable interrupts (that I will not be using). Both can be used as input as well as output. The 16 I/O lines are divided into an 8 I/O PORT A and an 8 I/O PORT B. That means that you only need 2 pins (yes with Vcc and ground it makes 4) to control the chip and the added advantage is that you can share I2C with various other devices as well. The MCP23017 is an I2C enabled 16 I/O port chip. This is especially handy when working with a chip like the ESP8266 that has only limited I/O But sometimes what is simple for the one, is still a question mark for the other, so here is quick ‘how-to’ of adding 16 I/O ports to your microprocessor. I am not claiming that what I am describing here is earth shattering or trailblazing, because in fact it is very simple and no doubt has been done by many already. The module will cost you abt 1.50 euro, while the individual chip may set you back a euro or so. So I actually would advice anybody needing a 16 bit expander, to buy that one rather than build it. However the new batch, coded as MCP23017D misses 2 I/O lines: PA7 & PB7Īfter I made this expander module, a ready made module Update 2023: After a year’s shortage of the MCP23017 it appears to be available again.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |