Mcp 23017 and Pic 16f877


Closed Thread
Results 1 to 17 of 17

Hybrid View

  1. #1
    Join Date
    Apr 2011
    Location
    BELGIQUE
    Posts
    12


    Did you find this post helpful? Yes | No

    Default Re: Mcp 23017 and Pic 16f877

    Hello everyone,

    Ok it works!

    Bit 7 of Port A and B of the MCP23017 must be 1 before the startup of the program.

    And in this case each power program is operating normally the first

    Here is the code added.

    i2cwrite sda,scl,$40,[iolata,128] 'Output Latch Reg
    i2cwrite sda,scl,$40,[iolatb,128] 'Output Latch Reg


    If you have comments please.

    Thank you

    Claudy

  2. #2
    rauloj's Avatar
    rauloj Guest


    Did you find this post helpful? Yes | No

    Default Re: Mcp 23017 and Pic 16f877

    Quote Originally Posted by CLAUDY View Post
    Bit 7 of Port A and B of the MCP23017 must be 1 before the startup of the program.

    And in this case each power program is operating normally the first

    Here is the code added.

    i2cwrite sda,scl,$40,[iolata,128] 'Output Latch Reg
    i2cwrite sda,scl,$40,[iolatb,128] 'Output Latch Reg


    If you have comments please.

    Thank you

    Claudy
    Hi Claudy!

    It's not OLATA/OLATB you are setting 1, but IOCON.
    After power-on BANK bit = 0 and IOCON's adr = 0A/0B not OLATA/OLATB's.
    After setting IOCON bit 7 to 1 you can use address mapping as described in datasheet table 1-5.

    R

Members who have read this thread : 0

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