MICROCONTROLLERS

Photo of author

By Jackson Taylor

Home » Hardware » MICROCONTROLLERS

As an Amazon Associate we earn from qualifying purchases.

A microcontroller is a small computer on a single chip. It combines a processor, program memory, working memory and input/output pins, so it can run one dedicated program and control other hardware. You will find microcontrollers in appliances, toys, car electronics, remote controls, sensors and many hobby projects.

This guide explains how microcontrollers work and how to pick one for a build. It then goes through the chips on our list: the Atmel AT89S52, ATmega328P-PU, PIC16F676, PIC12F508 and dsPIC30F2010.

What a microcontroller does

A microcontroller reads inputs, runs your code and sets outputs. An input might be a button, a temperature sensor or a switch. An output might be an LED, a buzzer, a relay or a motor driver. The program is stored in flash memory, so it stays on the chip when power is removed.

Hardware Hack

Stop Buying New Batteries for Your Tech

Electronics are expensive, but their power sources don't have to be. Discover the simple engineering trick to recondition dead batteries and bring your gadgets back to 100% capacity.

Watch the Free Video

Most microcontrollers include several built-in features, so you need fewer external parts:

  • Flash memory for the program, which can usually be rewritten many times.
  • RAM for variables while the program runs.
  • EEPROM (on many chips) for small settings that must survive power loss.
  • Timers for timing events and generating signals.
  • Analog-to-digital converters (ADC) for reading sensors that give a varying voltage.
  • Serial interfaces such as UART, SPI or I2C on some models, for talking to other chips.

Microcontroller vs microprocessor

A microprocessor, like the one in a laptop, is only the processing core. It needs separate memory and support chips and usually runs a full operating system. A microcontroller has memory and peripherals built in, costs less and uses less power. It is designed for one focused job rather than general computing.

How to choose a microcontroller

Start from the project, not the chip. These questions narrow the choice quickly:

  1. How much program memory do you need? A blinking light needs very little. A project with many features, displays or communication code needs more.
  2. How many pins and which peripherals? Count your inputs and outputs, and check whether you need an ADC, PWM or serial communication.
  3. What package fits your build? DIP (through-hole) chips plug into a breadboard and are easy to solder. Surface-mount chips are smaller but harder to hand-solder.
  4. What tools and community support exist? A chip with a free toolchain, clear datasheet and active forums saves a lot of time.
  5. How will you program it? Check whether you need an external programmer or whether a bootloader lets you upload code over USB.
See also
BRUSH LESS DC MOTOR (BLDC ) INSIDE VIEW (USED E BIKE -36V ,250W)

Always check the manufacturer’s datasheet before buying or wiring a chip. It lists the exact pinout, voltage range and electrical limits.

Microcontrollers on our list

The prices and stock figures below come from the original listing. The currency is not stated, and stock levels change, so confirm availability before you plan around them.

Atmel AT89S52 8-bit Microcontroller (Program Memory 8KB)

  • Price: 60
  • Quantity remaining: 4

The AT89S52 is a low-power, high-performance CMOS 8-bit microcontroller with 8KB of in-system programmable (ISP) flash memory. It is built on Microchip’s high-density, nonvolatile memory technology (Microchip now owns Atmel). It is compatible with the industry-standard 80C51 instruction set and pinout.

The on-chip flash lets you reprogram the program memory in-system or with a conventional nonvolatile memory programmer. That makes the chip suitable for many embedded control applications. It is also a common choice for students learning the 8051 architecture.

ATMEGA328P-PU Microcontroller (Program Memory 32KB)

  • Price: 105
  • Quantity remaining: 20

The ATmega328P is an 8-bit AVR microcontroller with 32KB of flash program memory. It is the chip used on the Arduino Uno. The “PU” suffix refers to the through-hole DIP package, which fits a breadboard and suits prototyping.

It has plenty of memory and peripherals for most hobby projects, including analog inputs, timers and serial communication. Because so many Arduino tutorials target this chip, finding examples and help is easy.

ATMEGA328P-PU Microcontroller With Arduino UNO R3 Bootloader (Program Memory 32KB)

  • Price: 110
  • Quantity remaining: 20

