This repository offers a collection of C language examples developed with the SDCC compiler for the CH552 microcontroller. It serves as a valuable resource for both beginners and experienced developers, providing versatile and cost-effective solutions for CH552-based projects.
The CH552 microcontroller boasts an enhanced E8051 core MCU compatible with the MCS51 instruction set, featuring:
- Instruction Efficiency: 79% of its instructions are single-byte, single-cycle, achieving execution speeds approximately 8 to 15 times faster than the standard MCS51.
- Cost-Effectiveness: Its optimized architecture makes it ideal for low-cost applications without compromising performance.
This repository encompasses various functionalities, including:
- LED Blinking (Blink)
- Analog-to-Digital Converter (ADC)
- Pulse Width Modulation (PWM)
- Timers
- Interrupts
- Bit-banging for I2C Communication
- Control of SSD1306 OLED Display
- Control of MPU6050 Accelerometer
- Control of WS2812 LEDs
Note: Examples are regularly updated to enhance project development.
Manual installation of the SDCC compiler is required to compile the examples. The following steps provide a guide for setting up the SDCC compiler on Windows / GNU/Linux:
This project is licensed under the GNU General Public License v3.0 (GPL-3.0) for all original work and modifications.
However, portions of the code are based on MCU Templates by wagiminator, which are licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License (CC BY-SA 3.0).
For more details, see: