LEGO® MINDSTORMS® robotics set is a full featured embedded platform based on Atmel AT91SAM256
microcontroller. This tutorial will show how to develop native applications with HBBR Basic v2.000 for the NXT programmable brick. Native applications offer complete control over the platform opening up new possibilities for any robot hacker. This tutorial can also be used as an introduction to embedded programming of ARM based microcontrollers.
NXT programmable brick is a fairly complex multi CPU embedded system with graphical LCD and keypad. It supports USB and Bluethooh interfaces as well as number of sensors and peripherals that can be attached to the controller using GPIO, I2C or even RS485.
Documentation
As with any complex system it is crucial to have good understanding of the underlying hardware. Luckily there is no need for reverse engineering the platform as LEGO has published complete documentation. All the reference information that can be found on LEGO Mindstorms NXTtreme page here:
http://mindstorms.lego.com/Overview/NXTreme.aspx
Of particular interest is the Hardware Developer Kit (HDK)
After downloading and unziping Hardware Developer Kit (HDK) following files can be found in
“LEGO MINDSTORMS NXT Hardware Developer Kit” directory
“LEGO MINDSTORMS NXT Hardware Developer Kit.pdf” – main document with hardware specification
“Appendix 1-LEGO MINDSTORMS NXT hardware schematic.pdf” - main schematic showing controller and major blocks
“Appendix 2-LEGO MINDSTORMS NXT Keypad schematic.pdf” - detailed keypad schematic
“Appendix 3-LEGO MINDSTORMS NXT Light Sensor hardware schematic.pdf”
“Appendix 4-LEGO MINDSTORMS NXT Sound Sensor hardware schematic.pdf”
“Appendix 5-LEGO MINDSTORMS NXT Touch Sensor hardware schematic.pdf”
“Appendix 6-LEGO MINDSTORMS NXT Ultrasonic Sensor hardware schematic.pdf”
“Appendix 7-LEGO MINDSTORMS NXT Ultrasonic Sensor I2C communication protocol.pdf”
“Appendix 8-LEGO MINDSTORMS NXT ARM7 Bluetooth Interface specification.pdf” - detailed specification of the Bluetooth inerface and communication
Bluetooth Developer Kit (BDK) is also relevant and can be download from:
http://mindstorms.lego.com/Overview/NXTreme.aspx
Diagram below shows major components of the programmable NXT brick and connections between them.






