MCP23S17 - Three different approaches - ShiftIn/ShiftOut / MSSP+PBP / MSSP+ASM


Results 1 to 19 of 19

Threaded View

  1. #1
    Join Date
    Aug 2008
    Location
    Portugal
    Posts
    240

    Post MCP23S17 - Three different approaches - ShiftIn/ShiftOut / MSSP+PBP / MSSP+ASM

    Hi everyone;

    In a project that came up was necessary to use the MCP23S17. After searching the forum, i did not find any example that would satisfy my needs.

    For this reason, I decided to write my own code to communicate with the MCP23S17. There were written three different approaches to communicate with the IC.

    The first uses only PBP and the commands and shiftin ShiftOut, the second approach, uses the MSSP module of the PIC IC with PBP, and the third, also uses the MSSP module, but the "send" and "receive" routines were written in ASM.

    The following three examples below, one per post. In each post you can see the size of the code, and the time that takes to execute the "Send" and "receive" routine.

    All codes are commented well enough to understand its operation. Also the schematic is founded attached, and the Proteus simulation. ( You must take off the ".txt" from each file )

    The code was written in Microcode Studio 3.0.0.5 and PBP2.60C.
    The IC that was used is PIC16F887.
    To test the codes, was used the development board Mikroelektronika EASYPICv6 and software PROTEUS 7.7 SP2.

    I hope it will be useful to someone.
    Attached Files Attached Files
    Thanks and Regards;
    Gadelhas

Members who have read this thread : 4

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts