5
\$\begingroup\$

Arduino is great to program and use. But if I need to produce standalone microcontroller (e.g in the case of manufacturing a device) I guess I need to know PIC programming, C language, programmer kit etc.

1) Arduino is not using C.

2) Using Arduino board I can not program any PIC microcontrollers

My question is that if I make a device and can not use Arduino for the ultimate goal, does it means that I also have to learn PIC programming and many other aspects? Is Arduino just for testing your ideas rather than implementing them for standalone use?

\$\endgroup\$
  • 10
    \$\begingroup\$ You seem to think that PIC programming means programming a microcontroller, which is incorect. PIC is a family of microcontrollers made by Microchip. Arduino boards are based on the AVR microcontrollers made by Atmel. \$\endgroup\$ – m.Alin Apr 10 '12 at 0:23
  • 3
    \$\begingroup\$ BTW, while you are at it, why not start accepting few answers. There are several questions asked with 2 or more answers, but none of them has been accepted. \$\endgroup\$ – icarus74 Apr 10 '12 at 8:57
  • \$\begingroup\$ @m.Alin: Actually PIC programming does mean programming a microcontroller. All PICs are microcontrollers, although there are other microcontrollers that aren't PICs. \$\endgroup\$ – Olin Lathrop Apr 10 '12 at 11:57
  • \$\begingroup\$ @OlinLathrop You're right; I should have said "programming any microcontroller" \$\endgroup\$ – m.Alin Apr 10 '12 at 12:38
  • 1
    \$\begingroup\$ Seconding Icarus74. Notice the number and quality of the answers you're getting to the questions you've asked? People are putting in time and effort for you. Accepting a best answer is one of the important ways we say "thank you" on this site. \$\endgroup\$ – JRobert Apr 11 '12 at 16:43
15
\$\begingroup\$

You could use an AVR micro-controller in your product to run the code you develop on an Arduino development board.

The Arduino is a good development and prototyping platform because it comes with a lot of hardware facilities ready to use, but that's what makes it too expensive for a product. You can use the same, or a similar, kind of micro-controller chip in your product without the whole Arduino board around it.

This page from the Arduino website describes how to bread-board a bare AVR controller chip and crystal, and load your Arduino program into it.

\$\endgroup\$
10
\$\begingroup\$

The actual hardware peripherials needed to make an arduino are quite minimal. Heck, they can even be soldered directly to the chip if you want to:

One Chip Arduino

The actual difference lies in the software. When programming directly in C or even Assembly you can achieve better performance in less program space which would allow you to use a smaller AVR in production.

\$\endgroup\$
  • \$\begingroup\$ That's great! I am wondering if one can solder and SMT programmer on to a SOIC-8 :) \$\endgroup\$ – abdullah kahraman Apr 10 '12 at 10:16
  • \$\begingroup\$ @abdullahkahraman: do you mean.. two chips on top of each other? \$\endgroup\$ – Stefan Paul Noack Apr 10 '12 at 10:19
  • \$\begingroup\$ Nope SMT components on an SMT AVR. Imagine all of these components in the above picture SMDs. \$\endgroup\$ – abdullah kahraman Apr 10 '12 at 10:21
  • \$\begingroup\$ well, probalby. but the single chip arduino is meant to save space on a breadboard. if you're using SMT, you're going to need a PCB anyways and can just place the components on the board next to the chip. ;-) \$\endgroup\$ – Stefan Paul Noack Apr 10 '12 at 10:27
  • 1
    \$\begingroup\$ @abdullahkahraman: haha, this is amazing! \$\endgroup\$ – Stefan Paul Noack Apr 11 '12 at 6:10
7
\$\begingroup\$

When you're programming the Arduino, you are actually programming in a subset of C++. AVR-GCC is the compiler included with the Arduino application to compile your code. What the Arduino environment provides is a nice hardware abstraction layer to ease the work of dealing with the intricacies of microcontroller programming. You get to focus on the functionality of your code and the Arduino libraries handle the low level stuff.

This comes at the cost of performance. The Arduino abstraction layer can take 10-20x longer for some things than just directly dealing with microcontroller registers directly. However, this isn't a concern for most people unless they're trying to do seriously complex and processor intensive projects.

\$\endgroup\$
  • 3
    \$\begingroup\$ Arduino isn't fully C++ compliant. \$\endgroup\$ – stevenvh Apr 10 '12 at 6:36
5
\$\begingroup\$

You don't need to know PIC programming, unless you want to use a PIC microcontroller. The Atmel AVR microcontrollers Arduino boards use are broadly similar to PICs in suitability for use in an actual manufactured device.

An AVR microcontroller programmed with an Arduino sketch can be used in a 'manufactured device'. This microcontroller doesn't have to live on an Arduino board -- it can simply be a part of your device.

\$\endgroup\$
2
\$\begingroup\$

It depends. You can certainly use an Arduino in a commercial device. It's especiallyuseful if you're only going to produce one or two such devices, and the customer doesn't mind the cost and size of the Arduino.

However, if you intend to produce thousands or millions of devices, then you'll probably find that you're selling them for a price which rules out the Arduino on cost. In that case, you'll almost certainly need to move to a proper microcontroller.

Learning to use a microcontroller is really worth it if you intend to make a living in this field. However, you don't need to jump straight to C. Why not try out the PICAXE system. You can use a PIC microcontroller, but program it in BASIC.

\$\endgroup\$
1
\$\begingroup\$

If you want to manufacture a microcontroller device, you can do it on AVR microcontroller, PIC microcontroller or look at ARM ones.

Bare bones AVR microcontrollers usually do not come with USB connection capabilities, you will need a special device to program it, but there are some ARM devices (NXP LPC1343 or LPC17** family) that come with built in USB and ethernet. Only usb connector and a couple of resistors are needed.

You will have to learn C programming to program that, but there already are libraries that make it almost as simple as arduino for you - http://microbuilder.eu and http://www.universalair.co.uk/forebrain have ARM based dev boards and software stacks. I'd really recommend you to look up forebrain examples.

\$\endgroup\$
  • \$\begingroup\$ There are more alternatives than those 3, you should mention that \$\endgroup\$ – clabacchio Apr 10 '12 at 14:05
1
\$\begingroup\$

Considering a few factors, LPC1343 (Olimex LPC P1343) and LPC1769 (NXP OM13000) development boards are something you may want to take a look at.

  • They are based on main stream ARM architecture. (In the sense that ARM is one of the two standard/mainstream RISC architectures - MIPS and ARM).
  • They use standard 32 bit C toolchain.
  • LPC17xx has a MPU builtin, thus you can load it with uCLinux or other protection based OS. That means more complicated software application you can build into your product.
  • Due to the reasons above, it will be easier to find qualified engineers, and to find industrial quality reference designs.

This is just my 2c. After all, it is your call to consider not only the initial cost but also the subsequent easiness to design, develop, deploy/sell your product, at a volume you envision, and at a speed it makes your product profitable.

\$\endgroup\$

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.