Skip to main content

Operating the handheld programmer — the 7 onboard keys

The Steamania handheld programmer (ELAB-N1) has two human-interface channels:

  1. The main screen — a self-contained touch UI. It talks to the MCU over UART3 and is operated by touching it. Its touch operations are out of scope here.
  2. The OLED screen + 7 keys — the subject of this manual. With the seven keys alone you can browse, write, edit, run and single-step-debug programs, manage archives and configure the network.

1. The seven keys​

KeyProgram-visible port
FunctionPort0 bit 6
UpPort0 bit 0
DownPort0 bit 1
LeftPort0 bit 2
RightPort0 bit 3
EnterPort0 bit 4
BackPort0 bit 5

The same keys double as program input controls: user programs read them as Port0 bits 0–6 (e.g. with TZ jumps), so a button can be both "operator control" and "program input".

2. Global key conventions (any page, browsing state)​

GestureEffect
Left + Right togetherFlip page — Right = next, Left = previous, wraps around
Flip until the OFF pageScreen goes dark (power-save)
Hold Function + press EnterWake the screen back up

Page flipping is blocked while editing a line, editing a file name, or inside run-control mode — keys mean something else there.

3. The page map (OLED screen)​

Left+Right walks this ring; page numbers are also the value of display register 0x81. For how to operate each page see §4.

PageNamePurpose
0x00OFFScreen dark
0x01Debug statusDelay / AD / PWM / switch regs / tick (read-only)
0x02(blank)—
0x03(blank)—
0x04Link monitorRX/TX 16 bytes each in hex + counters, headers inverted, Enter freezes
0x05ProgramBrowse / edit / run the program — the main workspace (§5–§6)
0x06Save / LoadArchives: save, load, rename
0x07Peripherals8 peripheral ON/OFF toggles + GPIO direction editor
0x08Analog inADS1115, all 16 channels (read-only)
0x09BLE consoleROLE / NETID / MADDR configuration
0x0AExamplesExample-program browser
0x0BBLE baudBaud-rate scan & set
0x0CSTARNET cfgHELLO / controlled-switch / heartbeat period
0x0DNeighborsOnline devices with latest reported value
0x0EMonitorLast 5 frames, newest first
0x0FStatisticsRX counters, own address, role
0x10ENV cfgReserved
0x15Clock adjustTime setting
0x16TestReserved
0x20–0x2FRegistersInternal registers, 16 read-only pages covering all 256
0x30–0x31File namesArchive file-name list (read-only)

4. Page-by-page guide​

Page 00 — OFF​

Screen dark (power-save). Hold Function + press Enter to wake the display.

Page 01 — Debug status​

Read-only debug page. No keys. It shows:

RowContent
Delay setCurrent system delay setting (ms)
First row, 4 cellsAD channel 0–3 voltages
Second row, 4 cellsPWM channel 1–4 duty cycles
XXXX/XXXXPeripheral switch register (hex) / peripheral-ready status
Last rowTimeout flag / system tick value / target tick

One page for both directions: the upper half RX (last 16 bytes received), the lower half TX (last 16 bytes sent), each as a 2×8 hex grid. The top line shows both frame counters R:nnnnnn T:nnnnnn.

Known headers are shown inverted (white-on-black):

HeaderMeaning
F1 DDMesh link-layer header
7ECompact-frame header
AA ? 0ATransparent header

Bytes that are NOT inverted are garbage that failed validation and was discarded — perfect for explaining in class which packets get accepted and which get thrown away.

KeyAction
EnterFreeze / unfreeze: latch both RX and TX snapshots at once (top line inverts); press again to go live. While frozen, new frames don't disturb the display

Page 05 — Program (main workspace)​

Browse, edit, run and single-step-debug programs — the busiest page. See §5 (browsing & editing) and §6 (run control & step debugging).

Page 06 — Save / Load (archives)​

16 archive slots: save, load, rename.

KeyAction
Up / DownPick a slot (> mark)
EnterLoad the program in that slot
Hold Function + EnterSave the current program into that slot (keeps the name)
Function onceRename that slot → opens the file-name editor
BackBack to the previous page
Left / Right aloneNo function (Left+Right page flip still works)

File-name editor (entered with one Function press):

KeyAction
Up / DownCharacter ±1 (printable ASCII, wraps; hold ≥0.5 s auto-repeats)
Left / RightMove the cursor (16 characters)
EnterConfirm the name and save to Flash
BackCancel, back to the slot list

Page 07 — Peripherals​

9 items across two screens: ADS1115, BME280, DS1307, TCS34725, PCA9685, WS2812B, HuskyLens, MIDI, GPIO direction.

KeyAction
Up / DownMove between items (wraps)
Left / RightPrevious / next screen (5 rows each)
EnterToggle the selected item ON/OFF (turning ON probes it once; GPIO direction opens the sub-page)
FunctionRe-probe every ON peripheral at once (shows RETRY)
BackNo action

GPIO direction sub-page (press Enter on the GPIO direction item): the 8 bits of Port1 laid out in one row.

KeyAction
UpSet the current bit to input (1)
DownSet the current bit to output (0)
Left / Right / EnterMove the cursor (wraps)
BackReturn to the list; directions take effect automatically
FunctionForce-refresh the GPIO directions now

