PIC micro-controller vs Arduino

what is the different between PIC micro-controller vs Arduino ?

If I refer to http://www.mikroe.com/products/view/476/pic-microcontrollers-programming-in-basic/ would it be big different of content between Arduino ? Here I am asking about general content not specif details ,

I am asking about general content not specif details

Generally there is no difference.

Different assembler, different memory architecture. Different I/O capabilities, different tools.

Different code too..

Doc

nish1013: what is the different between PIC micro-controller vs Arduino ?

If I refer to http://www.mikroe.com/products/view/476/pic-microcontrollers-programming-in-basic/ would it be big different of content between Arduino ? Here I am asking about general content not specif details ,

If you want to program an Arduino in BASIC, check out this thread:

http://forum.arduino.cc/index.php?topic=145855.30

Different name,
PIC is an accronym if I recall correctly

  • Programmable Integrated Circuit - Programmable Interrupt Controller or Peripheral Interface Controller - something

Arduino is no acronym although - http://forum.arduino.cc/index.php?topic=130849.0 -

A similar thing to Arduino in the Pic world is the PicAxe, which uses Pic microprocessors and uses a bootloader to load programs. It is programmed in Basic, though, and is more limited than Arduino. (No classes or floating point, for example.)

I built some projects with PICs in the past and I have only started with Arduino a few months ago when I found the Uno boards on sale in Maplin. I have never used the PicAxe system.

For me the Arduino wins on all counts simply because it is so easy to use and has everything you need to get started on a single board, including the USB interface and, within the IDE, the SerialMonitor to view output from the Arduino board. For me “it just works”. I don’t like programming in C but the Arduino IDE makes it bearable [and you can’t put much of it on a Uno anyway :slight_smile: ].

I’m sure there is no significant difference between the capabilities of Atmel and Microchip MCUs - but there is no equivalent of the Arduino system for PICs.

And I like the fact that the Arduino system is OpenSource.

…R

Ok , Seems like the content in this link is not useful .

I'm sure there is no significant difference between the capabilities of Atmel and Microchip MCUs - but there is no equivalent of the Arduino system for PICs.

But is this http://www.mikroe.com/chapters/view/74/pic-basic-book-chapter-1-world-of-microcontrollers/ will be useful ?

Useful for what?

to get an idea about how MCU internally works

It looks like it would be OK to find out how a PIC MCU works internally.

I'd dispute this

. For this reason, one of the registers of RAM is called the ‘sum’ and used for storing results of addition.

This suggests that there's another register called "difference", another called "product", etc. This is not normally the case - often there is a single register for the results of arithmetic and logical operations (though not on the AVR) Usually, such a register is called the accumulator.

It would help a lot if you explained why you are wondering about the difference between PIC and Arduino/Atmel. The small differences between the devices can spark a very strongly polarized and useless debate.

You can use explanations about any type of MCU to get a general understanding about how they work. If you are the sort of person that can easily transpose concepts between (say) PIC and Atmel MCUs and between programming languages (Basic and C++) then it really doesn’t matter where you start. On the other hand you may find it easier to confine your early learning to the type of device you intend to use for your projects.

As I said before, in my mind the Arduino is by far the easiest system for beginners.

…R

nish1013:
to get an idea about how MCU internally works

Put very simply, a bit like internal combustion engines, most processors operate on the same principles.

Instead of "suck, push, bang, blow", the steps are 1) fetch the next instruction 2) decode the instruction 3) execute the instruction (which may involve fetching operands too) 4) see if there's been an interrupt 5) increment the program counter 6) rinse and repeat and so on

There are details like cache, CISC vs. RISC, SIMD vs. MIMD and Harvard vs. von Neumann, real vs. virtual memory etc, but that's pretty much all there is to it.

4) see if there's been an interrupt

could you please elaborate this step

could you please elaborate this step

4) see if there's been an interrupt 4a) if there has, push the PC and go to the interrupt vector 4b) open new can of worms

(OK, maybe 4) should be transposed with 5), but the principle is the same)

An interrupt is when something (often an external device) signals to the MCU that it is ready for something to happen. Then the MCU has to temporarily stop what it is doing and run a piece of code that you have written to deal with the interrupt. When that's done the MCU goes back to what it was doing. Interrupts can also be generated within the MCU - for example when some time period has expired and something else needs to happen.

The alternative to interrupts is a wasteful loop in your code that repeatedly checks to see if something is ready.

Interrupts are used by all computers but, for the most part, you aren't aware of them when using a desktop PC. They are a very important part of MCU programming so you should learn about them.

...R

Robin2: I'm sure there is no significant difference between the capabilities of Atmel and Microchip MCUs - but there is no equivalent of the Arduino system for PICs.

