I2C for PCF8574A


I am trying to use the Fastrack’s GPIO4&5 as a soft I2C bus to talk to a PCF8574A IO expander.

With no I2C device attached, adl_busSubscribe returns 0, and adl_busRead and adl_busWrite both return -31; ie, WM_BUS_NOT_CONNECTED_ON_I2C - which makes sense!

When I first attached my PCF8574A, with no pullups, I still got WM_BUS_NOT_CONNECTED_ON_I2C.
(the use of pullups is undocumented - see wavecom.com/modules/movie/sc … =4535#4535 )

So I added 1k pullups (to 3V), and now adl_busRead and adl_busWrite both return -1; ie, WM_BUS_MODE_UNKNOWN_TYPE - what does this indicate?

Using AT+WBR just returns “ERROR” - is there any way to get additional error details from this command?

Cross-Post: wavecom.com/modules/movie/sc … =5280#5280


Hi awneil,

Have you checked the signal lines with an oscilloscope? I don’t know what the error means, but we had trouble communicating I2C on a Q2686. After looking on the scope it was obvious that the values for the pull-ups could be improved and after changing we got perfect communication on the bus.

Best Regards,


Doh!! I had SCL and SDA transposed in the bus suscription! :blush:

Yes - which confused me somewhat, as I couldn’t see any activity at all.
But I think the scope had got itself into some funny mode - that’s the trouble with this new-fangled digital stuff! :wink:

The documentation is no help, again! :angry:

In fact, the title to the table of error codes says, “Here are some numerical error codes” - does this mean that there’s also a whole buch of other error codes…?


What a silly question - of course there are!

Basic Development Guide for Open-AT v3.12:

The table in section 3.9.2, “Returned Values Definition” omits all values after WM_BUS_SPI_GPIO_CS_NOT_FREE;

The table in section 3.9.7, “Error Codes (sic) Values” omits WM_BUS_I2C_HARD_ALREADY_USED, and all values after WM_BUS_SPI_GPIO_CS_NOT_FREE