PDA

View Full Version : Help re 18f6722 & two i2c ports



circuitpro
- 19th January 2011, 02:14
[LIST]
Im using a 18F6722 and, until now, have only needed to use one of the two I2C ports. I previously set up I2C port #1 like this:

SSP1CON1.5=1
SSP1CON1.3=1
SSP1CON1.2=0
SSP1CON1.1=0
SSP1CON1.0=0

and it has been working fine. Now that I need to use I2C port #2 as well, I don't know what to set up. If I don't set anything, the lines aren't even pulled high by the pullup resistors. If I set the SSP2CON bits the same, the lines likewise do not go high. Maybe both I2C ports can't be in 'Master' mode?

Any suggestions would be helpful at this point.

Thanks

circuitpro
- 19th January 2011, 03:00
Please disregard. TRIS overlooked.