|
|
Wiki > Main > OlympusMRRemote (compare)
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Difference: OlympusMRRemote (r2 vs. r1)How the olympus mr100/500 remote works
Remote Control ProtocolThe 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 UpImmediately 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. FramingIn both directions, data is encapsulated in frames composed of an opcode byte, the payload and two checksum fields:
OpcodesRemote to MrobeThe 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 0xF0 - key statusxx is a bit field representing the currently pressed keys
yy is a bit field representing the currently pressed keys
Mrobe to remoteThe 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 0x31 - LCD Controlff is a bitfield representing various LCD control functions
gg is an integer between 0 and 15 (inclusive) that sets the LCD contrast Opcode 0x41 - LCD Masksxx is a bitfield for the LCD masks
Opcode 0x51 - Graphic Drawff is a bitfield representing flags that control the draw operation
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 - SleepThis 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. r3 - 12 Mar 2009 - 05:04:46 - KarlKurbjun
Revision r2 - 19 Mar 2008 - 14:51 - RobertKuklaRevision r1 - 03 Mar 2008 - 11:29 - JonathanGordon Copyright © by the contributing authors.
|