Can software I2C replace hardware channel?

Discussion specific to the 24-pin ZX microcontrollers, e.g. ZX-24r, ZX-24s and ZX-24t.
Post Reply
GTBecker
Posts: 616
Joined: 17 January 2006, 19:59 PM
Location: Cape Coral

Can software I2C replace hardware channel?

Post 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?
Tom
Post Reply