Amicus18: upgrading with PIC16F18855

0

A few days ago I was making some order in my parts inventory, and I stumbled upon an old development board that I purchased almost ten years ago, only to leave it to gather dust: the Amicus18 development board is an 8-bit PIC microcontroller development board, with Arduino Uno form factor.

This article is more than two years old and might contain obsolete information; it is still kept here for informational purposes.

Why haven’t I used it? Because this board has more flaws than advantages, and it has a very limited compatibility with existing Arduino shields.

However, with the new 8-bit PIC microcontroller that has PPS (Peripheral Pin Select) some of the issues of the Amicus18 board can be overcome, so upgrading to a PIC16F18855 makes sense. So, what do we gain from upgrading? We will see.

First, a quick look at the original Amicus 18 board:

Amicus18: preparing the PIC16F18855

Amicus18: preparing the PIC16F18855

The board comes initially with a PIC18F25K20 with 32kb FLASH, 1536 bytes SRAM and 256 bytes EEPROM, The clock source is an external 16MHz crystal. The microcontroller comes preprogrammed with a UART bootloader. Communication with the PC is achieved via USB, using one FT232RL USB-UART bridge.

Here we notice one of the major flaws of this board: the USB connector is of type A, same as the USB host. A special USB-A to USB-A cable must be used, and that cable is hard to find, and sometimes can cost two or three times more than a regular USB cable.

I have mentioned above the poor compatibility with USB shields. Let’s compare the pinout of the Amicus18 board and that of an Arduino Uno.

Amicus18 vs Arduino Uno pinout

Amicus18 vs. Arduino Uno pinout

The first thing we notice is that the makers of the Amicus18 have assigned the pins from each port in sequential order, without paying much attention to the layout of the Arduino Uno boards. While there’s a match for A/D pins and UART pins, SPI, I2C and PWM lines are in the wrong positions.

On Arduino Uno, pins A4 and A5 are also used for I2C communication. The PIC18F25K20 uses pins RC3 and RC4 for I2C, which will put the I2C lines on pins 2 and 3 of an Arduino Uno. Any shield that uses I2C communication will require some extensive hardware changes to work with the Amicus 18.

Same happens with shields using SPI. On the Uno, pins 11, 12, and 13 are used for SPI communication (some shields rely on using the pins from the ICSP programming connector). Amicus18 uses pins 3,4 and 5 for SPI.

The ATMEGA328P has six PWM pins, corresponding to pins 3, 5, 6, 9, 10 and 11 of the Arduino Uno board. Most 8-bit PIC microcontroller have only two PWM pins. Our PIC18F25K20 can be configured to use pins RC1 and RC2 as PWM. Thus we have a limited compatibility with some Arduino shields.

Overall, many disadvantages and limitations, and the use of the Amicus18 board with Arduino shields is severely restricted.

Upgrading to PIC16F18855

And now, let’s take a PIC16F18855 and put it instead of the PIC18F25K20. The two microcontrollers have the same pin layout, so the PIC16F18855 is a perfect, drop-in replacement.

PIC16F18855 and PIC18F25K20

PIC16F18855 and PIC18F25K20

As the PIC16F18855 can work with up to 5.5V power supply, it makes sense to modify the Amicus18 board to operate at 5V, same as the Arduino Uno. This is done by cutting a thin PCB trace and installing one solder bridge, just as in the pictures below:

 

That PCB trace is quite difficult to cut, and you can notice that I’ve managed to damage a nearby trace. It’s a quick fix, but it should stay as a warning for those who will attempt to switch to 5V.

Unless one plans to install a UART bootloader, it pays off to cut also the trace at the pad Q2. This will disconnect the internal reset for the microcontroller from the USB-UART chip. Thus, no unwanted resets when working with the serial communication. Programming can be done simply using one PICkit3 or any similar programmer.

Amicus 18: programming in XC8

Now comes the fun part: with the use of a microcontroller with Peripheral Pin Select help increase compatibility with Arduino shields?

I2C and SPI communication

Below is a screen capture from MCC (Microchip configurator) showing the possible choices for I2C and SPI pins.

Port A pins can’t be used for I2C communication, so one can’t use shields that need I2C communication with the Amicus18, so there’s no improvement here. As a side note, chipKIT boards use a pair of jumpers to overcome this issue, allowing to select either I2C or analog functions for A4 and A5.

On the other hand, we can reroute SPI pins to match the layout of the Arduino Uno, so we might be able to use some SPI-based shields. The issue here is that many (new) shields have started to use the pins from the ICSP connector, and that connector is missing on the Amicus 18.

I2C and SPI selectable pins

I2C and SPI selectable pins

PWM

Once again,  a screen capture from MCC (Microchip configurator) showing the possible choices for PWM pins.

PIC16F18855: PWM pins

PIC16F18855: PWM pins

Bad luck here: we can’t use the pins from PORTB as PWM pins. We can, however, use any of the pins from PORTC. Thus, only shields that use Arduino pins 3, 5 and 6 will work. Ardumoto won’t work unless we make some minor hardware changes. Zumo robot shield will work, also with some minor hardware changes. Overall, much better than the original PIC18F125K20, but still far from achieving full Arduino Uno compatibility.

Bottom line

Changing the PIC18F25K20 to a much newer PIC18F18855 brings some enhancement and improves the compatibility between the Amicus18 and Arduino Uno boards. Still, we’re far from having an 8-bit PIC development board in Arduino Uno form factor.

However, there’s much to learn from this board, and maybe, someday, someone will design a better PIC-based Arduino counterpart. Here’s what I would do:

  • I would replace the FT232RL chip with the same PIC based programmer/USB-UART bridge that we find on the Xpress board.
  • I would use a “normal” USB connector.
  • I would install a pair of jumpers to select between analog function or I2C function. Alternatively, I would mirror a pair of I2C capable pins in the same position as in the Uno rev.3 (after pin 13, GND and Aref).
  • I would install the ICSP connector, and route some SPI-capable pins to this connector.
  • I would try to bring PWM function to Arduino pins 9, 10 and 11 using some solder jumpers.

Until then, the Amicus 18 is the closest thing to a PIC-based Arduino compatible we can get.

Share.

Leave A Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

error: