These projects transition the work from the HCS12 bench system into the mobile EEBOT platform.
Unlike the earlier projects, these programs interact with motors, sensors, battery status inputs, and timing subsystems that influence real-world movement.
The EEBOT section builds on foundational HCS12 skills and applies them to a mobile robotic platform.
Code now affects the physical world through motors, obstacle sensors, timers, and movement logic.
The projects progress from:
- Reading physical sensor input (battery analog sensing + bumpers)
- Controlling actuators (motors and direction pins)
- Using time as a program-controlled resource
- Automating robot movement based on real-world feedback
These projects form the steps between basic microcontroller development and embedded robotic behavior.
All projects run on the EEBOT robot system, which includes:
- Dual DC motors driven through an H-bridge circuit
- Front and rear bumper switches for collision detection
- Analog battery monitor circuit through the ADC (ATD subsystem)
- Dispatch-style program flow using timers and state logic
- LCD display output for debugging and runtime monitoring
This diagram shows the relationship between the sensor inputs, battery monitor, and microcontroller analog pins used in these projects.
Objective:
This project focuses on reading real-world signals from the bump switches and analog battery level sensor and translating them into meaningful system status feedback. The microcontroller samples the battery voltage using its ATD subsystem, compares the reading against predefined operating thresholds, and displays the robot’s readiness state. This serves as a diagnostic stage before movement logic is enabled.
Technical Implementation Notes:
- Configures ATD subsystem using CTL2–CTL5 to set resolution, sampling time, conversion count, and justification format
- Uses ATD Input Enable Register to activate analog buffering for AN0 and digital mode for bumper inputs
- Implements threshold logic using compare operations to classify voltage into ranges (e.g., full / low / critical)
- Uses bit masking to selectively read only bumper input bits from the PTIP register
- Formats and outputs sensor values to the LCD using stored character tables and string routines
- Validates correct ATD configuration by ensuring conversion complete (CCF) flag is set before reading registers
Skills Demonstrated:
✔ Analog-to-digital sampling and register-level ATD configuration
✔ Digital sensor interpretation using input masking
✔ Threshold-based logic decisions using comparison operations
✔ Real-time system feedback using formatted LCD output
✔ Hardware validation workflow through conversion flag polling
Objective:
This project applies direct motor control to the robot using GPIO outputs and predefined driver routines. The motors can be enabled, disabled, and driven forward or reverse using directional bit control. The project reinforces the concept of hardware abstraction by breaking complex movement into reusable subroutines.
Technical Implementation Notes:
- Uses predefined routines (PORTON, PORTOFF, STARFWD, PORTREV, etc.) to abstract GPIO transitions into readable motor commands
- Writes to PORTA and PORTB using masking to avoid unintended register modification
- Implements safe direction switching by enforcing a neutral (off) state before reversing polarity
- Demonstrates mapping of logical motion states to physical H-bridge control behavior
- Verifies movement states using stepwise testing (left only, right only, both forward, both reverse)
Skills Demonstrated:
✔ Hardware abstraction using named motion subroutines
✔ Bitwise output control for motor enable and direction signals
✔ Safe switching logic to prevent motor stress or short-circuit states
✔ Understanding timing effects of reversing and activating loads
✔ Progression from low-level register control to application-level motion logic
Objective:
This project introduces timer-based program control to replace inefficient software delay loops. The timer overflow flag is used to trigger recurring actions at predictable intervals, enabling the robot to time events without blocking execution.
Technical Implementation Notes:
- Configures TSCR1 to enable the timer subsystem and sets prescaler values in TSCR2
- Monitors TOF flag to detect overflow events and clears it manually to prevent repeated triggers
- Uses periodic time checkpoints to perform actions such as blinking outputs or logging runtime state
- Demonstrates the difference between execution-blocking delays and event-triggered processing
- Introduces timing accuracy considerations based on prescaler and clock frequency
Skills Demonstrated:
✔ Event-driven timing using hardware overflow
✔ Clock-based timing configuration using prescalers
✔ Replacing blocking delays with periodic task execution
✔ Flag polling and timing-based execution control
Objective:
This project expands timer usage from periodic overflow checks to precise scheduled events. Output compare logic enables specific timing actions such as reversing, pausing, or turning the robot a controlled amount based on elapsed time rather than continuous sensor polling.
Technical Implementation Notes:
- Uses TCNT as a continuously incrementing reference clock for scheduled event timing
- Configures Output-Compare (OC) channels to trigger movement transitions (start, stop)
- Generates sequenced actions by scheduling future timestamps relative to the current TCNT value
- Demonstrates non-blocking motion timing (robot continues operation while timers schedule next transition)
- Uses compare match flags to advance system behavior instead of polling switches
Skills Demonstrated:
✔ Output-compare event scheduling
✔ Motor timing without blocking execution loops
✔ Coordinating timed motion sequences
✔ Precision control using hardware timer registers
✔ Step-based execution controlled through timestamps rather than polling
Objective:
This final project integrates sensors, timers, and motor control into a fully autonomous roaming system. The robot detects collisions through bump sensors, applies timing-based responses, and continues navigating using a structured state machine. The final design evolves from a theoretical diagram into a working implementation with required "START" and transition states.
Technical Implementation Notes:
- Implements a multi-state control system transitioning between: START → FORWARD → REVERSE → TURN → FORWARD LOOP
- Uses bumper input as interrupt-like triggers to transition out of the forward state
- Uses timers to enforce motion durations (reverse time, turning time, resume movement delay)
- Integrates predefined motor control routines for consistent behavioral transitions
- Improves theoretical state machine by adding a START state to guarantee a known initialization point before movement (missing in the initial conceptual diagram)
- Uses dispatch loop architecture to repeatedly evaluate system conditions and trigger state behaviors
Skills Demonstrated:
✔ Full robotic autonomy using closed-loop sensor feedback
✔ State-machine program design and refinement from conceptual to implementable form
✔ Timing-based navigation and reactive motion transitions
✔ System integration across ATD, GPIO, timing, display, and motion subsystems
✔ Debugging complex real-time behavior using LCD-based telemetry feedback
- ATD subsystem configuration and real-world analog interpretation
- H-bridge motor direction and operational safety handling
- Timer interrupts, overflow handling, and output-compare scheduling
- Event-driven robotic behavior and timing control
- Practical debugging using LCD-based runtime output
- Finite state machine robotic programming and refinement
- Closed-loop autonomous navigation using sensor feedback
- Hardware abstraction through layered motor and sensor routines