Skip to content

Latest commit

 

History

History
53 lines (40 loc) · 2.92 KB

README.md

File metadata and controls

53 lines (40 loc) · 2.92 KB

MCU

The microcontroller unit is the brain of the Pan-Tilt system and facilitates a CLI interface to the system as-well as controls the attached hardware using a joystick, through the means of a closed-loop feedback mechanism. The system is implemented using a super-loop structure with class-like modules and a central system process.

This project uses the RB-C99 1.0 coding conventions.


Table of Contents


System Process

The main super-loop process consists of two primary stages; CLI communication followed by a FSM which in accordance with the selected system mode, determines how to regulate the attached Pan-Tilt hardware.

System Process

Modules

The MCU has is comprised of various modules, each with a specific purpose.

Name File Description
DRIVER driver.h MCU port access, interrupts, systick etc.
SYSTEM sys.h System control, modes, get/set methods.
EXCHDLR exchdlr.h Exception handling with assert() & require() methods.
TIMEPOINT tp.h Time tracking, duration calculation etc.
CHECKSUM chksum.h Static checksum method collection.
UART uart.h UART communication with telegram protocol.
SPI spi.h SPI communication with telegram protocol.
CLI cli.h Command interpretation, console logging.
MOTOR mot.h Motor interface with encoder, PWM etc.
PID pid.h PID computation class.

Modes

Text.