Hello, as some of you know, PIC was quite popular over 20 years ago. It is still being used and there are lots of books on it. It seems that Arduino is getting more popular these days. Could anybody familiar with both do a comparison? I want to implement a project that has been done on the PIC. I wonder if I should use Arduino instead. Thanks.
I think that one area in which the Atmel/ AVR "got the jump on" the PIC, was the choice to use low-voltage (serial) programming rather than 12V program enabling. While the AVRs still use some 12V programming modes, low-voltage programming makes programming adapters just that little bit simpler.
You're comparing apples with oranges.
the PIC and Atmel products are basically the same. as you mentioned, you are considdering using one or the other.
the Arduino Phenomenon is propelled by free software.that gave the arduino an advanage over the harder to program and more expensive to write code for PIC.
Arduino and Basic Stamp both offered a bootloader to make use easy.
if you want ease of use, ease of programming and a huge user base, the arduino is there.
if you have a PIC and the program, then you need to decide if you need to change or if it is easier to stay with the PIC
there are newer choices if your program needs more speed or memory,
Thanks. The project of other members involve getting data from sensors and then using bluetooth to transmit those data to a tablet all in real-time. The limitation of their device is that the PIC they use only supports 8 channels. I wonder how easy or difficult to port the device they developed for PIC to Arduino.
I built some projects using a Pic years ago followed by a long period without any MCU activity. I used the PIC because a magazine had an article about it and a DIY circuit and PC code in BASIC to program it. The Microchip programmers were very expensive.
I came to the Arduino recently because it offered a simple low-cost way to do stuff, I could buy an Uno in a Maplin store. and I was not aware of an equivalent PIC product. And, in principle, I like open source stuff.
I suspect there is little or nothing to choose between PIC and Atmel products.
How much programming experience have you? I don't want to teach granny to suck eggs.
If you wrote the PIC program and hence know how it was designed it would be easy to implement the same design on an Arduino. If you only have the PIC code but don't know what it does or why it would be a bit more difficult.
It's probably a waste of time to look for exact equivalents between the PIC and the Arduino software and a waste of time bitching because "you can do X with the PIC, why can't Atmel do it the same way".
...R
I would suggest you find the PIC family that offers all the same memory allocations. you should be able to find the bigger brother to your chip that has more I/O.
the Atmel chips handle memory differently, so the PIC requires you to address specific banks. in that sense the ATMEGA is an easier chip to program.
if you want to try the Arduino, it is free, the parts are low cost and the community is huge.
The PIC has a following as well.
the PIC and the ATMEGA are the chips and they are pretty much the same thing. the Arduino is the assembly of the chip and software and board layout (pin addresses). Most of us just use the arduino programming software and do not notice that you can program the chip in Basic or Assembler.
Thanks. I checked with people who are in that project. They said that they just use the system which was developed by a company at a hugh cost. The company developed a custom made circuit board for PIC and wrote the code. People in that project just use the product.
Basically, I want a small and lightweight device which has many analogue input channels, say 16 or more later. I think only the Arduino Mega 256 has 16 analogue input channels. However, it is big and heavy. The lighter ones only has 6-8 analogue input channels. What suggestions do you have? Is it possible to buy 2-4 pieces of the smallest and lightest Arduino and somehow sync them together so that they act as if they were one?
The lighter ones only has 6-8 analogue input channels. What suggestions do you have? Is it possible to buy 2-4 pieces of the smallest and lightest Arduino and somehow sync them together so that they act as if they were one?
I'd generally try to avoid that unless I needed "multi-tasking" with each Arduino processing it's own data, or if there was an advantage to having them physically separated, etc.
And, I think 2 Unos are about the same size as one Mega.
If you have the capability, you can make a custom-smaller PC board.
Engineering involves, trade-offs, compromises, and decisions... You get to make those decisions!
Arduino vs. PIC
I've never used the PIC in a hobby project. But where I work we have a couple of PICs in our products. One of them (I think it' 8-bits) is just basically being used as a bootloader, and the other one is the main processor in the product (I think it's 32-bits).
The things that attracted me to the Arduino:
-
It's on a board. I don't have to make a PC board or use a breadboard for the core CPU.
-
The board is also the development kit. Nothing else to buy!
-
The board (and the bootloader) is also the programmer . Nothing else to buy!
-
The IDE/compiler is free.
(The Raspberry Pi and other "single board computers" have these same advantages.)
Also, I've used several IDEs/Compliers over the years (for programming computers & various microcontrollers). My usual goal for 1st day is to get the IDE/Compiler installed and configured, and to get "Hello World" running. If I can get that accomplished in a half-day or less, I'm very happy.
After I got my Arduino, it only took about 15 minutes to download and install the development software and get "Blink" running. That was amazing!
petercohen:
... I want to implement a project that has been done on the PIC. I wonder if I should use Arduino instead.
...
Basically, I want a small and lightweight device which has many analogue input channels, say 16 or more later. I think only the Arduino Mega 256 has 16 analogue input channels. However, it is big and heavy.
Use the PIC. I know nothing about your talents, but the fact that you are asking this question suggests to me that you are not up to a PIC port to AVR. Replicate the project as-is first. Find a PIC chip model in a closely related family that can match your analog needs. A port within the same PIC family should be far easier than a port across different manufacturers. Later, as you understand the PIC code better, you may want to stretch your wings with an Arduino port.
Arduino is a system: hardware, software, IDE+GUI environment, some magical pin morphing code, etc. Because of design decisions made, the core and libraries strive for ease of migration between Arduino boards- at the expense of performance.
Ray
The 8-bit (12 bit instruction) 16xxx PICs are, IMO, a PITA with their banked register/RAM architecture.
Can you get a PIC running with just power and a bypass cap? AVR wasn't quite there around 2000 but PIC was a few more bits than AVR even then.
As far as multiplying analog inputs, you can hang your collectors on a bus and have them send data to a controller with the bluetooth. Just what bus depends on how fast your data must come in but if it can all go through bluetooth (IIRC 38400 baud) then that's not a big problem is it?
One thing is that with analog it's good to have shorter wires between sensor and ADC so if the sensors are spread out then so should be the converters, right? And some sensors come packaged with converter, they send data in serial packets usually on 1-wire or I2C bus so you've got choices there as well.
There's even bi-directional analog multiplexer/demultiplexer chips to multiply analog pins with:
Thanks to chip proliferation you have a lot of choices, perhaps the best is what your engineers feel best about using.
Edit - add: I can't say about PIC. With Arduino I can use 1 UNO to program any of a whole slew of the AVR family. Don't make your end-product out of development boards! Make stand-alones!
How about telling us what the project is supposed to do and why you need 16 analog inputs?
...R
The term PIC these days is pretty vague as Microchip make such a large range of devices that are all loosely PICS
that its not easy to answer your question.
But if all you want is a PIC that supports 16 A/D channels there are plenty of them.
Heres one for example.
http://www.microchip.com/wwwproducts/Devices.aspx?product=dsPIC30F5011
16 X 12 bit a/d channels with 40 Mhz clock.
If you want to go to the 32F range you can get even faster types, up to 200 Mhz.
AWOL:
The 8-bit (12 bit instruction) 16xxx PICs are, IMO, a PITA with their banked register/RAM architecture.
Most of the mid-range and enhanced mid-range PIC16Fxxx are 8-bit with 14-bit instruction (not 12), and you only need to worry about banked memory if you're writing in assembler.
I get on well with both Arduino and PIC, although the 8-bit PICs don't have a C++ compiler.
If you want the ease of the Arduino on a PIC, try the chipKIT which is similarly priced to Arduino. For example, the chipKIT Uno32 (picture attached). Quoting from the blurb :
The chipKIT™ Uno32™ is based on the popular Arduino™ open source hardware prototyping platform but adds the performance of the Microchip PIC32 microcontroller. The Uno32 is the same form factor as the Arduino™ Uno board and is compatible with many Arduino™ shields. It features a USB serial port interface for connection to the IDE and can be powered via USB or an external power supply.
The Uno32 board takes advantage of the powerful PIC32MX320F128 microcontroller. This microcontroller features a 32-bit MIPS processor core running at 80Mhz, 128K of flash program memory and 16K of SRAM data memory.
The Uno32 can be programmed using an environment based on the original Arduino™ IDE modified to support PIC32. In addition, the Uno32 is fully compatible with the advanced Microchip MPLAB® IDE and the PICKit3 in-system programmer/debugger.
AWOL:
The 8-bit (12 bit instruction) 16xxx PICs are, IMO, a PITA with their banked register/RAM architecture.
I second that, especially if your programming in assembler and you have to do/think of everything like did that function I just called alter bank, or does it expect a specific bank on entry. I do miss the hardware single stepping/ breakpoints though.