In ENV mode, Function doubles as the ledger pump switch on this page (teacher demo polling of sensor representatives).

Page 08 — Analog in​

Read-only. A 4×4 grid shows all 16 ADS1115 channels. No keys.

Page 09 — BLE console​

Configure the BLE module ROLE / NETID / MADDR. On-screen hints: browsing FN:EDIT U/D:ROW, adjusting L/R:ADJ ENT:SET.

KeyAction
Up / DownPick a row (ROLE / NETID / MADDR)
FunctionEnter / leave adjust mode
Left / RightValue ±1 while adjusting
EnterWrite to the module while adjusting (SET OK / SET FAIL for 1.5 s)

Page 0A — Examples​

KeyAction
Up / DownBrowse examples
EnterLoad into the program area

Page 0B — BLE baud​

Entering the page auto-scans the current baud rate (FOUND / NO RESP).

KeyAction
FunctionEnter / leave edit
Up / DownPick a baud rate
Enter ×2Press twice to commit

Page 0C — STARNET cfg​

4 rows: HELLO, CTRL (controlled-switch), HB (heartbeat period), last-report status.

KeyAction
Up / DownPick a row
FunctionEnter / leave adjust mode
Left / RightWhile adjusting: CTRL row toggles ON/OFF; HB row cycles OFF→1S→5S→10S
EnterWhile adjusting, on the HELLO row: broadcast HELLO (sent → SENT, not sent within 2 s → FAIL)

In PASS (transparent) mode the page still opens, but HELLO sends nothing and shows FAIL after ~2 s — expected, not a fault.

Page 0D — Neighbors​

Online network devices (B=broadcast / P=peer) with their latest reported value. Up / Down scroll.

Page 0E — Monitor​

Read-only. Last 5 frames, newest first (type / source / first byte).

Page 0F — Statistics​

Read-only. RX counters, own MADDR, role.

Page 10 — ENV cfg​

Reserved.

Page 15 — Clock adjust​

KeyAction
EnterInvoke adjust (cursor at year); press again to commit and exit
Left / RightSwitch field: year→month→day→hour→minute→second
Up / DownCurrent field ±1
BackDiscard changes

Leaving the page discards uncommitted changes.

Page 16 — Test​

Self-test screen, no key operations.

Page 20 – 2F — Internal registers (16 pages)​

Read-only register viewing, 16 per page: Page 20 = 0x00–0x0F … Page 2F = 0xF0–0xFF. Press Function once to enter run-control mode (§6).

Page 30 – 31 — File names​

Read-only list of all archive slot names. Renaming is done from Page 06.

5. Program page in depth: browsing & editing​

The OLED shows 4 program lines at a time; the header shows the current file name and [pc]<.

Browsing

KeysEffect
Up / DownScroll ±4 lines
hold Back + Up/DownScroll ±128 lines
Left / RightScroll ±16 lines
Function+Up / Function+DownJump to first / last line
Function+Left / Function+RightScroll ±64 lines
hold Back ≥ 400 msView follows the program counter (PC)

Editing — press Enter on any line. Three stages:

  1. Pick line — Up/Down ±1 line; hold Enter + Up/Down = ±32; hold Back + Up/Down = ±128. Enter or Right confirms the line; Back/Function aborts back to browsing.
  2. Pick field — a program line is inst + P00 + P01 + P10 + P11 (5 bytes). Left/Right moves between fields; hold Back + Left/Right jumps to first/last field.
  3. Change value — Up/Down ±1 (wraps 0↔255); hold Enter for ×16 speed. Function toggles byte / nibble granularity (nibble = one hex digit). Left+Right together zeroes the current field. Enter writes the line back; Back discards.
tip

Nibble mode is handy for opcode entry straight from the instruction set: each hex digit of inst P-0 P-1 is its own cursor position.

6. Run control & step debugging​

Press Function once on the program page (or any register page 0x20–0x2C) to enter run-control mode — the top-bar icons invert as a hint. The keys become a debugger:

KeyAction
RightRun / pause toggle (STOP→RUN; RUN→pause in step mode)
LeftStop and reset PC to line 000
EnterExecute one line (single-step, only while paused)
FunctionLeave run-control mode

Up/Down/Back do nothing in this mode. This is what course slides call 单步调试 (step debugging) — pause with Right, then walk line by line with Enter, watching registers and outputs change.

Remote equivalent

Over the air the same debugger is control-frame opcode 0x07 RUN_CTRL (run / stop / step / n / jump / b) — see the STARNET documents.

7. Startup key combinations​

Hold keys while powering on:

Held at power-onEnters
(none)Normal startup
Left + RightServo action mode (PCA9685 16-ch PWM)
BackENV mode — UART2 handed to the AS32 radio at 9600-8-N-1, screen shows a blinking @
(preset combos)Start a preset archive directly — each archive binds one function and one device ID
caution

Link mode is chosen once at power-on; switching modes always means a reboot.

8. Course-term cheat sheet​

Slides sayDo this
单步调试§6 — Function, pause with Right, walk with Enter
翻页Left+Right together
下载/载入范例Page 0A examples
改程序§5 editing flow
点名Page 0C → Function to adjust → Enter sends HELLO, watch Page 0D