In microcontroller systems, the display module and input module are core components for achieving human-machine interaction (HMI). Below are their classifications, principles, and typical applications:
1. Display Module is used to visualize the data or status processed by the microcontroller.
1.1 Common Display Types
- LED (Light Emitting Diode)
- Monochrome LED: Indicates status (e.g., power, alarm).
- Seven-segment display: Displays numbers (0-9), used for counters and timers.
- Matrix LED: Displays characters or simple graphics (e.g., 8×8 matrix).

LCD (Liquid Crystal Display)
- Character LCD (e.g., 1602, 2004): Displays ASCII characters, low cost.
- Graphic LCD (e.g., 128×64 pixels): Supports custom graphics, used for menu interfaces.
- TFT-LCD: Full-color display, suitable for complex interfaces (requires driver chip like ILI9341).
- OLED: Self-emitting, high contrast, supports I2C/SPI interfaces (e.g., 0.96 inch SSD1306 module).
1.2 Interface Methods
- Parallel interface: Occupies more GPIOs (e.g., HD44780 controller).
- Serial interface: Saves pins (I2C, SPI).
- Dedicated driver chips: e.g., MAX7219 (drives seven-segment displays), HT1621 (segment LCD).

1.3 Application Scenarios
- Thermometers (digital display of values)
- Smart home control panels (TFT touch screen)
- Industrial instruments (segment LCD low-power display)
2. Input Module is used to receive user commands or external signals.
2.1 Common Input Types
- Buttons
- Independent buttons: Single GPIO detection (requires software debouncing).
- Matrix keyboard (e.g., 4×4): Scanning method reduces pin usage.
- Rotary encoder: Detects rotation direction and steps (used for parameter adjustment).
Touch Sensors
- Resistive touch screen: Pressure-triggered, high precision (requires ADC sampling).
- Capacitive touch buttons: Senses finger proximity (e.g., TTP223 chip).
Sensor Inputs
- Infrared reception (e.g., NEC encoding/decoding)
- Voice module (sends commands via serial port)
2.2 Interface and Processing
- GPIO direct detection: Suitable for simple buttons.
- ADC sampling: Processes analog signals (e.g., potentiometer adjustment).
- Interrupt triggering: Real-time response to urgent inputs (e.g., emergency stop button).

2.3 Application Scenarios
- Password lock (matrix keyboard input)
- Volume control (rotary encoder)
- Smartwatch (capacitive touch sliding)
3. Typical Combination Schemes
- Calculator Input: 4×4 matrix keyboard Display: 16×2 character LCD Core: ATmega328P + I2C expansion
- Smart Home Central Control Input: Capacitive touch screen (SPI interface) Display: 3.5-inch TFT (driver chip ILI9488) Core: STM32F4 + RTOS
4. Development Points
- For the display module, pay attention to driver voltage matching (e.g., 5V vs 3.3V systems), refresh rate (dynamic scanning to prevent flicker), and font storage (Chinese font library may require external Flash).
- For the input module, pay attention to debouncing (hardware RC filtering or software delay), multi-level menu button logic design, and touch screen calibration algorithms (linear interpolation).
By reasonably selecting display and input modules, the interaction experience of microcontroller systems can be significantly enhanced. In actual development, it is necessary to weigh options based on power consumption, cost, and complexity.