ch32v003fun
ch32v003fun copied to clipboard
[Question] CH32 as I²C device with display also I²C
Hi.
I wanted to use the µC CH32 as an I²C slave device to convert simple messages into graphical data and display it on an OLED screen also connected to I²C.
I've been browsing the resources of this repository and I see that there are nice examples of I²C-Slave and OLED I²C support, however, a question is bothering me. Using both examples on the same chip, won't they interfere with each other?
Both examples use I2C1
- I understand that this is an "object" representing the I²C bus on the µC CH32. Both examples configure I2C1
in their own way - similar, but yet with a different purpose (one as a Slave and the other as a Master) Both examples use an IRQ (presumably the same?).
My question is, do the above statements translate into reality? Is it possible to use the I²C bus as master and slave at the same time, so that a device can receive data from another µC via the I²C bus and control a display embedded also on the I²C bus?
I would appreciate any info on this :)