PICDUINO - a PIC Arduino
by Lithium-ion in Circuits > Microcontrollers
65 Views, 2 Favorites, 0 Comments
PICDUINO - a PIC Arduino

This is part 2 of out PIC getting started series, Today we will see a hardware setup of a PIC, easy to program, a development board.
Supplies

Components Required:
- PIC18F2550
- USB TYPE C
- DIODE M7
- 20MHz
- 22pf, 100nF capacitor 0603
- AMS1117 3.3V and 5V
- 1K, 10K resistor 0603
- Reset button
- 12V jack
- Pin Headers
Story:


In the previous articles, I have shown some really good Arduino compatible projects. Because it is open source and has a huge supporting community some fan based nodes are available. These are basically the libraries made by people to use other microcontrollers such as STM, PIC, NUVOTON, WCH and ESP with Arduino IDE. I previously designed an INTEL 8051 based Arduino fan board and now it is the time for a new one. The full project can be found here on a GITHUB repository.
Any PIC microcontroller can be directly programmed by PIC kit, but some of them support USB, so we can burn the USB bootloader in the chip and can program it via USB serial port. For burning this bootloader in the chip we need a PIC kit and proper bootloader file, because this is so messy. In this tutorial we are only covering the hardware part, designing a PIC182550 based board in the form factor of an Arduino Uno. This project already exists as pinguino, on the web. But I was unable to find any instructions for the programming section, as pinguino is down for some reason. The programming instructions for the same can be seen in the next article.
- Programming the chip with USB
- Programming the PICDUINO with pinguino software
This PIC series is sponsored by PCBWAY, China based PCB manufacturer having 10 years of experience in working with PCB related products. PCBWAY is a one stop solution to all your prototyping requirements including SMT assembly, Stencil, 3d printing and metal CNC.
Why PIC18F2550:

The PIC18F2550 is a high-performance 8-bit microcontroller from Microchip Technology, known for its built-in Full-Speed USB 2.0 support. It's part of the PIC18 family, designed for applications needing robust features and USB connectivity.
Key Features:
- CPU: 8-bit PIC18 core with hardware multiplier
- Operating Frequency: Up to 48 MHz (via PLL)
- Program Memory: 32 KB Flash
- RAM: 2 KB
- EEPROM: 256 bytes
- I/O Pins: 24 (out of 28 pins total)
Peripherals:
- Timers: 1× 8-bit Timer, 3× 16-bit Timers
- USB 2.0 Full-Speed (12 Mbps): On-chip USB transceiver
- USART: 1 (for serial communication)
- SPI / I²C: Both available
- Analog-to-Digital Converter (ADC): 10-bit, 10 channels
- Comparator Modules: 2
Circuit Diagram:

I am hoping to design a minimal board, overall a system that is compatible with Arduino UNO. And for this I choose two linear voltage regulators, a USB type C port for power and programming purposes, and the same compatible headers to ARDUINO UNO. I have added a header for programming through the PIC kit directly. The circuit diagram shown above and sectioned properly. 12V connector for the external adaptor power.
Crystal oscillator with loading capacitors, it supports a maximum of 20MHz clock and the loading capacitors can be calculated based on tracks and springs. As said earlier this project already exists, but I have added some other options in my version. The main thing is not to provide hardware support but to provide proper instructions from starting (hardware level) to programming with pinguino software. The configuration of headers, onboard leds can be seen in the circuit diagram.
PCB Layout:


The PCB layout turned out to be the same as the Arduino’s one. The chip at the centre, oscillator nearby it. Some decoupling capacitors. The power section at the front end with all capacitors, led’s and power indicator at the top right. 12V jack and USB for power and programming, with ICSP at the same place.
I have used PCBWAY for PCB fabrication, one of the most reliable and trustworthy services. It is easy to place an order and I am amazed by the quality. It is better than other manufacturers at the same price point. PCBWAY also offers services related to PCBA and stencil, sign-up using this link and get free PCB coupons for your first PCB order.
Assembly Process:


After ordering the PCBs I assembled in my lab under a microscope, USB type C is one of the most difficult task to solder with hands. If you do not want to mess with such things, you can try PCB assembly services from PCBWAY. I gathered all my components at one place and soldered them one by one, starting from the SMD ones to DIP and pin headers. It took me around 1 hour.
Uploading the HEX File With PIC Kit:


I Have made the hex file, in the previous getting started tutorial which is basically a blink program. I connected the IC with onboard headers with PIC KIT and wrote this file to memory and here is the result of that. It is working properly, just for testing purposes. There are 2 more methods to program the same, have discussed in the next blogs can be seen through the links here:
Programming the chip with USB
Programming the PICDUINO with pinguino software
The board is in working condition, I have tested all the GPIOs and power sections. The files can be downloaded from GITHUB. Let’s do the programming in part 3. Visit PCBWAY to know more about its services.