In last post, Jaluino Cuckoo has been briefly exposed, at least this is what I have i mind... The idea is to "parasite" the Arduino and put an small board with a Microchip PIC microcontroller, instead off Atmel chip. Just like brood parasite cuckoo birds squat in other species nests.
Now it's time to actually see how Jaluino Cuckoo could map Arduino pins. That is, we need to define which PIC's pins are mapped with Arduino's pins. This is an important step, as Atmel and Microchip chips are quite different, with different features, so a 100% mapping is hard to have, if not impossible. In the end, this is about making good compromises.
In last post, PIC18F25K22 was chosen because it carries a lot of common features with Arduino, it has a lot of memory, runs fast, etc... Just to recall, Arduino provides:

Now let's see how 18F25K22 features are distributed amongst its pins:

There are several advantages using PIC18F25K22. It has 2 USART, 2 MSSP for SPI and I²C, independent ANSEL-like analog pins, some PWM pins can be multiplexed in fuse. This means there's a kind of flexibility while matching Arduino pins.
I started to match pin by features. Notations are A(p) for Arduino pin p, and J(p) for Jaluino pin p.
Phew...
Let's sum up this in the following table:
| . | Arduino | Jaluino Cuckoo | Comments |
| Power | VCC | Vdd | AVCC can also be mapped with Vdd |
| GNDleft | Vssleft | GND left/right can be inverted | |
| GNDright | Vssright | ||
| Misc | RESET/PC6 | MCLR/RE3 | |
| XTAL1/PB6 | OSC1/RA7 | XTAL can be inverted as needed | |
| XTAL2/PB7 | OSC2/RA6 | ||
| Serial | RX/PD0 | RX2/RB7 | |
| TX/PD1 | TX2/RB6 | ||
| SPI | SCK/PB5 | SCK1/RC3 | |
| MISO/PB4 | SDO1/RC5 | ||
| MOSI/PB3 | SDI1/RC4 | ||
| SS/PB2 | SS1/RA5 | ||
| I²C | SCL/PC5 | SCL2/RB1 | |
| SDA/PC4 | SDA2/RB2 | ||
| Interrupts | INT1/PD3 | INT0/RB0 | this is also PWM0 |
| PWM | PWM1/PD5 | CCP1/RC2 | |
| PWM2/PD6 | CCP2*/RC1 | multiplexed with CCP2*/RB3 (PWM5) | |
| PWM3/PB1 | CCP3*/RB5 | ||
| Digital I/O | PD4 | RC0 | these are the remaining ones... |
| PD7 | RC7 | ||
| PB0 | RC6 | ||
| INT0/PD2 | CCP2*/RB3 | ||
| Analog inputs | AN3/PC3 | AN11/RB4 | remaining ones... |
| AN2/PC2 | AN0/RA0 | ||
| AN1/PC1 | AN1/RA1 | ||
| AN0/PC0 | AN2/RA2 | ||
| AREF | Vref+/RA3 | ||
| Extra | PWM5/MOSI/PB3 PWM4/SS/PB2 | CCP5/RA4 | using jumper ? |
This diagram may sum up this even better:

Despite the great number of features brought by PIC18F25K22, we've lost a lot of them during this mapping:
Schematic, PCB design, tests, failures, iterate...
Contact Us | Terms of Use | Trademarks | Privacy Statement
Copyright © 2009 . All Rights Reserved.
Powered by Drupal and Drupal Theme created by vigilianty.