need help with PBP, I2C and MCP23017


Closed Thread
Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    Jun 2011
    Location
    Indian Harbour Nova Scotia
    Posts
    108


    Did you find this post helpful? Yes | No

    Default Re: need help with PBP, I2C and MCP23017

    Address bits are connected to ground. for Arduino I could use address $20 or 0 to access, the latter if I used one of the libraries.

  2. #2
    Join Date
    May 2013
    Location
    australia
    Posts
    2,645


    Did you find this post helpful? Yes | No

    Default Re: need help with PBP, I2C and MCP23017

    for Arduino I could use address $20 or 0 to access, the latter if I used one of the libraries.
    in Australia I drive on the other side of the road, its horses for courses
    pbp uses 8bit address scheme



    Address bits are connected to ground
    so A0=0 A1=0 A2=0
    plugged into formula
    pbp i2c address = (% 0 1 0 0 A2 A1 A0 )<<1
    addr =(%0100000)<<1 = $40

    so
    I2CWRITE SDA,SCL,$40,[$05,%10111000] is whats required
    Warning I'm not a teacher

  3. #3
    Join Date
    Jun 2011
    Location
    Indian Harbour Nova Scotia
    Posts
    108


    Did you find this post helpful? Yes | No

    Default Re: need help with PBP, I2C and MCP23017

    Thanks Richard. MELabs also told me it was $40 for address. That was the problem! That and the fact my outputs are active low and I was sending active high bits.

Similar Threads

  1. I2C question w/ MCP23017 Port Expanders
    By dsicon in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 26th December 2012, 05:47
  2. PIC 18F4550 and MCP23017
    By DaveC3 in forum Code Examples
    Replies: 12
    Last Post: - 4th December 2010, 14:01
  3. HW I2C with PBP
    By EToscano in forum Serial
    Replies: 0
    Last Post: - 15th October 2009, 17:35
  4. i2c PBP questions
    By TimV in forum General
    Replies: 14
    Last Post: - 5th February 2007, 17:58
  5. More I2C question with PBP
    By Qacer in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 2nd March 2006, 21:35

Members who have read this thread : 0

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

Tags for this Thread

Posting Permissions

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