PIC Lesson: MCP23S17-IO Expander

April 5th, 2013  Posted at   Lesson PIC
arrow   |   4 Commentsarrow

I/O Expander digunakan untuk menambah bilangan digital input dan output daripada input output sedia ada pada PIC.

IO Extender

Contoh IC I/O Expander adalah MCP23S17 daripada Microchip. MCP23S17 menggunakan sambungan SPI. Skematiknya adalah seperti di bawah.

Schematic MCP23S17

MCP23S17 mempunyai 16 I/O dimana setiap pin nya boleh di setkan sebagai input ataupun output. Setiap pin nya juga mempunyai internal pull-up. Saya menggunakan lapan push button dan lapan LED sebagai demo menggunakan input dan output. Berikut adalah videonya.

PIC Source Code

4 Responses to “PIC Lesson: MCP23S17-IO Expander”

  1. bart says:

    Hello Shahrul , could you send me your mail

  2. bart says:

    I’m sorry but my english is not that well, I am from the Netherlands and I want to learn how to work with a microcontroller.
    I want you to ask if you could but the code for the method PIC_init en SPI_init on your website. It would be a grate hulp.
    #include “LibraryHardware.h”
    #include “LibraryPeripheral.h”
    #include “LibraryIoExpander.h”
    are these files that you made yourself or can I download them on your site ?


Leave a Reply

What is 3 + 5 ?
Please leave these two fields as-is:
IMPORTANT! To be able to proceed, you need to solve the following simple math (so we know that you are a human) :-)