Skip to content

CP2112 simple program to write and read registers of i2c controller (400Khz speed)

License

Notifications You must be signed in to change notification settings

EdwardGeonity/CP2112-I2C-GUI-Program-to-read-and-write-Registers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CP2112

app

CP2112 I²C Control Tool

A Python GUI application for communicating with I²C devices using the Silicon Labs CP2112 HID-to-I²C bridge. Supports register read/write operations and execution of command scripts. ✨ Features

✅ Read/write to 16-bit I²C registers (1 to 32 bytes)

✅ Execute custom scripts with WBlock syntax

✅ Batch processing via Sequence all mode

✅ GUI-based input for slave address (HEX/BIN), register and data

✅ Multi-byte read and write support

✅ Real-time CP2112 communication via HID

✅ Optional debug logging (--debug)

📜 Script Format Example

Addr=2D

WBlock(01, MyInit) = [ (0103, 01, 1), # Reset (0104, 0123, 2), # Set mode ]

Addr — target I²C slave address (hex)

WBlock(ID, Name) — script block with name and ID

Each tuple: (Register, Data, Length)

Use Sequence all to execute all blocks in order

🚀 How to Run On macOS / Linux / Windows:

python CP2112_SimpleProg_debug_mode.py

With debug logs:

python CP2112_SimpleProg_debug_mode.py --debug

🛠 Building App / EXE

macOS:

pyinstaller --windowed --name "CP2112_GUI" CP2112_SimpleProg_debug_mode.py

Windows:

pyinstaller --windowed --name "CP2112_GUI.exe" CP2112_SimpleProg_debug_mode.py

About

CP2112 simple program to write and read registers of i2c controller (400Khz speed)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages