What's New:

Saturday 23 July 2016

Know What You Are Buying; Arduino Vs. Microchip's PIC Micro

Author: Ogor Anumbor


If you are new to electronics/embedded-systems and micro-controllers and you want to navigate your way, this article is where you should start from. If you have got experience already and have friends new to this realm you can share the article with them as well.



First, I should say that I am an independent observer and writer, and am taking no sides with any of these technologies that I would mention below. It's nothing personal but just facts I would be stating. I am also assuming you love free or open-source software and low-cost technologies.

So in this article I make a comparison between Microchip Technology's 8-bit PICMicro micro-controllers and Arduino's 8-bit micro-controller board(s). Now the comparison between a board and a chip might not seem to be even, but I am doing that based on the availability and popularity of these parts in our Nigerian local electronic part stores and that must be noted.
 

The Versus

Your taste of preference would not be of one better over the other, but what defines the difference of choices that would be made betwixt using any of these platforms would be largely on the following: accessibility, cost, development tools, documentation, community support, and not functionality, because they pretty much achieve the same results when you use them.


About the company



I personally love Microchip's monthly generous offerings of five free chips of your choice - ranging from high-end 32-bit micro-controllers to low-end categories, with free shipping to your home or office address, anywhere you are in the world is nothing but beautiful. The 27 y/o company situated in Chandler-Arizona, US, has different products which include: micro-controllers, Serial EEPROMs, Serial SRAM, Analog ICs, etc., with employees of over 8000. They were reported to have shipped a total of 10 billion PIC micro-controllers so far in 2016. It is even over the internet that Microchip Technology is about to buy out a high-profile competitor, Atmel, for $3.56 billion, and deals are to be concluded 2nd Quarter of 2016. 

Atmel is an older company and a seller of the AVR micro-controller, and other popular micro-controllers available, and they are the maker’s of Arduino’s ATMEGA micro-controllers for the different Arduino board series.

Arduino company on the other hand incorporated in 2005, and as at last year has announced that more than 5-million copies of the Arduino board were in the hands of people all over the world. The name Arduino is Italian and comes from the name of a bar where the founders of the project used to meet. Wikipedia says Arduino is a hardware company that designs and manufactures open-source hardware, open-source software, and micro-controller-based kits for building digital devices and interactive objects that can perceive their environments and control physical devices.


Hardware features

Microchip PICMicro micro-controllers are not for kids, in fact I almost abandoned using the platform when I realized it, and interpreted it as a kind of setup from the company, and also for many others when we had received the free micro-controller samples. Although, that was what started me on my journey, my quest to understand embedded systems many years ago. Having gotten chips and ready, you would have to start building a device programmer circuit which you can easily find on the internet, and having a lot of patience you must be ready for flops from that unreliable programmer circuit when you might want to do some serious work.



In building a circuit with PIC Micro chip, you would need to setup your micro-controller first which is usually called your core circuit, that is, without this in place the PIC Micro chip will not even run.  

The core circuit requires two things; one, the external power terminals' +5V and GND wires need to be connected to the +5V and GND pins of your micro-controller. Two, connect the two lead wires of the crystal oscillator to the respective pins for the oscillator on the micro-controller. Two tantalum capacitors are needed for stabilizing the oscillator for a stable startup of the micro-controller when powered on. 

The choice of crystal oscillator value you will choose depends on the speed you want your circuit to run and if you will need your circuit to communicate (using inbuilt serial communication hardware if available) with some other computer or micro-controller.  A datasheet will be required to know the crystal oscillator value for the different serial communication speeds so as not to receive balderdash characters during communication.
 

PIC micro-controller has no boot loader, so you would have to write one yourself or just leave it out.





PIC micro’s don’t come with USB, unless you use a PIC micro-controller with USB hardware (PIC 18F2550, 18F4550) or you would have to bank on using a USB-to-serial cable with the mid-range micro-controller (PIC 16F877) since computers nowadays are no longer shipped with serial port hardware anymore, and so USB-TO-SERIAL cable is the way to go. But those cables are beginning to disappear from our Nigerian local stores.

Arduino board has all the hard parts done for you, for example, the Arduino-uno which is very popular in their series features the Atmel's ATMEGA 328P micro-controller. It has a boot-loader (think of it as a kind of OS that hosts other programs), has power supply hardware, it's serial port ready, has oscillator crystal clock and it's stabilizing circuits, has USB interface - used for ICSP (in-circuit serial programming to program the micro-controller) and doubles as serial communication interface between it and a guest PC, and other hardware modules (like Wi-Fi, GPRS/GSM, Ethernet shields) can be interfaced with minimal effort, and also to match, is a very cool IDE software. More than that the whole hardware design is open and can be downloaded from the internet.


