AT91SAM7S256 aka the NXT Brain

The Lego MindStorms NXT Brick is controlled by a pair of Atmel microcontrollers:

The AT91SAM7S256 is part of an Atmel series of low pin-count Flash microcontrollers based on the 32-bit ARM7DMI ARM Thumb RISC processor. It features:

  • a maximum clock speed of 55 MHz (48 MHz in the NXT)
  • 64 KB of high-speed on-chip SRAM
  • 256 KB of integrated high-speed Flash memory
  • 11 peripheral DMA channels
  • 1 USB 2.0 (12 MB/s) device port
  • three 16-bit timers
  • four PWM controllers
  • 32 I/O pins
  • and requires a 3.0- to 3.6-volt power supply

The key facts here are:

  • The RISC–reduced instruction set architecture–is based on ARMv4T Von Neumann architecture. The ARM7DMI processor provides 0.9 MIPS (millions of instructions per second).
  • ARM–32-bit instruction set
  • Thumb–critical subset of the ARM 32-bit instruction set that has been encoded into a 16-bit instruction set
  • Flash memory–can be programmed in-system via the JTAG-ICE interface or through a parallel interface on a production programmer prior to mounting

The ARM7DML can execute both the high-performance 320bit ARM and high-density 16-bit Thumb instruction sets. The instruction sets are toggled by the processor as an ARM state or a Thumb state. In the ARM state, the 32-bit instructions are executed conditionally, while the 16-bit Thumb state instructions are a re-encoded subset of the ARM instruction set. The stegosaurus had a brain in its arse, and basically so does the NXT Brick. The AVR 8-bit ATmega48 microcontroller acts as a co-processor. Inside it there are:

  • 4 KB reprogrammable Flash program memory
  • 512 Byte SRAM
  • 256 Byte EEPROM
  • 8-channel, 10-bit AéD converter (TQGPéMLF)
  • 23 I/O pins
  • 4 MHz clock speed

Here’s the interesting thing. The ATmega48 is much smaller than the main AT91SAM7S256 processor, but this 8-bit microprocessor achieves almost 1 MIPS per MHz by executing its RISC instruction set in a single clock cycle.

Share