Why Programming an AVR or PIC Chip Directly is an Upgrade to Programming an Arduino

Atmel AVR and PIC microcontrollers

Programming a microcontroller such as an AVR or a PIC directly is a huge upgrade to programming a complete microcontroller board such as an arduino.

Having a circuit in which you use a single microcontroller instead of a whole board such as an arduino is much less expensive, takes up much less space, and allows for more efficient circuit building because you can only use which pins you need of the microcontroller, while a board has I/O pins laid out which you may not even use.

For hobbyists, an arduino will suffice just fine, but if you're ever building your own products for say, commercial use, or just if you're building more sophisticated circuits that you want to be self-contained such as a robot, an arduino board simply will no longer or be a burden for such products. This is because you need the only entire arduino board for it work.


Let's go over one of the first guidelines and that is cost.

Imagine if you are building a product that needs a microcontroller in order to operate. And you need to build many units of this electronic device. Maybe this device needs a microcontroller such as the Atmega328 chip to control lights, if the device functions as a night light circuit. If you use an arduino board for each unit, this is almost completely impractical. An arduino board will cost you anywhere from $20-$30. Therefore, your product will already have this materials expense and will have to be more expensive than this. If, on the other hand, you use a single microcontroller chip, such as the Atmega168 or the Atmega328 (the Atmega328 simply has double the flash memory and 4 times as much SRAM as the Atmega168, so it may not be necessary), the unit cost per $3-$4. This is how much it costs to buy the microcontroller. So contrasting $20-$30 for an arduino board to $3-$4 for the Atmel AVR chip is obviously a big difference. And it can drastically mark down the price of each product unit.

Less Space Usage

Besides cost, another factor is that a single microcontroller takes up much less space. Imagine if you want to build a small-device that needs a microcontroller in order to operate. Using an arduino would then become very impractical. An arduino is a large board that takes up a gigantic amount of space. It wouldn't fit inside many objects requiring microcontroller use such as a stuffed animal toy that talks or a small remote controlled device. Therefore, it's inefficient. On the other hand, microcontroller chips take up very little space and can be practically incorporated into almost all electronic devices without taking up much space at all. Therefore, they're not detrimental to a product that may have size constraints.

More Efficient

The last benefit of being able to program microcontroller chips directly is that it makes for a much more efficient circuit building process.

You can only use the pins that you need in use. For example, if you're building a purely digital circuit, then you do not need to use any of the analog pins on the Atmel AVR microcontrollers.

However, if you're using an arduino board, it automatically comes with I/O pins for all the analog and digital pins.

Arduino I/O pins

So, for a purely digital circuit, you may be stuck with analog I/O pins that you won't even use.

Or you may use analog pins but only 1 and not 6. You could use the obvious inefficiencies that this creates when you want to build a straightly efficient circuit.

When using a microcontroller chip, you can wire up only those pins that will be used. Thus, it's a much more efficient circuit building process.

Don't get me wrong. This is not an article meant to be bash the arduino. I love the arduino and it's a great board to first get started with when beginning to learn microcontroller programming. This website has countless articles on arduino projects. Arduino has a great community surrounding it where you have easy access to building tons of projects with relatively straightforward code.

However, programming AVR chips such as the Atmega168 or the Atmega328 (both of which are used in arduino boards) is an upgrade because of the above-mentioned reasons of cost, less space usage, and efficiency. This is why AVR programming is a big deal. Instead of using a complete arduino board, we go directly to the single microcontroller chip and program it directly.

But it's not all smooth. Programming a microcontroller chip directly requires a greater learning curve and more direct knowledge of the microcontroller functioning. The arduino is a board comprised of many components that you do not even think about but that are important for the functioning of the microcontroller. The arduino board comes with voltage regulators built into, crystal oscillators, ICSP connector (for programming the arduino through serial programming), a reset button, and many other components. It is built so that a new user does not have to think about it all of this and can program relatively easy. However, programming a micrcontroller chip directly requires a user to kind of program from scratch and build and put together all the components. The code to program microcontrollers, thus, will be more complex and longer than programming an arduino, whose software has many built different built-in libraries than the AVR library has; thus, it's kind of a new entire game. However, the advantages to programming microcontroller chips such as the AVR and PIC microcontrollers outweigh the cons. And this is one strong reason I believe AVR and PIC programming will become more popular in the future.

Arduino is a great microcontroller to begin to learn microcontroller programming but the ultimate goal is to learn how to program microcontrollers directly for the flexibility it gives an engineer in building electronic devices.

Related Resources

How to Build a Blinking LED Circuit with an AVR

How to Build a Potentiometer Circuit with an AVR

How to Build a Night Light Circuit with an AVR

How to Build a Night Light Circuit with Adjustable Light Level Control with an AVR

How to Build a Liquid Level Sensor Circuit with an AVR

How to Build a Pushbutton Switch Circuit with an AVR

HTML Comment Box is loading comments...