How adeniltonr/biblioteca-multiplexacao-display-portavel-mcu works
Project type and purpose
• This is a portable C‐library (“Biblioteca Multiplexação Display Portável”) for driving three 7-segment displays by multiplexing, targeting multiple MCU families (PIC, 8051, STM8, STM32, ESP32, AVR).
• It includes the core multiplex logic, a hardware‐abstraction layer for each MCU, sample firmware projects, and simulation files for PICSimLab.
File structure
• Top level:
• Docs/ (generic images and docs)
• Projetos/MCU-XXXX/ (one folder per platform)
– Docs/ (text/images specific to that MCU)
– Simulador/ (display-config files .pcf, .pzw for PICSimLab)
– Example firmware code, headers, Makefiles or IDE project files
• The PIC example has a full NetBeans/MPLAB X project under display-mcu-PIC16F88.X with build and dist directories.
• Other MCUs follow the same pattern: a HAL implementation + example code + simulation assets.
README insights
• Core goal: hardware-agnostic, modular library in C.
• Supports six MCUs via the same multiplex algorithm.
• Simulation via PICSimLab for rapid testing before flashing real hardware.
1) Application Layer (Example Firmware Projects for each MCU)
2) Core Library Module (pure C multiplex logic)
3) HAL Modules (one per MCU: PIC_HAL, 8051_HAL, STM8_HAL, STM32_HAL, ESP32_HAL, AVR_HAL)
4) Build & Toolchain (MPLAB X, AVR Studio, ESP-IDF, STM32CubeIDE, MicroC8051)
5) Simulation Engine (PICSimLab + .pcf/.pzw files)
6) Hardware (7-segment displays + multiplex circuit)
• Firmware Project → calls → Core Library → invokes → HAL Module → drives → Hardware (pins) or Simulation Engine
• Firmware Project → compiled by → Build & Toolchain → outputs → Firmware Binary → loaded into → MCU or Simulator
• Simulation files (.pcf/.pzw) → input to → PICSimLab
c. Architectural patterns & principles:
– Layered architecture: Application → Library → HAL → Hardware/Simulator
– Strategy/Plugin pattern: each HAL implements the same interface to the core library
– Separation of concerns: multiplex logic vs. MCU-specific I/O
d. Key technologies/frameworks:
– C language (ANSI C)
– PICSimLab for simulation
– IDEs/toolchains per MCU family
– Makefiles / NetBeans project files for build automation