Page 1 of 1

Can software I2C replace hardware channel?

Posted: 14 February 2014, 9:33 AM
by GTBecker
I made an error in pin assignments of the second hardware I2C channel on a -24u, reversing SDA (should be pin 25) and SCL (17). I'll cut-and-jumper the board but, meanwhile, I tried opening the channel with explicit, reversed, pin selections. I expected that would open I2C channel 1 as a software channel and correct the reversal:

Code: Select all

Public Sub Open_I2C(byval I2C_Channel as byte)
	if I2C_Channel = 0 then
		Call OpenI2C(0, 0, 0, 11)	' open hardware I2C channel 0
	else
		Call OpenI2C(1, 17, 25, 59)	' open soft I2C channel 1, pins reversed
	end if
End Sub
That didn't appear to work. Should it? Or would I need to use channel 2-4?