Swiss Micros Tools
I built swiss_micros_tools because I was tired of keeping a serial terminal open just to poke a SwissMicros calculator. The USB console is a perfectly good protocol; it should not need a human sitting in the middle. The three chores that matter to me are setting the clock and moving memory both ways.
| Tool | Status | Purpose |
|---|---|---|
| dm_set_time | available | I set the calculator clock second-precise from the host. |
| dm_receive | planned | I will pull a memory dump without copy-and-paste. |
| dm_send | planned | I will push a memory dump without a terminal session. |
Everything is Ada 2022 with AdaCL. I run the same binaries on macOS, Linux, and Windows. The generated reference lives at GNATdoc.
Get started #
Install the same way as the sibling HP-41CX suite (just replace hp41cx-tools with swiss-micros-tools:
Then I do this:
- Connect the USB cable.
- On the calculator, enter SERIAL CONSOLE mode.
- Find the device (Unix path or Windows name). The POSIX helpers
dm-get-serial-device.sh/dm-get-serial-port.shdo this for a DM16L / CP2102N. - Run a tool with
-d/--device, or exportDM_SERIAL_DEVICE. - Use
-?/--helpwhen I am stuck.
-d Device --device=Device device file (unix) or name (windows)
of the USB serial device.
DM_SERIAL_DEVICE= set via environment variable
-? --help this help
export DM_SERIAL_DEVICE="$(dm-get-serial-device.sh)"
dm_set_time-main
# or, with an explicit stamp and UTC:
dm_set_time-main -d /dev/tty.usbserial-0001 --utc "20260917 150000"
The compact stamp dm_set_time sends is eight digits, a space, six digits (YYYYMMDD HHMMSS). That is not the line
t prints back (2026-09-22 18:09:26 TUE). Omit the stamp and the application will use the host clock.
Two notes I actually want you to open #
This page is the workshop door. The two essays behind it are the bench.
I start with the shared library because every later tool hangs off the same UART dialect and the same GetOpt spine.
Then I walk you though the one programme that already ships: how I accept an optional time stamp, how Spitbol checks the correct format, and
the four lines I send once the port is open (ct 1, ts, t, and a blank wake-up).
| Note | Why I wrote it |
|---|---|
| The swiss_micros packages | I keep calculator literals in Console_IO and flags in a hierarchical GetOpt type. Read this before you copy a constant. |
| The dm_set_time packages | I extend that type, check YYYYMMDD HHMMSS, and run the ct / ts / t dialogue. This is the working specimen. |