The Arduino open-source electronics prototyping platform is based on flexible, easy-to-use hardware and software including Atmel’s 8-bit AVR ATMega. It has garnered a wide range of developers and vendors providing a plethora of boards, modules, and teaching materials.
Arduino also is popular in high schools and universities, as it’s a handy way to get started with embedded development. It has been used for many projects as well, from robotics to process control.
The platform comprises a range of board form factors like the Arduino Uno (Fig. 1), an augmented C/C++ programming environment, and an integrated development environment (IDE). Based on the open-source Processing platform, the IDE assumes a gcc-compatible compiler. The development tools run on Linux, Windows, and Mac OS.
An Arduino C/C++ application has a setup() and loop() function definition instead of main(), which is predefined to call setup() and repeatedly call loop(). The application also has access to the Arduino library, which includes common functions such as sin(), random(), and abs().
Basic I/O functions provide access to digital and analog peripherals. The standard Arduino environment provides single tasking support. Interrupts can be turned on and off for critical sections, but the main application has no interrupt handling support. Also, DuinOS is a project based on the FreeRTOS kernel. The challenge with the AVR platforms typically has been RAM limitations.
A simpler IDE, runtime, and programming environment is an advantage when learning about embedded design and programming. The hardware can be used with other development tools should features like a real-time operating system (RTOS) or interrupt routines be needed.
New Arduino Targets
Digilent has decided to add Microchip’s 80-MHz PIC32 processors to the Arduino mix. Other vendors have used processors other than an AVR, but they typically support the hardware form factor. In general, this isn’t too much of an issue since the Arduino runtime can be ported easily to other platforms.
Digilent and Microchip took the chipKit products a step further by integrating the runtime and IDE so they work with the $26.95 chipKit Uno32 and the larger $49.50 chipKit Max32 (Fig. 2).
These new platforms significantly boost processing power and storage. The MIPS32 M4K 32-bit cores include features like hardware multiply/divide support. The 32-register set has a shadow set for fast interrupt handling. Additionally, the chips have JTAG and trace support.
The Uno32’s PIC32MX-320F128 has 128 kbytes of flash and 16 kbytes of RAM. It also has 42 I/O pins. The Max32’s PIC32MX795F512 has 512 kbytes of flash, 128 kbytes of RAM, and USB, CAN, and Ethernet capabilities. The larger chip has 83 I/O pins. Both chips have a 16-channel, 1-Msample/s analog-to-digital converter (ADC).
The move to a PIC32 has other advantages as well, such as DMA support and a real-time clock. These features are beyond the scope of the original Arduino platform, but they are just a function call away. Digilent provides them in its runtime.
As with other Arduino boards, the chipKit platforms can be programmed using other tools including Microchip’s MPLAB X and the PICkit 3 programmer/debugger.
Arduino expansion boards, called shields, will work with these platforms with the exception of some that require 5 V. The Digilent boards run at 3.3 V. The Digilent board connectors provide a superset of interface pins for Arduino shields to expose the additional peripheral interfaces. Digilent and others will be providing shields that take advantage of these extended interfaces.
The 32-bit Arduino platforms are the next wave. Vendors like Leaflabs also provide 32-bit alternatives. The Leaflabs Maple board uses a 72-MHz 32-bit Arm Cortex M3 from STMicroelectronics with 128 Mbytes of flash. It will be interesting to see where operating-system support and future training materials go now that more memory and processing power are available.