How the olympus mr100/500 remote works
Remote Connector Pinout
Pin |
Wire Color (visible inside remote) |
Name |
Direction (from device's perspective) |
Description |
1 |
Brown |
GNDA |
- |
Audio ground (connects directly to ground of headphone jack) |
2 |
Pink |
RESET |
In |
Reset signal (active high, note that the device only resets after RESET has been held high for about 1 second) |
3, 4 |
Bright pink, Red |
- |
Out |
Audio signals (stereo, connect directly to corresponding pins in headphone jack) |
5 |
Green |
GNDD |
- |
Data ground |
6 |
Blue |
UARTRX |
In |
UART Receive (from device's perspective, i.e. data sent from remote to device), works at roughly 19200 baud, 0 to +3.3V |
7 |
Grey |
UARTTX |
Out |
UART Transmit (from device's perspective, i.e. data sent from device to remote), works at roughly 19200 baud, 0 to +3.3V |
8 |
Yellow |
VCC |
- |
Supply for remote (roughly +3.3V) |
Rebooting
There is a hardware key combination (on the remote) that asserts RESET regardless of its state (especially useful when it's crashed or not running stock firmware):
Hold Heart + Mode + Play for about 2 seconds to reset the device.
Remote Control Protocol
The remote control of the m:robe provides user input to the device through a series of buttons (Mode, Play, Next, etc.) and displays information about the state of the device through an LCD screen (graphic area for various uses, battery status, etc.). This page describes the serial protocol between the remote control and the device.
At the physical level, the protocol is asynchronous and serial (UART) operating at +3.3V and 19200 baud.
The LCD has both a graphic area (79x16 pixels) and custom masks (for the play mode and battery status).
Power Up
Immediately after being powered, the remote is in sleep mode. The remote does not accept commands in sleep mode. To wake it up:
* Send something (anything; it can even be a single byte or a complete command).
* Wait about 10 ms for the remote to power up.
* The remote is now ready to accept commands. If you sent a command to wake it up, your command will not be replied.
Typically, a 30h frame is sent periodically to wake up a hotplugged remote as well as poll key state.
Framing
In both directions, data is encapsulated in frames composed of an opcode byte, the payload and two checksum fields:
Field |
Length |
Description |
opcode |
1 byte |
see below |
payload |
depends |
depends |
XOR checksum |
1 byte |
XOR of the opcode and all payload bytes |
Additive checksum |
1 byte |
8-bit sum of the opcode and all payload bytes |
Opcodes
Remote to Mrobe
The only information reported by the remote to the m:robe is key presses. There is only one opcode for this; its payload indicates the current state of the keys. This opcode is send as a reply to every m:robe to remote command.
Opcode(hex) |
payload |
function |
comment |
0xF0 |
xx yy |
key status |
sent as a reply to every remote command |
Opcode 0xF0 - key status
xx is a bit field representing the currently pressed keys
Bit |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
Key |
Heart |
Mode |
Vol- |
Vol+ |
Left |
Right |
Down |
Up |
yy is a bit field representing the currently pressed keys
Bit |
7 |
6-0 |
Key |
Hold |
Unknown/Unusued |
Mrobe to remote
The m:robe can control the remote in many ways, including turning the LCD on/off, turning the backlight on/off, drawing on the graphic area of the LCD and turning the masks (mode, battery status, etc.) on/off. All these opcodes are replied by the 0xF0 opcode. In other words, all these commands return the current key state.
Opcode(hex) |
payload |
function |
comment |
0x11 |
0x30 |
nop? |
Sent roughly ever 50 ms during normal operation. This seems to be a no-op used to poll the key state. |
0x31 |
ff gg |
LCD Control |
En/Disable the LCD, backlight and sets LCD contrast |
0x41 |
xx |
Mask Control |
En/Disable the custom masks |
0x51 |
ff ll x1 y1 x2 y2 d1 ... dn |
Graphic Draw |
Draws on the graphic area of the LCD |
0x71 |
0x30 |
Sleep |
Puts the remote back into very low power sleep mode |
Opcode 0x31 - LCD Control
ff is a bitfield representing various LCD control functions
Bit |
7 |
6 |
5-0 |
Key |
LCD on/off |
Backlight on/off |
Unknown/Unusued |
gg is an integer between 0 and 15 (inclusive) that sets the LCD contrast
Opcode 0x41 - LCD Masks
xx is a bitfield for the LCD masks
Bit |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
Key |
Batt Bar 1 |
Batt Bar 2 |
Batt Bar 3 |
Batt Case |
RANDOM |
Arrow (around the "1") |
"1" |
Unknown |
Unusued |
Opcode 0x51 - Graphic Draw
ff is a bitfield representing flags that control the draw operation
Bit |
7 |
6-0 |
Key |
Immediate Update |
Unknown/Unusued |
If the
Immediate update bit is set, the draw occurs directly on the LCD. Otherwise, the data is stored in an off-screen buffer and displayed the next time a draw operation is executed with this flag set.
ll is the number of data bytes ("dd" bytes). This opcode may carry at most 79 bytes (one half-screen worth of data).
x1, y1 is the upper-left corner where the given data is to be drawn. x2, y2 is the lower-left corner. The x coordinates are in pixels, with 0 being at the far left of the screen. The y coordinates must be 0, 8 or 16, which represent the top of the screen, halfway down and the bottom edge of the screen, respectively.
d1 .. dn are data bytes representing the pixels to be drawn on the screen. The first byte represents the leftmost column of 8 pixels in the rectangle given by (x1, y1) - (x2, y2). The second byte represents the second column, etc.
This opcode requires at least 20 ms to complete its operation. Do not send this opcode more often than that.
Opcode 0x71 - Sleep
This opcode puts the remote back to sleep, like it was immediately at power-up. It draws very little current in this mode (30μa at 5V) but does not respond to any commands, so key status cannot be polled. See Power Up for information on waking the remote up from sleep mode.
Copyright © by the contributing authors.