# sebastianmesa0/uc architecture

> Architecture diagram of the GitHub repository sebastianmesa0/uc, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sebastianmesa0/uc
- Repository: https://github.com/sebastianmesa0/uc

## Overview

This repository is a collection of STM32 microcontroller lab programs, not one integrated application. The clearest user workflow is Activity 3: enter two values on a matrix keypad, configure and control a counter, then see its state on the ST7920 display with LED activity at count milestones. Lab 2 separately accepts a number and selects an animation or error display. Lab 1 contains standalone button and multiplexed-display exercises. Some relationships are dashed where the relevant call sites were not shown; animation asset files are absent from the tree.

Main entry points: [`act_3/Src/uC_Actividad_3.c`](https://github.com/sebastianmesa0/uc/blob/main/act_3/Src/uC_Actividad_3.c) (Counter application), [`lab_2/Src/uC_Lab_2.c`](https://github.com/sebastianmesa0/uc/blob/main/lab_2/Src/uC_Lab_2.c) (Number-entry application), [`lab_2/Src/ST7920_Parallel.c`](https://github.com/sebastianmesa0/uc/blob/main/lab_2/Src/ST7920_Parallel.c) (ST7920 display driver), [`act_3/Src/ST7920_Parallel.c`](https://github.com/sebastianmesa0/uc/blob/main/act_3/Src/ST7920_Parallel.c) (ST7920 display driver)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_activity3["Activity 3 counter"]
  node_activity["Counter application<br/>[uC_Actividad_3.c]"]
  node_counter["Counter control<br/>[uC_Actividad_3.c]"]
  node_ledseq["LED sequence<br/>[uC_Actividad_3.c]"]
end

subgraph group_lab2["Lab 2 animations"]
  node_lab2app["Number-entry application<br/>[uC_Lab_2.c]"]
  node_selection["Animation selection<br/>[uC_Lab_2.c]"]
  node_playback["Animation playback<br/>[uC_Lab_2.c]"]
end

subgraph group_lab1["Lab 1 exercises"]
  node_lab1p1["Lab 1 point 1"]
  node_lab1p2mesa["Lab 1 point 2"]
  node_lab1p2lab["Lab 1 point 2 variant"]
  node_lab1p3["Lab 1 point 3"]
  node_lab1p4["Lab 1 point 4"]
end

subgraph group_drivers["Hardware drivers"]
  node_keypad3["Keypad scanner<br/>[teclado.c]"]
  node_lcd3["ST7920 display driver<br/>[ST7920_Parallel.c]"]
  node_keypad2["Keypad scanner<br/>[teclado.c]"]
  node_lcd2["ST7920 display driver<br/>[ST7920_Parallel.c]"]
end

node_user(("Operator"))
node_displayhw["ST7920 display"]
node_ledhw["LED bar"]

node_user -.->|"configures and controls"| node_activity
node_activity -.->|"reads keys"| node_keypad3
node_activity -->|"updates state"| node_counter
node_counter -->|"starts sequence"| node_ledseq
node_activity -->|"renders screens"| node_lcd3
node_lcd3 -->|"drives"| node_displayhw
node_ledseq -->|"sets LEDs"| node_ledhw
node_user -.->|"enters number"| node_lab2app
node_lab2app -.->|"reads keys"| node_keypad2
node_lab2app -->|"processes input"| node_selection
node_selection -->|"selects animation"| node_playback
node_lab2app -->|"shows prompts and errors"| node_lcd2
node_playback -->|"draws frames"| node_lcd2
node_lcd2 -->|"drives"| node_displayhw
node_user -.->|"operates"| node_lab1p1
node_user -.->|"operates"| node_lab1p2mesa
node_user -.->|"operates"| node_lab1p2lab
node_user -.->|"operates"| node_lab1p3
node_user -.->|"operates"| node_lab1p4

click node_activity "https://github.com/sebastianmesa0/uc/blob/main/act_3/Src/uC_Actividad_3.c"
click node_counter "https://github.com/sebastianmesa0/uc/blob/main/act_3/Src/uC_Actividad_3.c"
click node_ledseq "https://github.com/sebastianmesa0/uc/blob/main/act_3/Src/uC_Actividad_3.c"
click node_keypad3 "https://github.com/sebastianmesa0/uc/blob/main/act_3/Src/teclado.c"
click node_lcd3 "https://github.com/sebastianmesa0/uc/blob/main/act_3/Src/ST7920_Parallel.c"
click node_lab2app "https://github.com/sebastianmesa0/uc/blob/main/lab_2/Src/uC_Lab_2.c"
click node_selection "https://github.com/sebastianmesa0/uc/blob/main/lab_2/Src/uC_Lab_2.c"
click node_playback "https://github.com/sebastianmesa0/uc/blob/main/lab_2/Src/uC_Lab_2.c"
click node_keypad2 "https://github.com/sebastianmesa0/uc/blob/main/lab_2/Src/teclado.c"
click node_lcd2 "https://github.com/sebastianmesa0/uc/blob/main/lab_2/Src/ST7920_Parallel.c"
click node_lab1p1 "https://github.com/sebastianmesa0/uc/blob/main/lab_1/uC_A1_Punto_1_Mesa.c"
click node_lab1p2mesa "https://github.com/sebastianmesa0/uc/blob/main/lab_1/uC_A1_Punto_2_Mesa.c"
click node_lab1p2lab "https://github.com/sebastianmesa0/uc/blob/main/lab_1/uC_A1_Punto_2_Lab_Mesa.c"
click node_lab1p3 "https://github.com/sebastianmesa0/uc/blob/main/lab_1/uC_A1_Punto_3_Mesa.c"
click node_lab1p4 "https://github.com/sebastianmesa0/uc/blob/main/lab_1/uC_A1_Punto_4_Mesa.c"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_activity,node_counter,node_ledseq toneBlue
class node_lab2app,node_selection,node_playback toneAmber
class node_lab1p1,node_lab1p2mesa,node_lab1p2lab,node_lab1p3,node_lab1p4 toneMint
class node_keypad3,node_lcd3,node_keypad2,node_lcd2 toneRose
class node_user,node_displayhw,node_ledhw toneIndigo
```

## Components

### Activity 3 counter

- [Counter application](https://github.com/sebastianmesa0/uc/blob/main/act_3/Src/uC_Actividad_3.c): `act_3/Src/uC_Actividad_3.c`
- [Counter control](https://github.com/sebastianmesa0/uc/blob/main/act_3/Src/uC_Actividad_3.c): `act_3/Src/uC_Actividad_3.c`
- [LED sequence](https://github.com/sebastianmesa0/uc/blob/main/act_3/Src/uC_Actividad_3.c): `act_3/Src/uC_Actividad_3.c`

### Lab 2 animations

- [Number-entry application](https://github.com/sebastianmesa0/uc/blob/main/lab_2/Src/uC_Lab_2.c): `lab_2/Src/uC_Lab_2.c`
- [Animation selection](https://github.com/sebastianmesa0/uc/blob/main/lab_2/Src/uC_Lab_2.c): `lab_2/Src/uC_Lab_2.c`
- [Animation playback](https://github.com/sebastianmesa0/uc/blob/main/lab_2/Src/uC_Lab_2.c): `lab_2/Src/uC_Lab_2.c`

### Lab 1 exercises

- [Lab 1 point 1](https://github.com/sebastianmesa0/uc/blob/main/lab_1/uC_A1_Punto_1_Mesa.c): `lab_1/uC_A1_Punto_1_Mesa.c`
- [Lab 1 point 2](https://github.com/sebastianmesa0/uc/blob/main/lab_1/uC_A1_Punto_2_Mesa.c): `lab_1/uC_A1_Punto_2_Mesa.c`
- [Lab 1 point 2 variant](https://github.com/sebastianmesa0/uc/blob/main/lab_1/uC_A1_Punto_2_Lab_Mesa.c): `lab_1/uC_A1_Punto_2_Lab_Mesa.c`
- [Lab 1 point 3](https://github.com/sebastianmesa0/uc/blob/main/lab_1/uC_A1_Punto_3_Mesa.c): `lab_1/uC_A1_Punto_3_Mesa.c`
- [Lab 1 point 4](https://github.com/sebastianmesa0/uc/blob/main/lab_1/uC_A1_Punto_4_Mesa.c): `lab_1/uC_A1_Punto_4_Mesa.c`

### Hardware drivers

- [Keypad scanner](https://github.com/sebastianmesa0/uc/blob/main/act_3/Src/teclado.c): `act_3/Src/teclado.c`
- [ST7920 display driver](https://github.com/sebastianmesa0/uc/blob/main/act_3/Src/ST7920_Parallel.c): `act_3/Src/ST7920_Parallel.c`
- [Keypad scanner](https://github.com/sebastianmesa0/uc/blob/main/lab_2/Src/teclado.c): `lab_2/Src/teclado.c`
- [ST7920 display driver](https://github.com/sebastianmesa0/uc/blob/main/lab_2/Src/ST7920_Parallel.c): `lab_2/Src/ST7920_Parallel.c`

### Other components

- **Operator**
- **ST7920 display**
- **LED bar**

## Connections

- Operator → Counter application: configures and controls
- Counter application → Keypad scanner: reads keys
- Counter application → Counter control: updates state (evidence: `act_3/Src/uC_Actividad_3.c`)
- Counter control → LED sequence: starts sequence (evidence: `act_3/Src/uC_Actividad_3.c`)
- Counter application → ST7920 display driver: renders screens (evidence: `act_3/Src/uC_Actividad_3.c`)
- ST7920 display driver → ST7920 display: drives (evidence: `act_3/Src/ST7920_Parallel.c`)
- LED sequence → LED bar: sets LEDs (evidence: `act_3/Src/uC_Actividad_3.c`)
- Operator → Number-entry application: enters number
- Number-entry application → Keypad scanner: reads keys
- Number-entry application → Animation selection: processes input (evidence: `lab_2/Src/uC_Lab_2.c`)
- Animation selection → Animation playback: selects animation (evidence: `lab_2/Src/uC_Lab_2.c`)
- Number-entry application → ST7920 display driver: shows prompts and errors (evidence: `lab_2/Src/uC_Lab_2.c`)
- Animation playback → ST7920 display driver: draws frames (evidence: `lab_2/Src/uC_Lab_2.c`)
- ST7920 display driver → ST7920 display: drives (evidence: `lab_2/Src/ST7920_Parallel.c`)
- Operator → Lab 1 point 1: operates
- Operator → Lab 1 point 2: operates
- Operator → Lab 1 point 2 variant: operates
- Operator → Lab 1 point 3: operates
- Operator → Lab 1 point 4: operates
