Arduino Shield Adapter for Firefly v2
Overview
The Arduino Shield Adapter for Firefly v2 is intended to allow all standard Arduino shields to be interfaced with the Papilio platform's Firefly v2 board. The adapter provides electrical and physical compatibility for Arduino shields to work with the Microchip PIC18 microcontroller on the Firefly v2. Software compatibility with existing Arduino sketches is also intended to a reasonable extent.
There are many advantages of using this Arduino Shield Adapter with Firefly v2:
- Offers an alternative microcontroller for use with Arduino platform
- Provides "home-ground" for PIC users to switch to native PIC coding if needed to exploit specific features
- High degree of hardware and software compatibility with the original Arduino board
- Works at higher clock speed (upto 48 MHz), generally more efficient than the original Arduino controller
- Provides a default CDC device (visible as a standard serial port on the PC) for applications that use serial communications
- Provides native USB interface to develop legacy-free multi-function device capable of full speed USB 2.0 (upto 12 Mbps) communications
- The "Peripheral Pin Select" feature of the onboard MCU offers much greater flexibility in I/O usage, enables user to route any peripheral to any physical pin
- The software framework can use the onboard LEDs and buttons available on Firefly v2 as Arduino I/Os
Design
Physical compatibility is achieved by superimposing the Arduino I/O footprint on the Firefly v2 header footprint. Mating connectors are to be soldered on either sides.
Bottom side of the adapter plugs into following Firefly v2 connectors:
- 16-bit mirrored Wing slots (socket headers)
- 6-pin PICKit2 interface (pin headers)
- 6-pin Analog header (pin headers)
Top side provides Arduino I/O headers which are usually socket headers, but can also be pin headers for some Arduino variants.
Following pictures show top and bottom sides of a fully assembled Arduino Shield adapter:
|

Adapter Top side
|

Adapter Bottom side
|
Note: Due to large number of pins (60 pins: 48 on Wing interface + 6-pin socket header on PICKit2 adapter and + 6-pin socket header Analog header), it is a bit difficult to put on the adapter. While we take every care to align the headers properly, they still need to be properly inserted. Best way is to insert each header a bit, ensure all the pins are aligned and slowly press each side a little bit till the connectors are engaged all the way. To remove the adapter board, simply pull out the board slowly, rocking it a bit on all sides till it easily slides out.
The same goes for inserting the Arduino shields, but there is no guarantee that the connectors will be properly aligned with the ones on shield adapter. It may take some more effort to put the Arduino shields on the adapter board.
The Arduino Shield adapter pin assignments with the Wing and Firefly v2 are as follows:
| Arduino Pin number |
Wing Pin number
|
Alternate Wing Pin number
|
Remappable Pin |
MCU Port pin |
| 0 |
A13 |
B2 |
RP10 |
RB7 |
| 1 |
A12 |
B3 |
RP9 |
RB6 |
| 2 |
A11 |
B4 |
RP8 |
RB5 |
| 3 |
A10 |
B5 |
RP7 |
RB4 |
| 4 |
A9 |
B6 |
RP6 |
RB3 |
| 5 |
A8 |
B7 |
RP5 |
RB2 |
| 6 |
A7 |
B8 |
RP4 |
RB1 |
| 7 |
A6 |
B9 |
RP3 |
R0 |
| 8 |
A5 |
B10 |
RP24 |
RD7 |
| 9 |
A4 |
B11 |
RP23 |
RD6 |
| 10 |
A0 |
B15 |
RP17 |
RC6 |
| 11 |
A1 |
B14 |
RP18 |
RC7 |
| 12 |
A2 |
B13 |
RP21 |
RD4 |
| 13 |
A3 |
B12 |
RP22 |
RD5 |
| 14 |
A15 |
B0 |
RP1 |
RA1/AN1 |
| 15 |
A14 |
B1 |
RP0 |
RA0/AN0 |
| 16 |
AIN3 |
AIN3 |
- |
RE0 AN5 |
| 17 |
AIN2 |
AIN2 |
- |
RA5/AN4 |
| 18 |
AIN1 |
AIN1 |
- |
RA3/ AN3 |
| 19 |
AIN0 |
AIN0 |
- |
RA2/ AN2 |
In addition to these pins, the Firefly v2 + Arduino shield adapter also offers following I/Os for Arduino:
| Arduino Pin number |
Firefly v2 function |
MCU Port pin |
| 100 |
LED1 |
RC2 |
| 101 |
SW1 |
RC1 |
| 102 |
LED2 |
RD0 |
| 103 |
SW2 |
RC0 |
| 104 |
LED3 |
RD1 |
| 105 |
SW3 |
RE2 |
| 106 |
LED4 |
RD2 |
| 107 |
SW4 |
RE1 |
The software library for Arduino shield adapter allows to use Arduino pin designations in user application thereby allowing existing Arduino sketches work without any modifications to main code. Only a couple of include files need to be changed.
A Firefly v2 board mounted with the Arduino Shield adapter:

The Arduino Motor shield mounted on the Firefly v2 + Arduino Shield adapter assembly:

Software
We are currently developing and testing the libraries for Firefly v2 board to maintain compatibility with existing Arduino sketches. They won't be usable with the Arduino IDE, but you will need the Microchip MPLAB IDE and Microchip C18 compiler to compiler the Arduino sketches. The sketches are not usable directly, but need some minor modifications to work with the Firefly v2 bootloader and Arduino compatible PIC18 libraries.
Current Status
The Arduino Shield Adapter for Firefly v2 PCB's have been built, tested and verified for functionality. These boards are currently available in India store. They will be available in world store shortly.
- Board Design - Complete
- Board Manufactured - Complete
- Board Assembled - Complete
- Preliminary Testing - In process
- Board completely Verified - Pending
- Board available in Store - Pending
| Time |
Activity Type |
By |
| No Activity Found in Date Range |
|