Electronicdesign 4660 Xl 63006 Tab

PIC32 Arduino Modules

May 27, 2011
Digilent delivers Arduino based on Microchip's 32-bit PIC32 for Technology Editor Bill Wong to test out.

chipKIT Uno32

chipKIT Max32

Arduino is a form factor, hardware platform and software development environment. Atmel's 8-bit AVR ATmega microcontroller is at the heart of the original Arduino prototyping system that has garnered support from a range of developers, vendors, and universities. There have been other microcontrollers placed in an Arduino form factor but Digilent's latest offering puts Microchip's 32-bit PIC32 microcontroller into the mix. That is significant but what is more significant is that the full Arduino development system is also supported.

I recently got my hands on Digilent's $26.95 chipKIT Uno32 (Fig. 1) and $49.50 chipKIT Max32 (Fig. 2). They come in tiny boxes that only contain the boards. I downloaded the software from Digilent's website. The Arduino Processing-based IDE supports Windows, Linux and MacOS. What Digilent and Microchip have done is to bring the Microchip's C compiler support to the IDE and the Arduino runtime.

For those unfamiliar with Arduino, the platform is designed for new developers, hobbyists and other casual developers. To simplify the system, Arduino provides a limited starting point for users. It uses C and provides a basic interface and support runtime library. Actually, the underlying system is a full C/C++ compiler so it is possible to use C++ code. The libraries provide functions like delay() and I/O functions that are typically used when introducing new programmers to embedded design.

Arduino also uses its own terms for peripheral expansion. Add-on boards are called "shields." They use headers with pass through pins so shields can be stacked. Some signals can be shared among shields like the I2C and Onewire port while others, like the analog inputs, will be dedicated to a particular board. This means many board combinations are supported but some would not be due to pin usage conflicts.

The Arduino standard utilize a single row of pins for its I/O. It includes analog inputs and digital I/O including SPI, PWM and serial port signals. Digilent uses a double row in some areas to provide access to the larger number of I/O pins available on the PIC32. I didn't have any shields handy but it is easy enough to wire up other devices including some servos I have in the lab.

Installing the software was easy and I had to find a USB cable. Just to highligh compatibility, the URLs for reference material and sample applications refer to the Arduino site.

Arduino's program framework hides C's main() function. Instead programs must have a setup() and loop() function definition. The first function is called once and the second repeatedly.

It was a trivial exercise to load, compile, download and run the sample Arduino applications. This is the key advantage of Digilent's approach. There is a significant amount of class materials, examples and support for Arduino. Most, although not all, will be directly usable with the chipKIT platforms.

The basic Arduino system is single tasking. There are a number of open source operating systems that have been configured for the ATMega target. One is DuinOS based on FreeRTOS. Most of these are written in C and would port over to the PIC32 but there are issues that will have to be addressed such as interrupt and timer support.

Hardware Functionality

The benifits that Digilent brings on the hardware side is significantly better performance, a larger address space and a lot more memory. The 80MHz 32-bit micro has 128 Kbytes (Uno32) or 512 Kbytes (Max32) of flash and 16 Kbytes or 128 Kbytes of SRAM. The PIC32 is also a significantly more power system that includes DMA and the Max32 adds USB 2.0 OTG, CAN and Etherent support. A shield with access to the Max32 ports will be available soon.

The hardware can be used with other development tools. This includes platforms like Eclipse as well as Microchip's new MPLAB X. The latter will have support specifically for these platforms in the near future. Utilizing the Arduino support using these tools is easy because it is simply standard C code.

Arduino developers looking for more performance will definitely benefit from these platforms. Many applications like robotics can benefit from the larger memory and higher performance. They are actually priced lower than some of the less powerful 8-bit alternatives.

Overall I am extremely impressed with the hardware and software. I have not worked with Arduino platforms before but I was able to use sample applications and training materials without modification. The AVR platforms that most Arduino users have had are more limited in terms of memory making multitasking a challenge. The Digilent platforms open significant possibilities for a starting point for new developers.

Sponsored Recommendations

TTI Transportation Resource Center

April 8, 2024
From sensors to vehicle electrification, from design to production, on-board and off-board a TTI Transportation Specialist will help you keep moving into the future. TTI has been...

Cornell Dubilier: Push EV Charging to Higher Productivity and Lower Recharge Times

April 8, 2024
Optimized for high efficiency power inverter/converter level 3 EV charging systems, CDE capacitors offer high capacitance values, low inductance (< 5 nH), high ripple current ...

TTI Hybrid & Electric Vehicles Line Card

April 8, 2024
Components for Infrastructure, Connectivity and On-board Systems TTI stocks the premier electrical components that hybrid and electric vehicle manufacturers and suppliers need...

Bourns: Automotive-Grade Components for the Rough Road Ahead

April 8, 2024
The electronics needed for transportation today is getting increasingly more demanding and sophisticated, requiring not only high quality components but those that interface well...


To join the conversation, and become an exclusive member of Electronic Design, create an account today!