HDMI CEC adapter
Posted: Sun May 02, 2021 1:50 pm
I have ported ArduinoLib_CEClient to the libmaple-based core: https://github.com/arpruss/ArduinoLib_CEClient
WIth an Arduino, the original library needs two pins and some circuitry to handle open drain communication. On STM32F1, all you need is a single 3.3V pin because open drain communication is built-in (very handy; I used it already for GameCube controllers). I bought a cheap (about 25 cents!) HDMI cable, cut into it, found the CEC line and the CEC ground line, connected these to STM32F1 pins, and the library works.
I am now working on a sketch that uses my USBComposite library to read data from a remote control over CEC. This will let me connect my laptop to a TV with my modified HDMI cable, connect USB and control it with the TV remote. https://github.com/arpruss/USBCECAdapter
WIth an Arduino, the original library needs two pins and some circuitry to handle open drain communication. On STM32F1, all you need is a single 3.3V pin because open drain communication is built-in (very handy; I used it already for GameCube controllers). I bought a cheap (about 25 cents!) HDMI cable, cut into it, found the CEC line and the CEC ground line, connected these to STM32F1 pins, and the library works.
I am now working on a sketch that uses my USBComposite library to read data from a remote control over CEC. This will let me connect my laptop to a TV with my modified HDMI cable, connect USB and control it with the TV remote. https://github.com/arpruss/USBCECAdapter