Skip to content

Instantly share code, notes, and snippets.

@psmay
Last active December 22, 2015 10:59
Show Gist options
  • Save psmay/6462577 to your computer and use it in GitHub Desktop.
Save psmay/6462577 to your computer and use it in GitHub Desktop.
Ideas for piculear serial protocol

Limbo

When the programmer is first turned on, it is in Limbo mode. This mode provides commands to switch to all of the other modes of the programmer. Additionally, it is specified such that the firmware may optionally implement human-enterable commands in the same mode. Host software should not assume the presence of such commands, but if provided they are available via serial monitor for testing purposes.

Each command in Limbo mode must be entered at the beginning of a line. Entry into Limbo mode marks the beginning of a line, as does any byte 0x0A (\n) or 0x0D (\r).

Minimal command set supported:

  • ``: Empty command (\n or `\r` at beginning of line). These are no-ops and the programmer does not reply.
  • \x1BMe\n: Switch to extended mode. The programmer replies ok\n\n before switching.
  • \x1BM4\n: Switch to direct-4 mode. The programmer replies ok\n\n before switching.
  • \x1BM6\n: Switch to direct-6 mode. The programmer replies ok\n\n before switching.

In general, the programmer accepts commands a line at a time. If the command is not recognized, the programmer must wait until the line is terminated (with \n or \r) and then respond ??\n\n,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment