Image

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.

About the Author

William G. Wong | Senior Content Director - Electronic Design and Microwaves & RF

I am Editor of Electronic Design focusing on embedded, software, and systems. As Senior Content Director, I also manage Microwaves & RF and I work with a great team of editors to provide engineers, programmers, developers and technical managers with interesting and useful articles and videos on a regular basis. Check out our free newsletters to see the latest content.

You can send press releases for new products for possible coverage on the website. I am also interested in receiving contributed articles for publishing on our website. Use our template and send to me along with a signed release form. 

Check out my blog, AltEmbedded on Electronic Design, as well as his latest articles on this site that are listed below. 

You can visit my social media via these links:

I earned a Bachelor of Electrical Engineering at the Georgia Institute of Technology and a Masters in Computer Science from Rutgers University. I still do a bit of programming using everything from C and C++ to Rust and Ada/SPARK. I do a bit of PHP programming for Drupal websites. I have posted a few Drupal modules.  

I still get a hand on software and electronic hardware. Some of this can be found on our Kit Close-Up video series. You can also see me on many of our TechXchange Talk videos. I am interested in a range of projects from robotics to artificial intelligence. 

Sponsored Recommendations

Comments

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