mcp23s08

Library functions for the MCP23S08.

Author Rob Jansen, Copyright © 2024..2024, all rights reserved.
Adapted-by
Compiler 2.5r8

Description

Library functions for the MCP23S08. The port and individual
             port bits are all accessed using pseudo variables. In this way
             accessing the pins is the same as accessing PIC IO pins. 
             The provided pin functions are (x = 0..7):
                 mcp23s08_pinx_direction  using value INPUT/OUTPUT
                 mcp23s08_pinx_polarty    using value ENABLED/DISABLED
                 mcp23s08_pinx            using value HIGH/LOW
                 mcp23s08_latchx          using value HIGH/LOW
                 mcp23s08_pull_upx        using value ENABLED/DISABLED
              Port pseudo variables, activating all pins at once:
                 mcp23s08_port_direction  Bits 0 = output, 1 = input
                 mcp23s08_port_polarity   Bits 0 = normal, 1 = inverted
                 mcp23s08_port            Bits 0 = LOW, 1 = HIGH
                 mcp23s08_latch           Bits 0 = LOW, 1 = HIGH
                 mcp23s08_pull_up         Bits 0 = DISABLED, 1 = ENABLED
              All other functions are provided via procedures and functions as
              described in the Public API section.


Sources

Microchip MCP23008/MCP23S08 8-bit I/O Expander with serial interface.
         Datasheet DS20001919F.


Dependencies

No dependency found



Summary

Global variables/contants

Procedures

Private

Functions

Private

API details

Global variables/contants

Procedures

Private

Functions

Private

Related samples

Here are the list of samples which use this library:

16f182516f1825_mcp23s08.jal