PIC Lesson: MCP23S17-IO Expander


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

Sertai Telegram Group bagi dapatkan source code


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

  1. Hello,
    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.
    And
    #include “LibraryHardware.h”
    #include “LibraryPeripheral.h”
    #include “LibraryIoExpander.h”
    are these files that you made yourself or can I download them on your site ?

    Thanks
    Bart

Leave a Reply

Your email address will not be published. Required fields are marked *