Jump to content

Search the Community

Showing results for tags 'i2c bus collision'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • PIC Embedded Programming
    • BoostC and Chameleon compilers programming
    • BoostC porting source code
    • BoostC++ compiler programming
    • BoostBasic compiler programming
    • Assembler programming PIC
    • Novo RTOS Programming
    • Hardware PIC
    • Enhancement Requests
    • Bug Reports

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL







Found 1 result

  1. We have been using Andrew Smallridge's I2C driver with great success for a long time, but now something is up and I can't explain it. Maybe someone here can. The new design is using I2C(1) as a slave and I2C(2) as a master (on a secondary I2C bus). The chip is the 18F46K22. Problem summary: Master I2C init fails with PIR3.SSP2IF == 0 and PIR3.BCL2IF == 1. Andrew's I2C init code calls 12c_stop as the last instruction. The stop function asserts SSPCON2.PEN to initiate the stop condition, and then gets stuck in an infinite loop waiting for PIR3.SSP2IF to assert. It never does, but I notice that a bus collision is detected. The only other devices on that secondary I2C bus are two MCP23017 I/O expanders. I can't see how a bus collision can be possible. As an experiment, I try initializing I2C(1) as a master and it works fine. The bus is actually not even connected to anything, and the pull-ups are off-board. The board build is very good: checked for solder bridges, cold solder joints, and any other possible shorting conditions. We are really scratching our heads over this. Any diagnostic suggestions would be very welcome. -Mark Guzewski PS: For reference purposes, here are the definitions that I'm using for Andrew's I2C code template. I have checked these a thousand times and I'm convinced it's OK. #define PORTD_ 0xf83 #define TRISD_ 0xf95 #define e_ClkBit 0 #define e_DataBit 1 #define e_SSPCON1 0xf6c #define e_SSPCON2 0xf6b #define e_SSPSTAT 0xf6d #define e_SmpBit 7 #define e_SSPADD 0xf6e #define e_SSPBUF 0xf6f #define e_SSPIF_PIR 0xfa4 #define e_BCLIF_PIR 0xfa4 #define e_SspifBit 7 #define e_BclifBit 6
  • Create New...