And I like the fact that the Arduino system is OpenSource.

...R

I think there are some big differences particularly when you compare devices and capabilities used in "duino" type boards. Lets see: (comparing Arduino Uno to Chipkit Uno32 which is atmega328 vs PIC32MX320F128) - 32 bit pic vs 8bit AVR - The AVR has harvard architecture which complicates code vs flat addressing model - 80 Mhz pic vs 16mhz AVR - 128k flash on pic vs 32k flash on AVR - 16k RAM on pic vs 2k RAM on AVR - 3v VCC on pic vs 5v on AVR. - 3v outputs on pic vs 5v on AVR (pic is 5v tolerant on inputs)

There is an "Arduino" equivalent IDE and ecosystem for PICs. Just look at the chipkit stuff and MPIDE which is the same IDE with enhancements for the PIC chips. http://www.chipkit.org/forum/index.php http://www.digilentinc.com/Products/Catalog.cfm?NavPath=2,892&Cat=18

MPIDE is a fork of the Arduino IDE to handle non AVR chips. It was done about the same time the Arduino team created their own IDE fork for DUE. And it is all open source.

And then look at how you can create a simple breadboard PIC system using a DIP based chip just like like you can with AVR: http://chipkit.net/chipkit-bb32/ http://chipkit.net/diy-chipkit-board/

So for about the same money you can get DIP based micro that has more resources, more capabilities, and is so much faster than the AVR DIP solutions. Compare the specs of the DIP PIC32MX250F128B to the DIP Atmega328 Big difference! And for s/w, the PICs have nearly an identical open source GUI IDE and toolset available.

To me the the new PICs blow the AVRs out of the water.

For additional resources over AVR, there is the Atmel based DUE which has more resources and is faster than the AVRs but for many applications I think the new PICs are better particularly for DIY hobbyists since the PICs can be had in a DIP package. The PICs are also 5v tolerant vs the ARM used in DUE is not.

To me a great "duino" board would be a PIC based board that used a PIC32MX250F128B. That would be like a Arduino Uno on Steroids and closer the original heritage of the Arduino which started out as a simple DIP based experimenters board.

-- bill

How interesting. As you have guessed I had never heard of the the ChipKit boards.

They need to do some work on their marketing.

...R

A similar thing to Arduino in the Pic world is the PicAxe, which uses Pic microprocessors and uses a bootloader to load programs. It is programmed in Basic, though, and is more limited than Arduino. (No classes or floating point, for example.)

The below is NOT a recommendation for using BASIC, it is just facts of a series of experiments <<<<<<<
I wrote a post on the PICAXE forum back a while, but I think that it may be enlightening to note how much firmware is contained in the PICAXE; that is, there are routines for the entire PICAXE BASIC implementation in the PIC. Therefore, source code in flash is minimal and the GUI runs a pre-processor to tokenize keywords and digest some of the math.
http://www.picaxeforum.co.uk/showthread.php?21079-PICAXE-amp-Arduino-(code-size-comparisons-just-for-fun)

All of the gyrations associated with maximizing the minimum available flash on the PIC is a determent to performance. However, the PICAXE was designed for teaching children and while the GUI is somewhat cumbersome, the GUI does support full program debug in software. Even some peripherals are simulated in the freely downloadable software. This can be quiet useful when you are just fiddling around with algorithms and want to apply masks or logical conditions.

For those that would feel “dirty” taking the above link to the PICAXE site, here is just a single sample:

REM PICAXE Blink a LED: one second on, off, repeat
REM Memory used = 14 bytes
;

symbol LED = B.4 ; rename output4 ‘LED’

Do
	high LED ; LED on
	pause 1000
	low LED
	pause 1000
	Loop

Please note that the BASIC code takes 14 bytes of program memory. The corresponding Arduino code below takes 1026 Bytes. The BASIC code needs all of the firmware in the PICAXE but is 100% portable to every PICAXE chip. The Arduino code is completely linked and requires no other code in the uC. The source code is also 100% portable to every supported Arduino board type.

// Arduino sketch to blink a LED
// Binary sketch size: 1026 bytes
/*
  Blink
  Turns on an LED on for one second, then off for one second, repeatedly.
 */

void setup() {                
  // initialize the digital pin as an output.
  // Pin 13 has an LED connected on most Arduino boards:
  pinMode(13, OUTPUT);     
}

void loop() {
  digitalWrite(13, HIGH);   // set the LED on
  delay(1000);              // wait for a second
  digitalWrite(13, LOW);    // set the LED off
  delay(1000);              // wait for a second
}
  • Ray