chipKIT® Development Platform

Inspired by Arduino™

MPLAB C30 librairies

Created Mon, 04 Jul 2011 20:12:17 +0000 by boutboutnico


boutboutnico

Mon, 04 Jul 2011 20:12:17 +0000

Hi all,

I just discover the Module chipKIT Max32 and it seems really powerful but before buying one I have two questions: 1- I read that this module is Arduino compatible, does it means that I have to use the Arduino language(pseudo C) or I can reuse my previous program for PIC18F to the PIC32 ?

2- Can I use MPLAB C18 or C30 libraries ?

Thanks a lot for your answer

boutboutnico


Mark

Mon, 04 Jul 2011 21:28:22 +0000

Hi all, 1- I read that this module is Arduino compatible, does it means that I have to use the Arduino language(pseudo C) or I can reuse my previous program for PIC18F to the PIC32 ? 2- Can I use MPLAB C18 or C30 libraries ? Thanks a lot for your answer boutboutnico

Answer 1: Arduino is NOT pseudo C, it is REAL C/C++, it uses a full gcc/g++ compiler. This is the case for both the ATMEL processor and now the PIC32 cpu. You also can use any version of MPLAB that supports pic32 or any other development environment that supports pic32. For example, I did all the early development of MPIDE with the command line gcc compiler and make

Answer 2; the C18 libraries are for the pic18 family of cpus, the C30 libraries for the pic24 cpus. There is also a C32 library which can be used.

SOME of Microchip libraries are cross cpu, but not normally.

Mark


boutboutnico

Tue, 05 Jul 2011 15:45:49 +0000

Thanks mark for the precise answers.

There is something that I don't understand with the arduino concept, I try to explain. On their web site they says "The microcontroller on the board is programmed using the Arduino programming language (based on Wiring)". So if it is real C/C++ why do they change the name or do they have their own language ?


Mark

Thu, 07 Jul 2011 01:51:02 +0000

boutboutnico

It is real C/C++, that is one of the things that I have complained to Massimo about. The fact that the web page implies that it is NOT C.

Wiring was a project that was done before Arduino, it is the exact same concept and pretty much the same interface.

The reason why they say this is the "Processing" environment is something that artists know about and use. They make it feel "comfortable" for artists, thats why programs are called "sketches"

They make it VERY confusing but it really really really is straight C/C++. It runs gcc. Hold down the shift key and click VERIFY (the far left button) you will see ALL of the gcc steps.

Mark


KM6VV

Thu, 07 Jul 2011 18:24:41 +0000

Same feelings/aggravations here!

What is the actual functionality of Wiring or Processing? Does it constitute the IDE perhaps?

I did get that it adds the "pin I/O" functionality (a HAL), but is it (are they) any more then some library functions. What other functions?

Why do artists know about "Processing"?

Just curious.

Alan KM6VV


Trev

Thu, 07 Jul 2011 23:13:12 +0000

Same feelings/aggravations here! What is the actual functionality of Wiring or Processing? Does it constitute the IDE perhaps?
I did get that it adds the "pin I/O" functionality (a HAL), but is it (are they) any more then some library functions. What other functions? Why do artists know about "Processing"?

See: http://en.wikipedia.org/wiki/Processing_(programming_language)


Mr_Fixit

Fri, 08 Jul 2011 01:06:23 +0000

boutboutnico:

I followed pretty much the same path you have in your research. The answers they gave here are very accurate. For the C/C++ question, that is also true, and I have been able to leverage much of my previous code on my Uno32. There are just a couple nuances you have to be aware of.

These boards are very new and DO have some issues. These issues appear to be software related. For example, Wire.h (Library for using I2C communications) only works partially, but not completely, and not at all in some development environments. Servo.h (For controlling servos) does not work at all. There are several other issues as well. They are working hard to resolve these, but progress is slow. I suggest you look through the Wire.h discussion thread for more information.

These problems are so extensive that "Compatibility" to anything Audrino related is simply false advertising until these issues get resolved. This has been a complete show stopper for me for the last month, and I am seriously considering sending my Uno32 back if they refund me or not. Yeah, thats a lot of frustration there. "Rapid Development" LMAO yeah...

As for the C/C++ support, the one thing I have found which is not typical of C or C++ is that you must #include any .h files in your Sketch that are included in any other .h file being used. I know this is confusing, but again, take a look at the Wire.h thread where this is discussed in more detail. Also be clear that this is NOT a problem with Chipkit, its an Arduino thing, which Chipkit inherited.

On the very positive side, once Chipkit gets these issues resolved, this is going to be a very fun and powerful platform to play with. I am just really irritated that they apparently did zero testing on this device before market release.