This is the same ATmega328P-PU, already loaded with the Arduino Uno R3 bootloader. A bootloader is a small program that lets you upload sketches over a serial connection without a dedicated chip programmer. It is useful if you want to replace a damaged chip on an Uno board or build your own minimal Arduino-style circuit. A standalone build usually also needs a clock source, such as a crystal or resonator, and a USB-to-serial adapter for uploading.

Sustainable Tech

Keep Toxic E-Waste Out of Landfills

Don't throw away your failing laptop, phone, or car batteries. Learn how to recondition them at home in just a few hours. It's better for the planet—and your wallet.

Learn How It Works
See also
TTP229BSF WITH STM8S003F3

Microchip PIC16F676 Microcontroller

  • Price: 50
  • Quantity remaining: 20

This CMOS flash-based 8-bit microcontroller is powerful, with 200 nanosecond instruction execution, yet easy to program, with only 35 single-word instructions. It packs Microchip’s PIC MCU architecture into a 14-pin package. It has 8 channels for the 10-bit analog-to-digital converter, 1 comparator and 128 bytes of EEPROM data memory.

It adapts easily to automotive, industrial, appliance and entry-level consumer products that need field re-programmability. For hobby work, it suits small sensor-reading and control tasks where a larger board would be overkill.

PIC12F508 Microchip Microcontroller

  • Price: 30
  • Quantity remaining: 20

The PIC12F508/509/16F505 devices from Microchip Technology are low-cost, high-performance, 8-bit, fully static, flash-based CMOS microcontrollers. They use a RISC architecture with only 33 single-word instructions. All instructions take a single cycle, except program branches, which take two cycles.

The 12-bit wide instructions are highly symmetrical, which gives a typical 2:1 code compression over other 8-bit microcontrollers in its class. The instruction set is easy to learn and remember, which reduces development time. Microchip positions these devices as delivering performance an order of magnitude higher than competitors in the same price category. With a very small footprint, the PIC12F508 suits simple jobs such as basic timing, switching and indicator control.

dsPIC30F2010 Motor Control 16-bit Digital Signal Controller (SDIP 28-Pin)

  • Price: 150
  • Quantity remaining: 10

The dsPIC30F2010 is a 16-bit digital signal controller in a 28-pin SDIP package. A digital signal controller combines a microcontroller’s control features with the math capability needed to process signals quickly. This model is aimed at motor control, so it suits projects such as driving and regulating brushless or other electric motors. It is a step up in complexity from the 8-bit chips above, so it fits builds that need faster calculation.

Quick comparison

  • AT89S52: 8-bit, 8KB flash, 80C51 instruction set. Good for learning the 8051 family.
  • ATmega328P-PU: 8-bit, 32KB flash. Good for Arduino-style projects.
  • PIC16F676: 8-bit, 14 pins, 10-bit ADC. Good for small sensor and control tasks.
  • PIC12F508: 8-bit, low cost, 33 instructions. Good for very simple jobs.
  • dsPIC30F2010: 16-bit, motor control focus. Good for demanding control and signal work.
See also
Hall Effect Sensor A3144

Getting started with programming

Most beginners get on best with a chip that has strong tool support. Arduino-compatible chips can be programmed in the Arduino IDE. PIC and 8051 chips are normally programmed with the manufacturer’s or a third-party toolchain and an external programmer. Whatever you pick, test your circuit on a breadboard first, and add a decoupling capacitor close to the chip’s power pins as the datasheet recommends.

FAQ

What is the difference between an 8-bit and a 16-bit microcontroller?

The number refers to how much data the processor handles at once. 8-bit chips are simpler and cheaper and are enough for most basic control tasks. 16-bit chips handle larger numbers and heavier calculations more efficiently, which helps in tasks like motor control.

Do I need a programmer to use a microcontroller?

Usually yes, unless the chip already has a bootloader. A chip such as the ATmega328P with the Arduino Uno bootloader can take code over a USB-to-serial connection. Blank chips normally need a programmer that matches the chip family.

Which microcontroller is best for beginners?

The ATmega328P is a popular starting point because of the large number of Arduino tutorials and libraries. The AT89S52 is a good option if you specifically want to learn the 8051 architecture.

Can I reprogram these chips more than once?

Yes. The chips on this list use flash memory, which can be erased and rewritten. Check each datasheet for the rated number of write cycles.

Revive Your Dead Electronics

Got a drawer full of dead gadgets or a failing car battery? Instead of paying a premium for replacements, use this simple trick to easily recondition them right from home.

See How It Works