Archive for March 2009

Testing the PIC32 I/O Speed

In the last several months I have seen a couple of postings on the PIC32 forum about users testing the speed of the PIC32 I/O. It is quite normal and healthy for a community of Embedded Control designers to worry about the actual I/O performance of a microcontroller, and even more so when the microcontroller in question claims to be able to operate all its peripherals (I/O pins included) at the same (top) speed of the core: 80MHz!

With such capability and thanks to the special Atomic I/O operations (PORTINV), the theory says that a PIC32 could produce a 40MHz output square wave!

This performance is quite unique among competing microcontrollers (they typically achieve 1/2 the processor top speed), but we have to admit it can be tricky to prove. Here is what I recommend you do to get as close to the theoretical limit as possible… Read the rest of this entry »

UNISON - A POSIX compliant RTOS for the PIC32

Recently I get a lot of questions about Linux on the PIC32….

No, Linux is not available. The main problem is the lack of a true MMU (Memory Management Unit, the PIC32 has only an FMT, fixed mapping table), and most importantly there is not enough memory. Even the tiniest of the tiny (micro/nano…) Linux kernels is 600k bytes compressed. Decompress it first in a couple of megabytes of RAM, than add a couple more to give it room to work, and … game over!

The good news is that most of the requests are coming from developers that are really interested in re-using Open Source code more than running a true Linux system in miniature. Besides, most of them are looking for real time operation, something Linux was never meant to deliver.

As I mentioned in the previous posts, the open source code re-use is actually the easy part, using the MPLAB C32 compiler (a derivative of the GNU gcc) we have inherited a solid GNU compatible set of C libraries. If the project you want to use does not require calls to the OS kernel, and most embedded code would not,  then 90% of the problem is already solved. Just download the project, include all the source files in MPLAB and hit F10 (Make).

But sometimes we need a little more help. Sometimes it would be really nice to have a complete RTOS, and a POSIX compliant one, so that we can re-use code that does rely on “some” Linux kernel calls. In those cases they tell me, you might want to take a look at UNISON from the guys at ROWEBOTS.

UNISON

The Unison SoC RTOS is available for the PIC32 providing a feature set based on Linux and POSIX in a tiny tiny space… Check it out and let me know!

|