Skip to content

Loop

Background Processing


Overview

loop() performs the non-critical runtime work of REVA.

It is intentionally separated from waveform timing.

The loop may run faster or slower depending on display activity and operator interaction, but this must not disturb the generated waveform.


Responsibilities

Typical loop responsibilities include:

  • button scanning,
  • menu handling,
  • display updates,
  • parameter editing,
  • EEPROM write decisions,
  • user interface state management.

Architecture

loop()

├── Button Handling
├── Menu Logic
├── Display Update
├── Parameter Management
└── EEPROM Management

Separation From Waveform Timing

The loop does not generate carrier pulses.

The loop does not define segment timing.

The loop does not directly create packet envelopes.

Waveform timing is delegated to:

Packet Executor
        ↓
Timer2 Scheduler
        ↓
Timer1 Carrier Engine

User Interaction

Operator input is processed in the loop.

Examples:

  • select another packet family,
  • increase pulse scale,
  • decrease gap scale,
  • update displayed values.

The loop modifies state variables.

The timer subsystem executes timing.


EEPROM Handling

EEPROM access is slow compared to waveform timing.

For this reason, EEPROM activity belongs to the slow timing domain.

EEPROM writes should be controlled and should not occur inside timing-critical execution paths.


Design Philosophy

The loop is allowed to be non-deterministic.

The waveform is not.

This is why timing-critical work is isolated from background processing.


See Also