1

I have an arduino setup with LCD, RTC, EEPROM, Reed Switch, AC/DC Buck Converter, 4X4 Keypad. What PIC IC will let me connect with all these(40 Pins), and yet accept Arduino Code. I don't want to rewrite the code. I learn Arduino only recently, So shifting to another coding language is near impossible, since am not a coder.

8
  • so, you go to an Arduino site to ask how to not use an Arduino? ... go to a Microsoft website and ask how to stop using Microsoft software ... see how they like your question – jsotola Aug 15 '20 at 1:57
  • voting to close because the question is not about an Arduino – jsotola Aug 15 '20 at 1:59
  • There is a pinguino project which allows you to program PIC MCUs on Arduino IDE like an Arduino. – hcheung Aug 15 '20 at 3:01
  • 2
    There are also many chipKit-based boards that can be run under the Arduino IDE environment. – hcheung Aug 15 '20 at 3:09
  • 2
    I am the head honcho for for current chipkit designs. It sounds like the MAX32 is what you want. Equivalent to the Mega. The uC32 may have enough pins too which is an uno equivalent. You should check them out. All PIC32 based. – Majenko Aug 15 '20 at 8:38
4

The PIC32 has full (or nearly full) support for the Arduino API through the chipKIT project. If you want to use one of the smaller PIC chips (PIC16 / PIC18 etc) then you're out of luck. There just isn't a freely available C++ compiler for those chips, so the Arduino API can never really be ported to them.

I have, in the past, cobbled together an Arduino-style API layer for a handful of selected PIC18s which uses structs to emulate a couple of the Arduino C++ objects, but it only worked in a very basic way with no function overloading for things like Serial.print().

One of the problems from a low-end user's perspective is that the PIC32 only comes in harder to use TQFP and QFN etc packages in anything larger than 28 pins. That means you can't breadboard without a development board. Fortunately there are some breadboard friendly options in the chipKIT ecosystem, such as the Fubarino series of boards. For more pins though you'd be wanting one of the bigger boards, such as the MAX32 which is in a Mega footprint (but with even more pins).

It's important to note though that the PIC32 is a 3.3V device and, owing to physical differences in the way that some of the internals work, there are incompatibilities in some of the libraries and functionality (such as no "LOW" or "CHANGE" interrupt support, only "RISING" and "FALLING").

-1

What PIC IC will let me connect with all these(40 Pins), and yet accept Arduino Code.

The answer is none.

The PIC world is different than the Arduino world. In the end the same things can be accomplished. But they are not directly compatible. Just like PCs/Microsoft compared to Apple. They are both computer systems. They both can do the same kind of things. But how it is done is different.

4
  • Is there any workaround!? – hindisong.cc Aug 15 '20 at 2:21
  • Nothing easy. The thing about Arduino is that it is easy to start with. All the headaches of setting up a project are taken care of for you. And there a lots of libraries for the Arduino and very few that are a direct port over to PIC. I am a hardware designer. I have designed products with PIC processors for 30 years. But 10 years ago when I wanted to do my own stuff at home I went for Arduino because doing the software was so much easier. Easier to get up and running.Take a look at teachmemicro.com/arduino-like-ide-for-pics – Rudy Aug 15 '20 at 2:28
  • About 6 months ago I did try to use a tiny PIC part. I used Atmel Studio. It wasn't too bad. I forget all the details now. But I do remember there was some way to take in Arduino code. But I don't think it was for a PIC processor. Although Atmel Studio does support AVR and PIC processors. microchip.com/mplab/avr-support/atmel-studio-7 – Rudy Aug 15 '20 at 2:39
  • Importing Arduino Sketches Into Atmel Studio 7 .. youtube.com/watch?v=7WnOe00dVu0 That video is a few years old but it is a start. Maybe they have something newer. – Rudy Aug 15 '20 at 2:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.