Page 1 of 1
I2C Slave with interrupt
Posted: Tue Oct 10, 2017 7:13 pm
by kumt
Hi,
I think I2C Slave on pyboard is a blocking process. Is it possible to use pyboard as a slave with interrupts? Any suggestions on coding using pyboard IRS for getting around interrupt problem.
Thanks
kumt
Re: I2C Slave with interrupt
Posted: Wed Oct 11, 2017 9:13 am
by pythoncoder
For performance this would be best implemented as a C module, buffering the data along the lines of the UART driver. Writing such a driver might be tricky depending on your experience.
The easy way to do nonblocking communication with MicroPython targets is by using a UART.
Re: I2C Slave with interrupt
Posted: Wed Oct 23, 2019 9:14 pm
by kumt
Thank you for your reply.
Re: I2C Slave with interrupt
Posted: Sat Oct 26, 2019 8:39 am
by pythoncoder
Blimey, that was a long delay
In the intervening two years I wrote a means of creating a communication channel using I2C to enable a Pyboard to communicate with any MicroPython device using stream I/O. The Pyboard achieves asynchronous full duplex communication with targets such as an ESP8266. It may be found
in this repo.
In general a UART is far preferable, but on targets like ESP8266 it's not an easy option.