Operating Modes
The Four Modes
The board is always in exactly one of four modes, selected with m0 to m3.
Switching modes re-arranges the relays and re-assigns the shared analog hardware.
Mode 0 — CH1 Generator / CH2 Output
Function generator only. This is the mode the board starts in.
Which BNC is live depends on the active channel, set separately from the mode:
- CH1 Generator energises K3, muting CH2. CH1’s own attenuator/gain pack
(
a/g) sets the amplitude, and CH2’s offset DAC plus itsba/bgpack act as CH1’s DC offset. - CH2 Output energises K2, muting CH1. CH2 drives its own BNC.
| Frequency range | 1 Hz - 20 kHz |
| Sample rate | 40 kSa/s |
| Offset range | Full ±7.58 V — a dedicated chain provides it |
| Oscilloscope | Not available |
This is the mode to use when you only need a signal out. Because the offset comes from its own hardware chain rather than from digital headroom, this is also the mode with the most usable offset range.
Mode 1 — Oscilloscope
The DDS is stopped entirely. Nothing is generated on either BNC; both output gates are energised.
This is the only mode in which the 16-bit SAR is available, and the reason is Rule 2 from the previous page: the SAR’s comparison reference is CH1’s signal DAC, and the SAR can only walk that DAC bit by bit if no synthesiser is writing to it. Stopping the DDS is what frees it.
| Generation | None |
| Available converters | 16-bit SAR and internal 10-bit ADC |
| SAR conversion | ~216 µs per sample (~4.6 kSa/s) |
| SAR resolution | 76 µV at the converter node |
| Relays | K2 ON, K3 ON, K4 ON, K5 ON |
Use this mode when measurement quality matters more than anything else, or when the signal you are measuring comes from somewhere other than this board.
Mode 2 — Dual Independent
Both channels run their own synthesiser with independent frequency, waveform, phase, duty cycle and FM settings.
Two things change relative to single-channel operation:
The timer is shared. One DDS interrupt now services two channels, so each gets 20 kSa/s instead of 40 kSa/s, and the per-channel frequency ceiling drops to 10 kHz.
The offset DAC is now a waveform. It is generating CH2’s output, so it
cannot simultaneously hold a static DC level. The bd command is refused with
error -4 in this mode. Offset in Dual mode has to come out of digital
headroom, which means it competes directly with amplitude — see
Amplitude and Offset.
| Frequency range | 1 Hz - 10 kHz per channel (both active) |
| Sample rate | 20 kSa/s per channel |
Static offset (bd) | Refused |
| Oscilloscope | Not available |
A channel-enable mask lets you mute either channel without leaving the mode. Disabling a channel both stops ticking its synthesiser — returning the survivor to 40 kSa/s and its full 20 kHz ceiling — and energises that channel’s gate relay so its BNC is grounded rather than left holding a frozen DC level.
Mode 3 — CH2 Generator + Scope
The only mode that generates and measures at the same time. The pairing it enforces is dictated by the hardware, not by preference.
CH1 cannot generate here. The scope has taken CH1’s gain pack via K5, so
CH1’s BNC is muted (K2 energised). CH2 has its own separate ba/bg pack and
is unaffected, so CH2 is the channel that generates. The firmware pins the
channel-enable mask to CH2 automatically on entry.
The SAR cannot be used here. Its comparison reference is CH1’s signal DAC,
which the scope now owns. The o and os capture commands reply -4 in this
mode. Only the internal 10-bit ADC path (oi) works, because it touches no DAC
at all.
| Generating channel | CH2 only (mask pinned) |
| Sample rate | 40 kSa/s — one channel, so no halving |
| Measurement | Internal 10-bit ADC only |
| ADC resolution | 4.88 mV at the converter node |
bd (static offset) | Refused — the offset DAC is CH2’s live waveform |
| Relays | K1 ON, K2 ON, K3 off, K4 ON, K5 ON |
This is the mode for stimulus-and-response work: drive a circuit from CH2 and watch what comes back. Accept the 10-bit resolution; there is no way to have both the SAR and a running synthesiser, because they are the same DAC.
Choosing a mode
| Requirement | Mode |
|---|---|
| One signal out, maximum offset range | 0 |
| Best measurement resolution | 1 |
| Two independent signals | 2 |
| Stimulus and response together | 3 |
If a control is greyed out, the app will tell you which mode enables it and
offer to switch. It is mirroring the firmware’s own rules — the same request
sent by hand over the protocol would come back as -3 (wrong active channel) or
-4 (wrong mode).
Updated · Full project report (PDF)