RCX

From Brickwiki
Jump to: navigation, search
Rcx.jpg

The RCX is a programmable brick that can operate three motors, sample three sensors, and an infrared communications interface. It is the foundation of the LEGO Mindstorms System, the Robotics Invention System, and other programmable LEGO devices. There are three versions of the RCX, which were distributed with the appropriate version of Robotics Invention System: 1.0, 1.5, and 2.0.

Contents

Internals

The heart of the RCX is a Hitachi H8 microcontroller with 32K of RAM, running at 16MHz. The controller can control three motors, three sensors, and infrared communications. The chip also contains 16K of ROM to hold control software and other firmware. There are 512 bytes of RAM onboard, 3 timers, and 43 general purpose I/O pins. Eight 8-bit analogue-to-digital converters are available to read values from analogue sensors. [1]

BrickShelf has a few circuit diagrams of the RCX internals, reverse-engineered by Mark Bellis. They include the IR Tower, Voltage Regulation, IR Tx and Rx and Sensor Port circuits for RCX 1.0. RCX 1.5 and 2.0 do not have the same voltage regulation circuit but the other circuits are the same.

It is notable that the v1.0 hardware has a superior voltage regulation circuit, and can be identified by its large power-plug for a 9-12 V power source. It is the only RCX version that supports the use of an external power supply.

Programming

Programs for the RCX are normally written on a computer, using software provided with the RCX, such as RoboLAB. The programs are then downloaded and executed on the RCX. It is also possible for users to use freely-available toolkits, such as NQC to program the RCX in variants of C or Java. In addition to the program/download paradigm, there are other ways to control the RCX, including direct-control programs for computers.

The RCX normally connects to a PC via a null-modem RS232 cable and uses a custom communications format. Modern RCXes can also connect to PCs via USB ports; using USB often requires updates to earlier toolkits for compatibility. There is no 64-bit driver for the RCX USB tower, so it will not work directly with 64-bit Windows operating systems. It has been reported to work using a virtual machine on 64-bit Windows 7.[2] ALittleSlow reports that the USB tower works in Windows XP hosted using VMWare Player 6.03 on Windows 8.1.

Windows 95/98/ME and 2000/XP users can communicate with the RCX using a library provided by the LEGO Group called Spirit.ocx. Spirit.ocx has been documented and a volume of example code is available.

RCX stands for RoboticCommandExplorer, according to LEGO; however, this may be a backronym - when the RCX was released, the letters were believed to stand for nothing.

Firmware

In addition to the official firmware provided by LEGO (which also comes in versions 1.0, 1.5, and 2.0), fans have written alternate firmwares, such as brickOS, pbFORTH, and leJOS.

Newer revisions of the firmware are backwards-compatible with older bricks. This means that firmware v2.0 will work on an 1.0 RCX.

Citations

[1] Kekoa Proudfoot. RCX Internals, [1], 1999

[2] steveputz. "LEGO USB Tower", [2], 2014

Personal tools