So it's a no-brainer win-win situation when you have to use the Arduino platform, because now there are 8-year-olds already building stuff, things that have made companies like Littlebits conspicuous - they specialize in making Do-it-yourself (DIY) kits for kids. Arduino is a company that I am sure was born to address the difficulties and grim future a lot of wannabes and newbies-embedded-system-developers were/are faced with.


IDE

Arduino's IDE (Integrated Development Environment) is free and open-source based on the Processing IDE, and the IDE can be downloaded from their website (www.Arduino.cc), a PC software application to develop program sketches in Arduino C that can be compiled and uploaded to the Arduino board.

Microchip does not have a very fluid IDE like that of Arduino which is free and you will have to purchase their MPLAB IDE with full features for a fee above $500 (N146,500, if I remember correctly) and a technical support fee of $250/year (N73,250). So most times this already puts you off, especially for newbies. The option you are left with is to use their MPLAB IDE with an assembler program (MPASM) which is free and depressing, because you would be developing your projects with assembly language which has more disadvantages (counter-intuitive) than advantages (you get intimate with micro-controller internals and its workings).

Other options you would be left with to develop codes for the PIC micro-controller would be with SDCC C compiler, a free C compiler to compile PIC micro-controllers. The disadvantage of SDCC compiler is that it doesn't support all the PIC micro-controllers. Of course there are other BASIC and C compilers and IDE's (Mikro C IDE, CSC PICC IDE) but requires you paying a fee for them.


Price

The Arduino-uno board (lowest in its family series) roughly sells in local stores between N4, 000 ($13.67) and N5, 000 ($17.06).

The Microchip PICMicro 16F877 micro-controller chip which is the most sold in Nigeria local stores, sells at a price between N800 ($2.73) and N1,500 ($5.12).

Superficially, Microchip's micro-controller(s) would quickly be perceived as cheap but you would go through an uncertain adventure to setup your own board, plus a chip programmer device that costs between N15, 000 ($51.19) and N40, 000 ($136.52), and that is for a low-end chip programmer device.


Other Stuffs

So if you want to develop professionally you should go get yourself a universal programmer that can program all known micro-controller chips - PIC, AVR, and other controllers from other vendors, and that is not in any way cheap to buy. At this point things start getting crazy with high prices for Microchip’s device chip programmer hardware and their starter kits.
Also both have loyal communities and the internet is full of documentation, projects, and tutorials you can build with any of these platforms.


Products

So my point is that Microchip’s micro-controller development would now be for high-end embedded system developers and not for wannabes or newbie developers. Also, if you are thinking of developing a standalone product, a PIC micro-controller chip would be just perfect for it, but the Arduino would not be a good choice.

The Arduino board would only be good for prototyping or development and not the right choice for a standalone product. And if you want to do serious stuff, you can, like writing your own RTOS (Real-Time Operating System) or boot-loader to build a robust application with very good response time using Microchip PIC high-end micro-controllers.

In my opinion, you may not really be able to do serious stuff with the Arduino-uno because it has few I/O pins, just one interrupt pin (I am personally not impressed). Now the Arduino-Mega would be a just enough perfect choice for sufficient I/O (54) pins, four serial port hardware, and many many goodies in there. The bad news, it is not readily available in our local part stores and the price is more than the popular Arduino-uno board we see around.


Conclusion

Arduino has been rewarded and is still being rewarded for bridging that wide lacuna that existed in the market and it's the dawning of a new reign. Microchip's season is dusking quickly, especially in Africa, specifically, the loss of the development-community (academia and hobbyist), save they innovate new strategies to reach that market and Arduino is what there is and would reign for some time until some fellow comes with something better.

5 comments:

  1. 9. You have provided a nice article thank you very much for this one. And I hope this will be useful for many people and I am waiting for your next post keep on updating these kinds of
    Knowles gabble things.

    Learn here

    ReplyDelete
  2. So for I used to comment anywhere /any blogs or videos now I do commenting ,,really it matter ,,thanks lot ,explaining in details,,,
    right here

    ReplyDelete
  3. I have read your blog it’s very attractive and impressive. I like it your blog.
    Click for this

    ReplyDelete
  4. I have read your blog its very attractive and impressive nice information it helped me a lot
    click for info

    ReplyDelete