I2C Slave with interrupt

The official pyboard running MicroPython.
This is the reference design and main target board for MicroPython.
You can buy one at the store.
Target audience: Users with a pyboard.
Post Reply
kumt
Posts: 4
Joined: Tue Oct 10, 2017 7:04 pm

I2C Slave with interrupt

Post by kumt » Tue Oct 10, 2017 7:13 pm

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

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: I2C Slave with interrupt

Post by pythoncoder » Wed Oct 11, 2017 9:13 am

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.
Peter Hinch
Index to my micropython libraries.

kumt
Posts: 4
Joined: Tue Oct 10, 2017 7:04 pm

Re: I2C Slave with interrupt

Post by kumt » Wed Oct 23, 2019 9:14 pm

Thank you for your reply.

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: I2C Slave with interrupt

Post by pythoncoder » Sat Oct 26, 2019 8:39 am

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.
Peter Hinch
Index to my micropython libraries.

Post Reply