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
I2C Slave with interrupt
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: I2C Slave with interrupt
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.
The easy way to do nonblocking communication with MicroPython targets is by using a UART.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: I2C Slave with interrupt
Thank you for your reply.
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: I2C Slave with interrupt
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.
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.
Index to my micropython libraries.