Pages: [1]   Go Down
Author Topic: ChipKit (UNO32) shield compatibility matrix  (Read 4679 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Faraday Member
**
Karma: 16
Posts: 2857
ruggedcircuits.com
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I've posted a comparison between the UNO32 ChipKit and the Arduino for the purposes of evaluating shield compatibility. Corrections welcome.

http://ruggedcircuits.com/misc/ArduinoChipKitPinMappings.ods
http://ruggedcircuits.com/misc/ArduinoChipKitPinMappings.pdf

Some impressions:
  • The amount of work that went into making the two compatible is obvious. Nice job, Microchip/Digilent/whoever.
  • All pins are 5V tolerant (this is a 3.3V processor) except for the analog pins (which includes the two TWI/I2C pins). These are made 5V tolerant through a 200 ohm series resistor on each pin and diode to 3.3V.
  • The biggest incompatibility is probably the lack of PWM on D11. Our Rugged Motor Driver and other motor driver shields expect PWM on this pin, but at least our shield can be cut/jumpered to use another pin. In any case, this is one to watch out for.
  • The ATmega328P can generate a pin-change interrupt on any pin, while the PIC32MX340 is limited to pin-change interrupts only on certain pins.
  • The UNO32 uses jumpers to select between certain pins. For example, you have to move jumpers to select TWI on pins D18/D19 or select analog inputs on those pins. A similar choice has to be made on pins D10-D12 to select SPI or PWM.
  • The analog comparator pins are not in the same place.

Software-wise, it looks like the Wire library has not been ported over to the PIC yet, the PROGMEM keyword is not recognized, and generally trying to compile our Beat707 for the UNO32 was not successful. But we are hopeful! Definitely the infrastructure is there and looks promising.

--
The Gadget Shield: accelerometer, RGB LED, IR transmit/receive, speaker, microphone, light sensor, potentiometer, pushbuttons
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 205
Posts: 12844
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


Thank for the evaluation.

Quote
But we are hopeful!

I'm curious to know why.  Is there something available from the UNO32 ChipKit that is not available from an Arduino?
Logged

0
Offline Offline
Faraday Member
**
Karma: 16
Posts: 2857
ruggedcircuits.com
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I'm curious to know why.  Is there something available from the UNO32 ChipKit that is not available from an Arduino?

A wider base of users (including PIC diehards who really don't want to try Arduinos because they use AVR's), faster processing speed, more FLASH, and more RAM.

--
The Aussie Shield: breakout all 28 pins to quick-connect terminals
Logged

Portugal
Offline Offline
God Member
*****
Karma: 6
Posts: 962
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, I'am using the pic-gcc in my classes but it was compiled from sources so we compile at -O2, and them compiler puts all constants in flash in the section .rodata, aka ReadOnly data, dont know about the compiler used in the IDE/what optimization it is using.
Logged

San Antonio, Texas
Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Don't know yet at what clock speed the PIC32MX is working but it is a faster MCU than the Atmel ones.

Logged

Jorge Amodio - LJCV Electronics, San Antonio, Texas
"If everything seems to be going well, you obviously overlooked something. Murphy's law

0
Offline Offline
Faraday Member
**
Karma: 16
Posts: 2857
ruggedcircuits.com
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

It looks like it is working at 80 MHz.

--
The Rugged Motor Driver: two H-bridges, more power than an L298, fully protected
Logged

Portugal
Offline Offline
God Member
*****
Karma: 6
Posts: 962
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

With an external 8Mhz crystal you can run it 40Mhz, 64Mhz, 80Mhz and some more speeds in between as it as a heap of PLLs dividers and multipliers.
Logged

USA
Offline Offline
Full Member
***
Karma: 2
Posts: 213
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

RuggedCircuits

I am the "whoever" in your post.

The SPI library was finished a day or 2 ago. It may still need some work, let me know.

I have fixed the "PROGMEM", just add this at the start of your program

   #define PROGMEM

I downloaded your Beat707 program. It has a lot of AVR specific code in it. Anything that bypasses the Arduino abstraction layer will have to be re-written.

I really like your compatibility chart. May I have permission to convert it to an html table and use it in our docs.

Let me know other things you find and I will get to them as soon as I can

Mark

Logged

0
Offline Offline
Faraday Member
**
Karma: 16
Posts: 2857
ruggedcircuits.com
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I really like your compatibility chart. May I have permission to convert it to an html table and use it in our docs.

Sure.

Quote
Let me know other things you find and I will get to them as soon as I can

Gotta wait for the hardware to arrive first smiley

Any plans on implementing the Wire library? We use that extensively.

--
The Quick Shield: breakout all 28 pins to quick-connect terminals
Logged

USA
Offline Offline
Full Member
***
Karma: 2
Posts: 213
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Any plans on implementing the Wire library? We use that extensively.

Yes, the wire library is almost done. It should be posted by the end of the week.

We are going to do ALL of the standard libraries. The normal ethernet "should" work when SPI is fully finished and tested. However, there will be another implementation of the ethernet library that uses the on board mac address implementation using the Microchip ethernet code. This will take a bit longer to finish.

Mark
Logged

New Zealand
Offline Offline
God Member
*****
Karma: 0
Posts: 999
Arduino pebbles
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

With an external 8Mhz crystal you can run it 40Mhz, 64Mhz, 80Mhz and some more speeds in between
How many clock cycles per instruction?
Logged

St. Leonards-on-Sea, E. Sussex, UK.
Offline Offline
Sr. Member
****
Karma: 2
Posts: 301
Ancient developer
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Most are single-cycle, including multiply.
Logged

Leon Heller
G1HSM

Portugal
Offline Offline
God Member
*****
Karma: 6
Posts: 962
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

And divide in two cylces.
Logged

0
Offline Offline
Faraday Member
**
Karma: 16
Posts: 2857
ruggedcircuits.com
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Nice followup to the compatibility issues from Gene Apperson, UNO32 hardware designer, on our blog:

http://ruggedcircuits.com/blog/2011/05/22/microchip-chipkit-and-arduino-pin-compatibility-analysis/

--
The Flexible MIDI Shield: MIDI IN/OUT, stacking headers, your choice of I/O pins
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 20
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

RuggedCircuits

I am the "whoever" in your post.

The SPI library was finished a day or 2 ago. It may still need some work, let me know.

I have fixed the "PROGMEM", just add this at the start of your program

   #define PROGMEM

I downloaded your Beat707 program. It has a lot of AVR specific code in it. Anything that bypasses the Arduino abstraction layer will have to be re-written.

I really like your compatibility chart. May I have permission to convert it to an html table and use it in our docs.

Let me know other things you find and I will get to them as soon as I can

Mark



Hi

The chipkit board does look pretty powerful. I just got mine. I am having issues with the SPI library. is there any good/better source of documentation on the jumpers and what not to be able to use the SPI. I have set J5 and J7 to master mode. and J4 to Digital I/O mode. when the code is running i tried scoping the SPI pins and I see nothing.

Thanks
Swalehm
Logged

Pages: [1]   Go Up
Jump to: