microcontroller Archives - Electronic Guidebook https://electronicguidebook.com/tag/microcontroller/ A place to help you with your electronic needs Wed, 10 Nov 2021 04:39:07 +0000 en-US hourly 1 https://wordpress.org/?v=6.5.2 https://electronicguidebook.com/wp-content/uploads/2020/02/cropped-electronicGuidebookLogoTransparent-1-32x32.png microcontroller Archives - Electronic Guidebook https://electronicguidebook.com/tag/microcontroller/ 32 32 230945861 Is raspberry pi a microcontroller? https://electronicguidebook.com/is-raspberry-pi-a-microcontroller/?utm_source=rss&utm_medium=rss&utm_campaign=is-raspberry-pi-a-microcontroller Wed, 10 Nov 2021 04:39:03 +0000 https://electronicguidebook.com/?p=1054 The Raspberry Pi has made a massive mark in the electronic world. It is essentially a tiny computer that can fit in the palm of your hand.  You can connect outputs like monitors or televisions, as well as connect inputs like a keyboard and mouse just like you would a normal computer. The great added […]

The post Is raspberry pi a microcontroller? appeared first on Electronic Guidebook.

]]>
The Raspberry Pi has made a massive mark in the electronic world. It is essentially a tiny computer that can fit in the palm of your hand. 

You can connect outputs like monitors or televisions, as well as connect inputs like a keyboard and mouse just like you would a normal computer.

The great added benefit of the raspberry pi is that it can be programmed according to your needs for a certain purpose or project. It is programmed using coding languages like Scratch and Python

You might be on the lookout for a new raspberry pi, or already have one lying around and are wondering if it is a microcontroller. 

So is a raspberry pi a microcontroller? The raspberry pi is not a microcontroller. It is a single-board (the size of a credit card) that emulates a computer. However, just like a computer, it requires a processor as its brains to operate. It uses a microprocessor (not a microcontroller) as the main processor.

This article shall take a deeper look as to why a raspberry pi is not a microcontroller. 

What is a raspberry pi? – A closer look

To better understand why a raspberry pi is not a microcontroller, it will help to take a closer look at the raspberry pi individually. 

The first raspberry pi was launched in 2012, created by the Raspberry Pi Foundation, which is a UK charity whose main focus is to make it easier and more accessible for people to learn about computing.  

So, what exactly is it?

The raspberry pi has all the makings of a small computer which can fit in the palm of your hand. It uses Linux as its operating system.

It is very similar to a development board as it includes a set of General Purpose Input-Output (GPIO) pins allowing you to connect a range of inputs and outputs for prototyping personal projects such as home automation.

Different parts of a raspberry pi

Just like a computer, the raspberry pi is an embedded system comprising different hardware sections that each have its own functionality contributing to the overall system. Below are the hardware components;

  • Central Processing Unit (CPU)
  • Memory (RAM)
  • Graphics Processing Unit (GPU)
  • Ethernet port
  • GPIO pins 
  • Xbee socket
  • Power source connector 
  • Universal Asynchronous Receiver-Transmitter (UART)
  • HDMI 

Central processing unit (CPU)

The first and most crucial hardware component of a raspberry pi is the Central Processing Unit (CPU)

The CPU is the brain of the entire system which has the job of undertaking all operations (logical and mathematical) that occur within the raspberry pi. 

It is very similar to how our brain handles all operations and tasks within the system of the human body. 

The raspberry pi uses an ARM11 series microprocessor as the CPU (we shall take a more in-depth look at this when we discuss why a raspberry pi is not a microcontroller).

Memory (RAM)

Random Access Memory (RAM), is where a computer stores its short term memory. It uses it for all active programs and apps. 

It is used for the same purposes in a raspberry pi for things like compiling large pieces of software, running server workloads, and running applications. 

Graphics processing unit (GPU)

The Graphics Processing Unit is a chip within the raspberry pi that is responsible for accelerating the process of graphics rendering. It is capable of processing many pieces of information simultaneously. 

Ethernet port

The great ability of the raspberry pi is to be able to access the internet. It does this through its Ethernet port which connects to a router. 

GPIO pins

The General Purpose Input Output (GPIO) pins are used to interface digital and analog inputs and outputs to the raspberry pi such as buttons, sensors, motors, LEDs, etc. This allows you to give the raspberry pi added abilities. 

XBEE socket

Wireless communication is very prominent in the electronic scene. The Xbee socket is used to give the raspberry pi the means of wireless communication.

UART

The Universal Asynchronous Receiver Transmitter (UART) is another form of communication that the raspberry pi utilises. It is an input/output port used to transfer data serially (one at a time) in the form of text. 

HDMI

Last but not least, is the HDMI port.

HDMI or High Definition Multimedia Interface is an audio/video interface used for transmitting uncompressed video and audio data. The raspberry pi has an HDMI port to be able to interface with other HDMI compatible devices such as monitors and televisions.

Why the raspberry pi is not a microcontroller

Now that we have taken a closer look at the raspberry pi, we can answer the question if it is a microcontroller or not.

So, is a raspberry pi a microcontroller? 

No, the raspberry pi is not a microcontroller. As we just saw, it is essentially a miniature embedded computing system the size of a credit card, which comprises different parts such as the CPU, GPU, GPIO pins, etc. It is a development board similar to an Arduino (however, a raspberry pi has greater computing power). 

A microcontroller on the other hand is also very similar to a computer, which is embedded on a single integrated chip. It is used as the brain of embedded systems to handle computations and manage tasks.

The key difference is that a raspberry is an embedded system already set up with all necessary hardware components which we saw earlier, whereas the microcontroller is just a single chip and does not come set up. 

Does a raspberry pi use a microcontroller or microprocessor?

Earlier we saw that one of the key components of the raspberry pi is its central processing unit (CPU), which has the job of undertaking all operations (logical and mathematical).

The CPU is the brain, and without it the raspberry pi would be useless. 

We just saw that a raspberry pi is not a microcontroller. 

But, what you need to know is that the CPU in embedded systems use devices like a microcontroller which are capable of handling operations. 

There are two main options of devices used for CPUs; Microcontrollers and Microprocessors.

The real question is, does a raspberry pi use a microcontroller or microprocessor? 

The raspberry pi uses a microprocessor. Since the raspberry pi is a mini computer, it needs to have hardware specifications to match. For that reason, a raspberry pi primarily uses a microprocessor as the CPU. This comes down to the microprocessor having faster processing speeds than the microcontroller. It is capable of handling more instructions per second. 

Differences between a microcontroller and microprocessor

The speed of a microprocessor and microcontroller is just one of the key major differentiations between the two. However, there are many other notable differences. 

Let’s take a look at some of them. 

The first difference is that a microprocessor contains only a CPU within a single chip, whereas a microcontroller consists of a CPU, memory, input/outputs and other peripherals all on a single chip.

A microprocessor uses an external bus to connect to memory and other peripherals, while a microcontroller uses an internal bus. 

The architecture that these two devices are built on is also different. A microcontroller utilises the Harvard architecture, and a microprocessor is built on the Von Neuman architecture.

Microprocessors are capable of much higher speeds compared to a microcontroller (in the order of gigahertz vs megahertz). 

Applications of microprocessors include;

  • Computers
  • Home security systems
  • Gaming systems
  • Transportation such as planes and cars
  • Medical devices
  • Mobile phones 

Applications of microcontrollers include;

  • Calculators
  • Washing machines 
  • Robotic arms
  • Cameras
  • Digital multimeters 

Why does raspberry pi use a microprocessor and not a microcontroller?

By looking at the differences and some of the applications, you can see that microprocessors are used in more complicated systems where millions of instructions are executed every second. 

The raspberry pi isn’t any different. It is used for many complex applications such as home automation, internet of things, etc, which would require a microprocessor for its heavier and faster lifting powers. 

Is there a raspberry pi that uses a microcontroller?

There isn’t one single version of the raspberry pi.

It has many different versions and variations, each having its own unique uses and characteristics. Things that will vary from one pi to the next include speed, memory, physical size and weight, cost, and number of input/outputs.   

For example, one version might have more GPIO pins, lower power consumption, a different type of microprocessor etc. 

Below are some of the different types of raspberry pi;

  • Raspberry Pi 1 model B
  • Raspberry Pi 1 model A
  • Raspberry Pi 1 model B+
  • Raspberry Pi 1model A+
  • Raspberry Pi Zero
  • Raspberry Pi 2 B
  • Raspberry Pi 3 B
  • Raspberry Pi Zero Wireless

All the versions listed above use a microprocessor as the CPU. However there is one specific, raspberry pi board that uses a microcontroller; the Raspberry Pi Pico.

This particular board is created using the RP2040 microcontroller, designed by the Raspberry Pi foundation.

What types of microprocessors does a raspberry pi use?

As different  raspberry pi boards will have their own specific uses and characteristics, each of them also use different types of microprocessor specific for certain applications. 

The table below highlights the different types of microprocessor used for the different raspberry pi boards.

Raspberry Pi Board Microprocessor
Raspberry Pi A+700 MHz ARM11
Raspberry Pi B+700 MHz ARM11
Raspberry Pi 2 B900 MHz Quad-Core ARM Cortex A7
Raspberry Pi 3 B 1.2 GHz, Quad-Core 64-bit ARM Cortex A53
Raspberry Pi 3 B+1.4 GHz 64-bit ARM Cortex A53
Raspberry Pi Zero1 GHz single-core ARM11
Raspberry Pi Zero Wireless 1 GHz single-core ARM11

The post Is raspberry pi a microcontroller? appeared first on Electronic Guidebook.

]]>
1054
Application of a microcontroller - 10 most common https://electronicguidebook.com/application-of-a-microcontroller-10-most-common/?utm_source=rss&utm_medium=rss&utm_campaign=application-of-a-microcontroller-10-most-common Tue, 19 Oct 2021 21:37:32 +0000 https://electronicguidebook.com/?p=1025 Our world is filled with electronic products that entertain us, make our lives easier, allow us to communicate with each other, help us prevent diseases, and much more.  More often than not, at the heart of all these electronic products is a Microcontroller. This awesome device is the brain that controls all actions and takes […]

The post Application of a microcontroller - 10 most common appeared first on Electronic Guidebook.

]]>
Our world is filled with electronic products that entertain us, make our lives easier, allow us to communicate with each other, help us prevent diseases, and much more. 

More often than not, at the heart of all these electronic products is a Microcontroller.

This awesome device is the brain that controls all actions and takes care of computations within an electronic device. 

Because of its endless capabilities, there are many uses of microcontroller and it is not confined to one singular application

A microcontroller can be found in applications such as consumer electronics, medical devices, the automotive industry, aviation, marine, and much much more.

This article shall take an in-depth look at the microcontroller and its many applications.

Deeper look at the microcontroller

To better understand why a microcontroller is used for a specific application, it will help to take a closer look at its history, how it is constructed, the different types available, etc. 

What it is a microcontroller

The world is filled with electronic devices that have a specific purpose whether it be playing music, making coffee, toasting bread, etc. 

I would be surprised if you didn’t find a Microcontroller at the center of most of these systems.

A microcontroller is an Integrated Circuit (IC), which has all the capabilities of a computer. It consists of a central processing unit (CPU), onboard memory and inputs/outputs all of which are programmable. 

A microcontroller has the task of ‘controlling’ operations (much like a traffic cop controls traffic) hence why the second half of its name is ‘controller’. The ‘micro’ is aptly there because of its size. 

It is used by professional engineers, students, and hobbyists for many different applications (which shall be discussed in more detail later).

History of the microcontroller

The field of electronics has been around for some time. But, the microcontroller wasn’t the star of the show from the very beginning. 

It came to the forefront of electronics a bit later.

Before the arrival of the microcontroller, Logic Gates were used to perform Boolean logic functions (which is the basis of digital electronics).  

These logic gates were built using Transistors. A large assembly of logic gates would form many digital circuits (which meant many transistors). 

Later, with the invention of Integrated Circuits, many transistors could be fitted onto a single chip (this meant a reduction in size of digital circuits).

By the early 1970’s these integrated circuit chips could hold as many as 10,000 transistors. This crucial advancement in digital electronics is what made the invention of the microcontroller possible. 

The first microcontroller

We can thank one Gary Boone, who worked for Texas Instruments for giving the world the first ever microcontroller in the early 1970s.

He designed and created an integrated chip that had over 5000 transistors, 3000 bits of program memory, and 128 bits of access memory. 

This meant it but could be programmed to have a variety of functions. 

This first microcontroller was called the TMS1802NC.

Over the years, the microcontroller has had further advancement with the help from many different companies. 

In the early 1990’s Electrically Erasable and Programmable Read Only Memory (EEPROM), meant that the microcontroller wasn’t limited to one function for its lifetime after it had been programmed.

Now, you could program the microcontroller, erase the current program, and reprogram it multiple times.

Application of a microcontroller

At the start I briefly mentioned some of the applications of the microcontroller. But, those are just a few of the many applications. 

Rather than name every single device that uses a microcontroller, I will name the main fields under which devices are most likely to use them.

Note, this isn’t an exhaustive list by any means. These are just the most common. 

Let’s take a look! 

Application #1 of a microcontroller: Consumer Electronics

First on the list is Consumer Electronics.

Consumer electronics is a term that defines electronic equipment that is used on a daily basis (mostly in one’s own home).

This is a very broad term that encompasses many other categories such as Entertainment, Communication, Recreation, Kitchen Appliances, etc. 

Consumer electronics are often referred to as ‘black goods’ due to their electronics being housed in a dark casing. 

Below are some example of consumer electronics that would have a microcontroller;

  • Radio
  • Microwave
  • Television
  • Heater/ Fan
  • Calculator
  • MP3 Players
  • Kindle
  • Christmas lights 
  • 3D Printers

Application #2 of a microcontroller: Medical

The Medical field has benefited immensely from using microcontrollers. 

As you can imagine, medical practices before the advent of the microcontroller would have been quite primitive. 

Also, we have all heard the phrase ‘prevention is better than cure’. In the medical applications this means that if you can find a problem at the early stages, you have more chances of eliminating it.

While us humans have amazing abilities, and intelligence, there is a limit to what we can detect within a human body. 

Microcontrollers, along with other technology enable us to be able to detect a disease with a human body before it is too late. 

These devices include;

  • X-ray
  • Magnetic Resonance Imaging (MRI)
  • Electrocardiogram (EKG)
  • Computed Tomography (CT scan)
  • Sonography (Ultrasound imaging)
  • Heart rate monitors
  • Blood pressure monitors

As well as detection, microcontrollers are used in medical devices to help perform the functions of organs that might have deteriorated with time, are not working right, or might have been damaged. Devices such as;

  • Dialysis machines (performs function of liver)
  • Pacemakers (used to control abnormal heart rhythm)
  • Hearing aids
  • Robotic prosthetic limbs
  • Glucose monitoring systems (for Type 1 Diabetes)

Microcontrollers can also now be found in the surgery room. Robots are used to help surgeons with many different types of surgeries.

Application #3 of a microcontroller: Entertainment

In the age before electronics and microcontrollers you might have been limited to a few activities to help pass your time. Things like reading a book, going for a walk, playing the guitar, playing hide and seek, etc (Not that any of these are bad).

Nowadays, we are all spoiled with a plethora of devices to entertain ourselves.

Even before the microcontroller, there were electronic devices which could help entertain and pass your time. 

But, these devices grew not only in quantity, but complexity and quality as well with the help of the microcontroller. 

Your old transistor radio might have been limited to a couple of stations, with subpar sound quality. But, now your digital radio will have the capability to access all stations on the FM and AM bandwidth with superior sound quality, while being able to play CDs as well. 

Below are some examples of electronic devices to help entertain you in one way or another;

  • Television
  • Computer/Laptop
  • Projector
  • Ipad
  • Ipod
  • Digital radio
  • Xbox
  • Playstation
  • Nintendo
  • Kindle
  • Smartphone

Application #4 of a microcontroller: Instrumentation and process control

Instrumentation and Process control is a field of Engineering that deals with control theory. It is used to manufacture equipment to help design, monitor, and control many different processes across many different industries.

These processes ensure that the overall system is productive, efficient, and repeatable. 

The overall system consists of software and hardware which includes, sensors, actuators (mechanical and electrical), and of course a microcontroller. 

For example, in a chemical plant,having a system that monitors the temperature and ensures it stays within defined limits is crucial to avoiding potential disasters such as explosions.

Below are industries that use implement instrumentation and process control;

  • Oil and Gas
  • Petrochemical
  • Wastewater treatment
  • Fabric
  • Food and Beverage

Application #5 of a microcontroller: Communication

Communication is a necessity in everyday life. They say communication is one of the pillars to a happy marriage (so it must be very important!).

We use communication for many different purposes; to share information, make a statement, ask questions, express wants/needs/desires, keep in touch with loved ones, express emotions and much more.

But, most of the time you might not be in the same room with the person you might want to communicate with. 

They might be in another household, city, or country. 

Before you might have had to write them a letter, post it and wait a couple weeks for a reply. 

Lucky for you and me, nowadays, microcontrollers are used in many of these electronic communication devices to allow us to communicate with loved ones, colleagues, strangers, instantaneously, even if they are in another country (they might as well be in the same room as us!).

Devices such as;

  • Smartphones
    • Calling
    • Video calling
    • Texting
    • Email
  • Computers and Laptops 
    • Video calling
    • Email
    • Blogging
  • Walkie talkies
  • Telephones
  • Fax machines 

Application #6 of a microcontroller: Office

Whether you are an Accountant, Engineer, IT specialist, Receptionist, work in Human Resource, etc, you will more often than not be working in an office environment. 

This is the space where you carry out your daily tasks which help take the company you work for closer to their goal whatever it may be.

These tasks might be specific to your job, or might be similar across different disciplines. 

There are a myriad of electronic equipment which have microcontrollers to help you complete tasks in a more efficient manner (helping keep your boss happy).

Each different device has a specific ability to complete a specific task. Below are some of the most common devices that have microcontrollers  which you would find in an office setting;

  • Scanners
  • Printers
  • Paper shredders
  • Laminators
  • Calculators
  • Projectors
  • Binding machines
  • Automatic staplers (in case you have a lot of stapling to do)

Application #7 of a microcontroller:  Kitchen

Imagine having to wake up, go outside, collect firewood, start a fire, and then prepare your breakfast. These are a lot of steps to just make an omelette. 

Also, imagine having to repeat the process for lunch and dinner. This would get annoying quite fast.

Luckily, people realised this early on and created devices that are much more efficient at preparing and making food and drinks in the kitchen.

These days our kitchens are filled with appliances that make many cooking tasks much more efficient as well as tasks that we might not be able to accomplish, like preserving food. 

Common kitchen appliances include;

  • Microwaves
  • Ovens
  • Toasters
  • Refrigerators 
  • Coffee machines
  • Blenders
  • Air fryers 

Application #8 of a microcontroller:  Housekeeping

There are many mundane tasks that we need to carry out around the house.

Tasks like washing the clothes, drying the clothes, washing the dishes, cleaning the floor, cleaning the toilet, and the list goes on.

Without sounding like a broken record, we are blessed these days with electronic devices that help make these mundane tasks, well, less mundane! 

Devices such as;

  • Washing machines
  • Dryers
  • Dishwashers
  • Vacuum cleaners 

Application #9 of a microcontroller:  Safety

Unfortunately, the world is filled with many dangers.

But, we cannot live our lives scared all the time of every danger that exists. This is not what living should be. 

However, having systems in place to ensure that we are aware of dangers, or when a danger is imminent, is the best way to avoid injury or death. 

Since we are limited by our sensing abilities, we can harness the power of the microcontroller to help us stay one step ahead of the game. Technologies such as;

  • Fire alarms
  • Smoke alarms
  • Security systems
    • PIR sensors 
  • Gas monitoring systems 

Application #10 of a microcontroller:  Transportation

Whether you need to go to your local grocery store, across the ocean to another country, and now even space, you can do so thanks to the advancement in Transportation

Microcontrollers are used extensively within sub-systems of  cars, motorbikes, boats, ships, trains, aeroplanes, spaceships, for a variety of different functions (safety, guidance, monitoring, etc). 

Below are some subsystems for the different transportations, that use microcontrollers;

  • Guidance
    • GPS
  • Safety 
    • Airbags
    • Automatic braking system (ABS)
  • Monitoring
    • Temperature levels
    • Oil levels
    • Speed
    • Distance
    • Acceleration
  • Entertainment 
    • Radios
    • CD players
    • Televisions
  • Communication
    • Bluetooth
    • Wi-Fi
    • Radio

Main purpose of a microcontroller for these applications

But, what is the main purpose of using a microcontroller for these applications?

As I mentioned earlier, the microcontroller has the main task of making computations and controlling tasks much like a traffic cop directing traffic.

A better analogy and way to visualise this is the human body. 

So, the human body will represent an electronic system. It has many inputs (senses), outputs (muscles), and other subsystems (organs such as the heart, liver, kidney, etc).

The brain is one of the most important pieces of the human body (the other being the heart of course). The brain best represents the functionality of the microcontroller.

It receives signals from your senses, and sends signals to other parts of the body like the organs and muscles, controlling the overall operation.

An embedded system is the combination of hardware and software components. 

Microcontrollers are used in the exact same manner in embedded systems in many of the applications we just covered. 

They ensure that all parts of the system work cohesively to achieve what that specific system was created to do. 

The flowchart above shows the typical flow of information within an embedded system. 

Different manufacturers of microcontrollers

Even though the first microcontroller was created by Texas Instruments, there have been many other companies who were part of the initial race to create the first microcontroller, as well as others who joined later on.

While the overall purpose of each microcontroller stays the same, the Architectures on which they are built on will vary across different manufacturers.

There are two main architectures which microcontrollers are built on; Harvard and Von-Neumann.

Harvard Architecture  defines separate memory spaces for program and data which allows both to be accessed at the same time. 

Whereas in the Von-Neuman architecture, data and programs are stored in the same memory space. 

Also, there are many other microcontroller features such as number of inputs, outputs, Timers, etc,  (which will be discussed in more detail in  the next section) which will vary from one manufacturer to the next. 

Below are the different manufacturers of microcontrollers;

Texas Instruments

First on the list has to be Texas Instruments. Their microcontrollers range in 16-bit and 32-bit options, which are high-performance and low in power consumption. They are also available in wired and wireless options. There are a range of software and development tools to help you implement your ideas faster. 

Cypress semiconductor

Cypress semiconductor offers low-power and high performance microcontrollers tailored towards consumer, industrial, and automotive applications. 

Infineon

Infineon is one of the leading companies in the microcontroller scene based in Germany. They create 32-bit microcontrollers which are ideal for connectivity, safety and security.  

Maxim Integrated

Maxim Integrated develops robust 32-bit microcontrollers for Internet Of Things (IOT) applications. Their microcontrollers offer the biggest memories with efficient power management They also integrate high cryptography for high levels of security. 

Microchip

Microchip are at the forefront of the development of microcontrollers which offer a range of options which include 8-Bit, 16-Bit, and 32-Bit. They provide many software libraries and design options making them a first choice for many customers.

NXP

NXP also offers 8-bit, 16-bit, and 32-bit microcontrollers, which combine the technologies of Kinetis and LPC. 

ON semiconductor

Have a range of 8-bit and 16-bit microcontrollers for general and specific applications. Applications like Radio Frequency applications because of their ultra-low power consumptions.  

Panasonic

A well known name for many electronic devices, Panasonic also manufactures microcontrollers. They are used for many different applications as they combine high performance and low power consumption. 

STMicroelectronics

Another dominating name in the industry, STMicroelectronics provides a large portfolio of microcontrollers which are very robust. Features include power, efficiency, security, high performance and scalability. 

Features of a microcontroller

Microcontrollers come in a variety of shapes, sizes, as well as features. 

These features are crucial in choosing the right microcontroller for the right applications.Let’s take a brief look at the different features.

CPU size

We now know that a microcontroller consists of a CPU, memory, and other various peripherals all contained within a single chip. 

The first major feature when looking at a microcontroller is its CPU Size, which refers to the bit-width.

In the early days, you were limited to 4-Bit microcontrollers which meant they had a 4-Bit CPU. But, what does having a 4-Bit CPU mean?

This meant that operations were carried out using 4-bit numbers, variables were stored in 4-bit blocks, and inputs/outputs were accessed via 4-bit data busses. 

Nowadays microcontroller CPU sizes are available in 8-Bit, 16-Bit, 32-Bit and 64-Bit

Clock frequency

If we break down the microcontroller into modules, you would see that it is composed of digital circuits. There are two types of digital circuits; Combinational and Sequential.

The digital circuits inside a microcontroller are Sequential

In order to function properly, these sequential circuits require a Clock

The main job of the clock is to manage the operations between different blocks within the microcontroller such as the CPU, memory, and peripherals (just like a microcontroller has the job of managing the operations of an embedded system). 

The Clock Frequency is the speed at which the microcontroller is able to manage these operations.

Instructions are executed at every ‘tick’ of the microcontroller clock. So, the higher the clock frequency, the faster that instructions can be executed. 

So a microcontroller with a clock frequency of 1MHz is able to complete 1 million instructions per second. 

Common clock frequencies of microcontrollers 1MHz, 8MHz, 16MHz, and 32MHz. 

Memory

Another major building block, Memory is a crucial part to every microcontroller. Memory is used to store data such as program code, and variables. 

There are two two types of data; data that does not change and data that changes during program runtime.

A microcontroller will typically have three different types of memory; SRAM, FLASH and EEPROM to accommodate these two types of data. 

SRAM (static random-access memory) – This type of memory holds data that can be accessed and changed during runtime. SRAM is volatile memory which means that when power is removed, all data stored in SRAM is lost. 

FLASH  – Holds memory that does not change and  is where the program memory is stored. 

EEPROM (Electrically Erasable Programmable Read Only Memory) – EEPROM is similar to SRAM, in that it can be accessed and changed during runtime. However, this type of memory is non-volatile, which means that the data remains even after power is removed. 

GPIO ports

An input device sends information to a microcontroller, whereas information is sent to an output device to control it.

There are a multitude of input and output devices that can be interfaced to a microcontroller;

Inputs such as buttons, switches, sensors, variable resistors, and outputs such as motors, Light Emitting Diodes (LEDs), Liquid Screen Displays (LCDs), etc. 

The microcontroller has General Purpose Input Output (GPIO) ports that these I/O devices are connected to.

GPIO ports of a microcontroller are Bi-Directional which means that they can be programmed to be either an input or output.  

Note, these ports are limited to the amount of current they can sink (as an input) and source (as an output). You will need to consult the microcontroller’s datasheet to check these values. 

Timers

Timing is crucial in all aspects of life.

It governs how long our workdays are, how long we exercise for, flight departures and arrivals, when to eat food, and so much more.

Timing is also crucial when it comes to microcontrollers.

Timers are modules within a microcontroller which are used for setting precise delays, calculating time between events (internal and external), and generating PWM.

They are linked to the system clock we saw earlier. However, with the help of something known as a prescaler, the main clock speed can be scaled down to generate slower speeds.

Most microcontrollers come with a 16-Bit and an 8-Bit timer.

16-Bit timers count up to a digital value of 65535, and 8-Bit timers count up to 255.

16-Bit timers have a greater resolution which gives you more options for the number of delays you can generate.

ADC and DAC

One of the many input devices that are used with microcontrollers are Sensors.

Sensors have the ability to detect changes in the real world and provide an analog voltage at its output (which is sent to the microcontroller).

For example, a temperature sensor detects changes in the ambient temperature and outputs an analog voltage accordingly. 

However, microcontrollers are devices that only deal with digital data. For that reason, it has a module known as an Analog to Digital Converter (ADC).

As the name might suggest, it takes an analog voltage and converts it to a digital value which the microcontroller can use for further processing. 

On the other side, you might want to take a digital value and convert it to a digital value. This can be done with the help of a Digital to Analog Converter (DAC).

PWM outputs 000 

Pulse Width Modulation (PWM) is the process of being able to generate different levels of an output signal.

This is achieved by varying the ratio (which is known as the Duty Cycle) of time that a signal is ‘on’ vs the time that it is ‘off’. PWM signals are square waves. 

PWM has many applications, with the main ones being; motor speed control, and brightness control of Light Emitting Diodes. 

As we saw earlier, the Timers have capability to generate PWM. A microcontroller also has designated PWM output pins where you connect outputs such as motors, and Light Emitting Diodes. 

Serial communication

While the microcontroller is a stand alone device, sooner or later it is going to need to communicate with peripheral devices (Liquid Crystal Displays, Bluetooth modules, accelerometers, etc), as well as other microcontrollers. 

There are two ways of communication; Parallel and Serial.

Parallel communication involves transferring 8-Bits of data at the same time, across eight individual data lines to parallel input/output devices.

This method of communication is faster, however it has notable disadvantages;

  • It requires more wiring which adds to the overall costs
  • Distance is limited due to the number of wires required
  • Susceptible to noise as wires are in close proximity 

Serial communication transfers one bit of data at a time. While this is slower, it solves many of the problems associated with parallel communication mentioned above. 

A microcontroller is limited by the number of pins it has, so serial communication is ideal when it comes to designing a system.

There are two main types of serial communication; Asynchronous and Synchronous.

Asynchronous serial communication is not synced with the main clock (data transfer happens at random time intervals). The Universal Asynchronous Receiver Transmitter (UART) is the most common method that a microcontroller uses for asynchronous serial communication. 

Synchronous serial communication is synched with the main clock (data transfer happens at known time intervals). Inter-Integrated Circuit (I2C) and Serial Peripheral Interface (SPI) are two common protocols that a microcontroller utilises for synchronous serial communication. 

Internal and External interrupts

Interrupts are certain conditions that cause the microcontroller to temporarily jump out of the normal program and execute the code within the interrupt. 

Interrupts can be caused by Internal or External circumstances.

Internal interrupts are when a certain condition is met within the microcontroller modules. For example, if you are using an 8-Bit timer to count to a certain value, there is a certain interrupt called Compare Match specific for the 8-Bit timer that is executed when the timer value ‘matches’ the value you set.

External interrupts are when certain physical events occur outside of the microcontroller at one of its pins (a microcontroller will usually have a couple pins dedicated for external interrupts). These events could be things like a ‘button press’. 

Sleep modes

Last on the list of notable features of a microcontroller are Sleep Modes.

You might be wondering, why the heck does a microcontroller have sleep modes? It’s a machine, it should be able to work overtime all of the time!

However, sleep modes are an essential to microcontrollers. 

The main purpose of them is to conserve energy. 

If you are designing a portable embedded system that runs off disposable or rechargeable batteries, every bit of battery power is going to be crucial to extending the life of the battery. Sleep modes allow you to power down modules of a microcontroller when not needed so they do not consume valuable power. 

Below are some common microcontroller sleep modes;

  • Doze
  • Idle
  • Sleep
  • Low voltage sleep
  • Deep sleep

How do you select the best microcontroller for an application?

So, you saw the many different applications that a microcontroller is used for. But, how do you select the best microcontroller for the job?

There isn’t one specific type of microcontroller that is going to suit all types of application. Every microcontroller will have its own set of pros and cons depending on the application. 

We just saw that microcontrollers come in a variety of features. Some might have more memory than others, some might have faster clock speeds, more ADCs, etc. 

Depending on the needs of the application, a certain microcontroller with a certain set of features might be a better option than another which has a different set. 

For example, if your system needs to do a lot of processing, it will need a bigger CPU and faster clock speeds. 

Or, you might be interfacing a lot of sensors, so your microcontroller will need to have multiple ADC channels.

It all comes down to the design criteria of the application and what features the microcontroller offers to meet those criteria. 

Other alternatives to using a microcontroller for an application

This article covers microcontroller applications. However, a Microprocessor is another device similar to the microcontroller that could be used for many of these applications.

But, what is the difference between a microcontroller and microprocessor? 

The main difference is that a microcontroller is a device that contains the CPU, Memory, Peripherals, all on one chip. 

Whereas, a microprocessor chip only contains the CPU. The memory, and peripherals come on separate chips that have to be interfaced with the microprocessor. 

Each has their own advantages and disadvantages which will make them appropriate for a certain application. 

Microcontrollers cost less, and consume less power, while  Microprocessors have faster processing speeds. 

Do you always need a microcontroller for an electronic application?

Again, this question comes down to the needs of the application.

Microcontrollers are used for applications where complex and complicated tasks need to be done. 

However, an application or project might require a task as simple as blinking an LED. In this instance using a microcontroller would be overkill.

You could just use a 555 Timer IC to blink an LED. 

It would be analogous to using a saw to cut a piece of paper (where scissors would do the job just fine).

So, before using a microcontroller for a project, see whether its features and abilities are really needed and  whether there is another easier way of achieving that particular task.

The post Application of a microcontroller - 10 most common appeared first on Electronic Guidebook.

]]>
1025
11 advantages of an AVR microcontroller https://electronicguidebook.com/11-advantages-of-an-avr-microcontroller/?utm_source=rss&utm_medium=rss&utm_campaign=11-advantages-of-an-avr-microcontroller Sat, 05 Dec 2020 00:31:50 +0000 https://electronicguidebook.com/?p=572 You might already know about AVR microcontrollers, or you might have just stumbled upon them. If you are wanting to make the switch to an AVR microcontroller but are not convinced yet of what the big deal about is with them, below are some of the many advantages of an AVR microcontroller Price Easy to […]

The post 11 advantages of an AVR microcontroller appeared first on Electronic Guidebook.

]]>
You might already know about AVR microcontrollers, or you might have just stumbled upon them.

If you are wanting to make the switch to an AVR microcontroller but are not convinced yet of what the big deal about is with them, below are some of the many advantages of an AVR microcontroller

  • Price
  • Easy to use
  • Readily Available
  • Community (Tutorials, resources, forums etc)
  • Fast
  • Different types of boards depending on your needs
  • Many different Peripherals
  • Easy to program
  • Extensive detailed datasheets
  • Easy to set up
  • Onboard memory 

I will give a more detailed explanation of each advantage further in this article.

 While there are many more advantages, these are the most notable ones. 

What is an AVR microcontroller 

Let’s take a brief look at the AVR microcontroller.

The AVR microcontroller was first developed in the late 90’s by a company known as Atmel. However, in 2016 they were acquired by Microchip

They were the first set of microcontrollers to use on chip flash memory for program memory. 

AVR microcontrollers are most commonly used for embedded applications, and have been popularised by the Arduino Development Boards,(most predominantly the AT Mega 8).

They are the go to microcontroller for beginners to experts, being used in DIY and Industrial applications.

The AVR family is comprised with a series of microcontrollers listed below;

  • tinyAVR
  • megaAVR
  • XMEGA

Of the many options, these three are the most popular of the series of AVR micrcontrollers used. 

11 advantages of an AVR microcontroller

Ok, let’s take a look at the many advantages of AVR microcontrollers. Whether you have never used them before or you are just curious to know, it will benefit you to know the advantages. 

Advantage #1 of an AVR microcontroller: Price

No matter what you are buying, you want the best price to quality ratio (or as I like to call it, the Golden ratio)

What I mean by this is that you don’t want to spend a lot of money on something which isn’t of great quality. 

Also, it would be nice to pay the least amount of money for something of great quality. 

In life you might seldom stumble upon gems which meet the Golden Ratio. Things that don’t break the bank but still provide great value for a long time. 

The AVR microcontroller is one of those gems that has the perfect cost to quality ratio. It is decently priced while still delivering on functionality. 

Advantage #2 of an AVR microcontroller: Easy to use

I will approach this advantage from two vantage points. 

One as a beginner, and the second as the expert.

For the beginner who is just starting to get into the world of microcontrollers, you want a microcontroller that is easy to use. The last thing you want is to spend years learning how to use it.

From the eyes of the expert (say an engineer), who is prototyping a project that involves a microcontroller. 

However, this engineer only has a little knowledge using microcontrollers, he or she will want to be able to use a microcontroller with a little small learning curve as they do want to spend all their time learning how to use the microcontroller, but rather get stuck into finishing their project.

The AVR microcontroller is perfect for both parties as it is easy to use. It has a small learning curve allowing you to get stuck right into the fun stuff.   

Advantage #3 of an AVR microcontroller: Availability

The third advantage of the AVR microcontroller is Availability.

So we know the AVR microcontroller is reasonably priced and easy to use, but imagine if it was impossible to get your hands on, that would be utterly pointless.

In this day and age we are lucky to live with the Internet where you can buy things online with a click of a button. 

However, even then it can be hard  getting certain products, especially if you live in far away countries.

I live in New Zealand! The far corner of the world! 

Trust me trying to get some items shipped to New Zealand can be near damn impossible. 

Fortunately for me, the AVR microcontroller is not one of those items! 

I have access to it online as well as physical stores not too far from where I live. 

Advantage #4 of an AVR microcontroller: Community

No matter what hobby we might start, we all start as amateurs. 

Back in the earlier days of microcontrollers when the internet was at its infancy, the path to learning how to use microcontrollers would have been a bit harder.

You would either have to go to university to learn how to use them, read thick books about microcontrollers, or spend many hours using trial and error. 

If you are starting out learning how to use AVR micrcontrollers now, you have hit the jackpot!

The AVR microcontroller community that has grown online to this date is massive. There are people with years of experience who are willing to help you with any problem you might be having.

Also, there are a plethora of resources available ranging from video tutorials, projects, example codes, theory and many more to help you get started.

So, if you ever get stuck, look to the AVR community who are there to help you solve any problem. 

Advantage #5 of an AVR microcontroller: Range of Speeds

Now we come to the technical advantages of an AVR microcontroller. 

The first of them being speed.

Every microcontroller has a clock which is needed for timing control. The rate at which instructions are carried out is determined by the speed of the clock.

The higher the speed the faster that instructions are carried out and vice versa. 

The initial assumption is that the faster the clock speed the better. But, it all depends on the application’s needs. 

For example, if you have a weather station, where data is only processed every 24 hours, you do not need high clock speeds.

So it is all application dependent.  

The great thing about AVR microcontrollers is that they come in a range of clock speeds

Advantage #6 of an AVR microcontroller: Range of Microcontroller options

As I mentioned earlier, there are many different groups of microcontrollers within the AVR family. 

You are not restricted to one specific AVR microcontroller of one specific size, set of peripherals, speed, number of input/outputs etc.

AVR micrcontrollers come in a range of options that vary in size and functionality. 

Also, depending on the specifications of your project/application, each microcontroller comes with a unique set of peripherals.

Your project might only involve blinking an Light Emitting Diode (LED). In this instance you do not require a 40 pin microcontroller of high speeds to perform the job. 

That would be overkill!

Lucky for us, there are many AVR microcontrollers to choose from. 

Advantage #7 of an AVR microcontroller: Broad set of peripherals

One of the main purposes of a microcontroller is to be able to interact with the physical world.

Whether you are receiving sensor information, controlling the speed of a motor, reading button presses, displaying information on an LCD and much more. 

Peripherals are parts of the microcontroller that interfaces with the world outside of the microcontroller and help you perform functions mentioned above.  

Below is a set of common AVR microcontroller peripherals.

  • GPIO (General Purpose Input/Outputs)
  • ADC (Analog to Digital Converter)
  • DAC (Digital to Analog Converter)
  • Serial Communication
    • I2C (Two wire interface)
    • SPI (Serial Peripheral Interface)
    • USART (Universal Serial Asynchronous Receiver Transmitter)
  • Timers
  • PWM (Pulse Width Modulation) 

AVR microcontrollers have a broad set of peripherals to choose from. 

Advantage #8 of an AVR microcontroller: Easy to program

Programming a microcontroller involves a number of steps which include;

  • Writing the code in an IDE (Integrated Development software)
  • Compiling the code to a file which gets burned onto the microcontroller (typically a .HEX file)
  • Then finally sending that file to the microcontroller using an AVR programmer and an IDE capable of programming the microcontroller. 

Sometimes the process of writing code, compiling it, and then burning it onto a microcontroller can be more complicated than it should be.

However, AVR has made it easy for you, me and everyone else to write a program and then program the microcontroller. 

It has its own dedicated IDE (Atmel Studio), where you can write, debug and program your microcontroller. 

AVR also has its own programmer which does not require an engineering degree to set it up. 

Advantage #9 of an AVR microcontroller: Little needed for microcontroller setup

While we are on the topic of setting up, you might be wondering what it takes to set an AVR microcontroller.

Not much is the answer.

The last thing you want to spend your time on is setting up the microcontroller. You want to be able to get to the fun stuff as soon as possible.

Setting up a microcontroller only requires a breadboard, a couple of capacitors, hookup wire, and a supply voltage (which can be a couple of AA batteries).

Note, this setup is only applicable for temporary purposes. If you need a more permanent setup you will require a printed circuit board and will have to solder.

Advantage #10 of an AVR microcontroller: Onboard memory

Memory is a very important aspect of any microcontroller. 

It’s the place where you store the program code, as well as temporary and permanent variables. 

Some microcontrollers do not have on board memory, which means they come as separate modules that you have to interface with. 

This is a waste of time and money. 

So, having onboard memory is a great advantage as you do not have to go through the whole process of setting up external memory. 

Advantage #11 of an AVR microcontroller: Extensive Datasheets

The last and final advantage of an AVR microcontroller is it’s datasheet. 

Most (if not all) electronic devices and components come with some sort of datasheet, or manual that has instructions on how to use it.

But, who enjoys reading manuals! 

In this instance it is important as it not only has information on how to use it, but also what are the ideal practices when using a microcontroller to ensure a long lifespan.

AVR microcontroller datasheets are very detailed containing everything you need when starting out, or when you get stuck. 

So, before seeking the help of the AVR community, check the AVR microcontroller datasheet first.

Different types of AVR microcontrollers

There are three major subsets of families when it comes to AVR microcontrollers;

  • tinyAVR
  • megaAVR
  • XMEGA

Within each family group are many more versions of microcontrollers.

For example, the tinyAVR family has microcontrollers that include the AT Tiny 25, AT Tiny 45, AT Tiny 85, just to name a few. 

Each family of these families of AVR range in size, memory, peripheral set etc. 

So, depending on your needs, there is an AVR microcontroller to solve your problems. 

Which is the best AVR microcontroller

You now know that there are many different AVR microcontrollers available that can meet many of your needs. 

But, with most things there are the ones that stand out amongst the rest. 

AVR has a few microcontrollers that are better than their peers (this is according to my own experience as well as research done online).

These include:

  • AT TINY 25
  • AT MEGA 8
  • AT MEGA 32

For a more detailed explanation on why I chose these three microcontrollers click here.

The post 11 advantages of an AVR microcontroller appeared first on Electronic Guidebook.

]]>
572
3 best AVR microcontrollers https://electronicguidebook.com/3-best-avr-microcontrollers/?utm_source=rss&utm_medium=rss&utm_campaign=3-best-avr-microcontrollers Sat, 21 Nov 2020 01:19:24 +0000 https://electronicguidebook.com/?p=561 Whether you are buying a new car, or a new house, trying to find the best one that meets your needs can be a daunting task. Trying to find the best AVR microcontroller is no different.  But, every AVR microcontroller has its own advantages in different applications, so there isn’t one that is the best […]

The post 3 best AVR microcontrollers appeared first on Electronic Guidebook.

]]>
Whether you are buying a new car, or a new house, trying to find the best one that meets your needs can be a daunting task.

Trying to find the best AVR microcontroller is no different. 

But, every AVR microcontroller has its own advantages in different applications, so there isn’t one that is the best compared to the others. 

However, there are a handful of AVR microcontrollers that stand out amongst the rest. 

They have been chosen as the ‘best’ because they meet many factors that make them stand out above the rest. Factors like price, ease of use, amount of memory, availability etc.

The three best AVR microcontrollers are:

  • AT TINY 25
  • AT MEGA 8
  • AT MEGA 32

While there are plenty of AVR microcontrollers, these three give you the most bang for your buck. 

If you want to know why these three microcontrollers have made the cut and got the title of ‘Best AVR microcontroller’ read on for more explanation.

What is an AVR microcontroller

Like there are many manufacturers of cars, in the world of microcontrollers, you have a range of microcontroller manufacturers to choose from as well. 

The major players in the field of microcontrollers include:

  • Microchip
  • Atmel
  • NXP
  • Texas instruments
  • STMicroelectronics

The AVR microcontroller is a family of microcontrollers developed by ATMEL who started manufacturing them in 1996.

However, Atmel has since been acquired by Microchip in 2016. But, the AVR family of microcontrollers are still being manufactured by Microchip.

They are built on a modified Havard architecture. It is modified in the sense that the conventional Harvard architecture doesn’t allow the contents of the instruction memory to be accessed as data. 

AVR microcontrollers were one of the first to utilise on-chip flash memory for program storage. 

Due to their ease of use, and price they are commonly used by many hobbyists and makers. They are also used for educational embedded purposes. 

What features does an AVR microcontroller have

Going back to my analogy of buying a car, knowing the features of the car will give you an indication of which car is best for you.

Features like power steering, cruise control, rear or front wheel drive, bluetooth audio system, cup holders etc.

The same holds true for features of AVR microcontrollers. Knowing what the different features are available will help you choose the best one to meet your needs. 

Below are some of the many features available for AVR microcontrollers which are beneficial in many different ways.

Note, if you already know the features of AVR microcontrollers and are only concerned with which is the best, you can skip this section. 

Memory

Imagine not remembering what you did yesterday, or the date of your partner and your wedding anniversary (this is not going to make them happy).. 

Our memory serves us in more ways than one. From remembering what we have learnt, to important dates, peoples names, where we kept the house keys etc.

The memory of an AVR microcontroller serves it in more ways than one as well.

It helps it remember (store) things like variables, program code, sensor data etc.

An AVR microcontroller has three types of memory; FLASH, RAM, and EEPROM.

FLASH – This type of memory is known as ‘non-volatile’. What this means is that what data is stored in this section of memory is not lost when power is removed from the microcontroller. Therefore, this type of memory is used for storing program code (set of instructions) written by the programmer.

RAM (Random Access Memory) – Memory in RAM is ‘volatile’. Unlike FLASH memory, when power is removed from the microcontroller, data stored in RAM is lost. This type of memory is used to store variables that are generated during program runtime. 

EEPROM (Electrically Erasable Programmable Read Only Memory) – This type of memory is ‘non-volatile’. However, reading and writing to the EEPROM is much slower compared to FLASH memory. Things that are more permanent, like sensor data, and device parameters are stored in EEPROM where they can be accessed later. 

General Purpose Input / Output (GPIO) pins

The main premise of a microcontroller is to be able to interface with inputs and outputs external to it while having the ability to control them. 

There are a huge range of input/outputs that are available which include things like, motors, buttons, Light Emitting Diodes, Sensors to name a few.

The AVR microcontroller has a set of GPIO pins that allow you to connect these input/outputs and control them.

The number of input/output pins largely depends on the physical size of the microcontroller.

The great thing is that any single pin has the ability to be either an input, or an output which can be changed during runtime by the user. 

Analog to Digital Converter (ADC)

The GPIO pins control outputs or receive digital input values that are either HIGH (+5V) or LOW (0V). 

Some inputs like sensors, provide an analog value at the input which range in value from 0 – 5V. 

For example, a temperature sensor might output a voltage at 2.42 volts.

But, a microcontroller is a digital device that deals with digital values.So, how does it interpret these analog values?

Lucky for us, an AVR microcontroller has something known as the Analog to Digital converter. 

As the name suggests, it takes these analog voltage values from the sensor and converts it to a digital value which the microcontroller can then interpret. 

Timers

Another important aspect of an AVR microcontroller are its Timers. 

It is a clock that has the main purpose of measuring time intervals. However, it can either be used as a Timer or a Counter. 

When it functions as a Timer, you can think of it as a stopwatch which is used to measure time intervals between two specific events. 

When used as a Counter, the Timer can store how many times a certain event occurs (mostly events external to the microcontroller).

The Timer can also be used to generate delays and PWM signals.

Pulse Width Modulation 

Imagine driving a car that only had one speed without the ability to slow down or speed up. 

This would be quite frustrating and pointless!

Pulse Width Modulation (PWM), is a way that lets you control the speed of a motor by varying the power that the motor receives using PWM.

Your next project might be something like a remote control car, or fan which requires speed control.

AVR microcontrollers have PWM channels on designated pins which you can connect a motor to (in conjunction with a motor controller) and vary its speed. 

PWM can also be used to control the brightness of Lights such as Light Emitting Diodes by again varying the power that the light receives. 

Interrupts

AVR microcontrollers are fast devices that are capable of fast execution speeds. 

But, even they get overwhelmed with tasks! (this is all relative of course).

Due to this, AVR microcontrollers have a feature known as Interrupts

An interrupt allows the microcontroller to carry on with its normal program tasks, but alerts the microcontroller when certain events/statements occur.

These events can be generated internally (via software) or externally (through special designated External Interrupt pins). 

An example of an internal interrupt could be a Timer reaching its maximum value which would trigger a routine specific to that event. 

External interrupts routines are generated externally at the microcontroller’s pin when it goes High, Low, or has any change in logic state. 

For example, a button could be connected to one of these designated pins and when pressed (either causing state levels to go High or Low) trigger an external interrupt service routine. 

Sleep Modes

Many embedded microcontroller applications are remote/mobile and require the use of battery power. 

This causes many problems, with the main one being battery power is limited. So, the main issue is to be able to design a system that can last as long as possible avoiding always having to replace batteries.

AVR microcontrollers have Sleep Modes, which give them the ability to enter a state where they consume less power, but can still perform their main operations.

It can have up to five sleep modes!

Idle mode – In this mode, the CPU is halted and stops functioning. However, peripherals such as Serial Interface, Timer/Counter, Watchdog and Interrupts, continue to operate as normal.

ADC Noise reduction Mode – Stops the function of the CPU, but ADC, external interrupts, Timers and watchdog continue to operate.

Power Down mode – External Interrupts, watchdog and two-wire interface are the only things that function power down mode. 

Power Save mode – This mode is used when the Timers are set up to run asynchronously. 

Stand by mode – The oscillator is allowed to run while all other operations are stopped.

Serial Interface

The last major feature of AVR micrcontrollers is the Serial interface.

Humans communicate with each for many different reasons. Whether it be about new ideas we have, how we are feeling, instructions that need to be taught, passing on knowledge and so on.

Animals, from all areas of life communicate as well. 

We can communicate a number of different ways which include verbal or non-verbal. 

But, communication is not just limited to just humans and animals. AVR microcontrollers have the ability to communicate with other microcontrollers, and peripheral devices too. 

Data can be sent or received.

There are three common communication protocols used by AVR protocols; Serial Peripheral Interface (SPI), Two wire interface (TWI) and Universal Synchronous and Asynchronous Receiver Transmitter (USART).

Choosing the best AVR microcontroller depends on your needs

You might be wondering why I listed all the different features of an AVR microcontroller. 

The thing is that AVR microcontrollers come in a range of sizes, and specifications. So, choosing the best AVR microcontroller comes down to your needs/ wants, as well the needs of the application you will be using if for. 

Types of AVR microcontrollers

Let’s take a closer look at the AVR family of microcontrollers.

The  three most common sets of the AVR family include the tinyAVR, and megaAVR.

Below is a table highlighting things like program memory, peripherals, and number of pins for the three families. 

tinyAVRmegaAVR
Program Memory0.5 – 32 (KB)4 – 256 (KB)
Pin package6 – 3228 – 100
Peripheral setLimited peripheral setExtensive peripheral set

Within each of these three sets of AVR microcontrollers exist even more variations. 

 For a list of tinyAVR microcontrollers click here.

For a list of megaAVR microcontrollers click here.

7 Factors that determine which is the best AVR microcontroller 00 

Now that we know the two main types of AVR families, as well as the different types of features that they can have, let’s take a look at factors that determine which is the best (remembering to take into account the application the AVR microcontroller will be used in).

Factor #1: Memory

The first factor we will take a look at when considering which is the best AVR microcontroller is Memory. 

The main thing we are concerned with is how much memory the microcontroller has. 

If you are writing a program that just blinks an LED every 2 seconds you are not going to require much memory. However, if you are writing a program that collects and stores temperature data, you will no doubt require more memory.

So, before buying a microcontroller always consider how much memory you will require. 

Factor # 2: Price

The next factor that should be considered is the Price.

We shop for things everyday, whether it be new clothes, airline tickets for travel, food, etc. 

When paying for something we look for the ‘best’ option that will not drain our bank account. So, there is a sweet spot where what you buy is good quality while still being affordable.

This applies for AVR microcontrollers as well.

It should be affordable enough while still having all the features and functionalities you require. 

Factor #3: Ease of use

You might be a beginner who just wants to start your first project, or you might be an experienced engineer who is doing some prototyping on a new product and needs to meet his/her deadline. 

Either way, you do not want to spend all your time setting up, or learning how to use the AVR microcontroller. 

So, you want a microcontroller that is easy to use and understand while still being functional. 

Factor #4: Community

In life, we rarely do things by ourselves. 

People assume many  breakthroughs in science, engineering, medicine, were found by one single person. 

The truth is, that the person who eventually found the breakthrough relied on past studies, experiments, and knowledge of other great people. 

I have learned so much about microcontrollers from the community of engineers, makers, DIYers that exist online and offline.  

The great thing about the age we live in is, the Internet and all the resources available at our fingertips. 

There are many communities whose knowledge and past experiences you can learn from and help inspire you for your next great AVR microcontroller project. 

So, having resources and a community for the microcontroller you are using is really helpful.

Factor #5: Peripherals

This factor really depends on what your project/application requires. 

If you are controlling the speed of a motor you will require PWM channels.

Do you need to interface with the real world via sensors? Then you are going to need ADC inputs. 

Have to measure time between events? Then you will require Timers. 

You get the point.

How many PWM channels, ADC inputs, Timers, GPIO pins etc will determine whether you get a bigger or smaller AVR microcontroller. 

Factor #6: Clock Speed

The speed of the internal clock determines how fast the AVR microcontroller executes instructions.

Again, this comes down to the needs of your project. 

Clock speed aspect should never be overlooked when trying to find a suitable AVR microcontroller for your application.

Factor #7: Availability 

Finally on the list of factors that determine the best AVR microcontroller is Availability. 

The AVR microcontroller should be readily available in the place where you are living, or be able to be ordered online and shipped to your residence without you having to sell your left arm.

What’s the use of knowing the best AVR microcontroller if you cannot get your hands on it. 

3 best AVR microcontrollers 

There isn’t a one size fits all kind of AVR microcontroller for every application, however, there are a handful of AVR microcontrollers that stand out amongst the rest. 

The AVR microcontrollers that I have chosen below are due to the fact that they meet many (if not all) of the 7 factors that determine which is the best. 

This list of the best AVR micrcontrollers is compiled based on my experiences with them, as well as research I have done online which is again based on the 7 factors. 

Let’s take a look at the 3 best AVR microcontrollers.

AT TINY 25

First on the list is the AT Tiny 25 which comes from the tinyAVR family set of AVR micrcontrollers.

Of the three microcontrollers, this is the smallest coming in a 8 DIP (Dual inline package, 8 pins in total).

But, do not be fooled by its size!

This little microcontroller is very powerful and capable of meeting many of your needs. 

Below is a table summarizing some of its features

AT TINY 25
Flash Memory2K
EEPROM 128 bytes
RAM 128 bytes
TimersTwo 8-bit timers
PWM2 channels
ADC Four 10-bit ADC inputs
Serial CommunicationSPI, TWI, USART
GPIO6
Clock SpeedMax: 20 MHz | Min: 10 MHz
Sleep modes2

The AT TINY 25 is great if you do not require a big microcontroller, but still need it to have the ability to perform many of the functions of larger microcontrollers. 

AT MEGA 8

Next on the list is the AT Mega 8, which comes from the megaAVR family of AVR micrcontrollers. 

This microcontroller is bigger than the AT Tiny 25 microcontroller, and comes in a 28 DIP package. 

The AT Mega 8 is a popular microcontroller in the Arduino world being used a lot with many of their boards. 

Below is a table highlighting many of its features.  

AT MEGA 8
Flash Memory8K
EEPROM 512 bytes
RAM 1K bytes
TimersTwo 8-bit timers + One 16-bit timer
PWM3 channels
ADC Six 10-bit ADC inputs
Serial CommunicationSPI, TWI, USART
GPIO23
Clock Speed16MHz
Sleep modes3

AT MEGA 32

Finally, to top off the list is the AT Mega 32 which comes from the megaAVR family as well.

The AT Mega 32 is a slightly bigger board compared to the AT Mega 8 coming with 40 pins.

It is like the AT Mega 8’s bigger brother that has more memory, PWM outputs, ADC channels etc.

Below is the table summarizing the AT Mega 32’s features. 

AT MEGA 32
Flash Memory32K
EEPROM 1024 bytes
RAM 2K bytes
TimersTwo 8-bit timers + One 16-bit timer
PWM4 channels
ADC Eight 10-bit ADC inputs
Serial CommunicationSPI, TWI, USART
GPIO32
Clock Speed16MHz
Sleep modes3

There you have it, the top 3 AVR microcontrollers! 

However, I should note again, that these AVR microcontrollers have been selected from my personal experience using them, as well as research done online as they meet many if not all the factors that contribute to a microcontroller being the best. 

The AT Tiny 25, AT Mega 8, and AT Mega 32 are AVR microcontrollers that are reasonably priced, easy to use, have a great community/resources, packed with many features and memory.

The post 3 best AVR microcontrollers appeared first on Electronic Guidebook.

]]>
561
Do microcontrollers have operating systems? https://electronicguidebook.com/do-microcontrollers-have-operating-systems/?utm_source=rss&utm_medium=rss&utm_campaign=do-microcontrollers-have-operating-systems Mon, 27 Jul 2020 23:03:04 +0000 https://electronicguidebook.com/?p=331 You might be familiar with operating systems, as all computers require an operating system. An Operating system is a low level software that helps a device like a computer carry out operations such as scheduling tasks and controlling peripherals.  But, do microcontrollers have operating systems? Unlike computers, microcontrollers do not have operating systems. A microcontroller […]

The post Do microcontrollers have operating systems? appeared first on Electronic Guidebook.

]]>
You might be familiar with operating systems, as all computers require an operating system.

An Operating system is a low level software that helps a device like a computer carry out operations such as scheduling tasks and controlling peripherals. 

But, do microcontrollers have operating systems? Unlike computers, microcontrollers do not have operating systems. A microcontroller is essentially empty and void of any software or operating system. You, as the designer, have to write a specific program which is a set of instructions (depending on the specifications of the application) that the microcontroller will run and carry out tasks. 

What is an operating system?

An operating system is a software that acts as a bridge between the hardware and you the end user. 

It manages computer hardware, software resources and provides a service for a computer program. 

Every computer must have at least one operating system that helps it run programs. Many applications that you use like your web browser, Microsoft Word, games you play etc. Since you do not know how to speak computer language, the operating system bridges the gap. 

So, you have the hardware of the computer (Computer screen, Hardware, Memory etc), the Operating system, and you the end user. 

A computer will most of the time come pre-installed with the operating system. If not, a CD with the operating system is provided so you can install it. 

Different structures of operating systems

There are seven distinct types of operating systems.

Single-tasking 

A single tasking operating system can only run one program at a time. 

Multitasking

A multitasking operating system has the benefits of being able to run multiple programs at once.

Single-User

A single user operating system has no factors to distinguish between users. But, it has the ability to run multiple programs at a single time. 

Multi-User

The multi-user operating system on the other hand allows multiple users to use the system at the same time. 

Distributed

Distributed operating systems are designed to manage a group of distributed computers that are part of a network. This gives them the illusion of a single computer.

Templated

In the context of cloud computing, a templated operating system is a virtual machine. This virtual machine is essentially a guest operating system that is tasked with running other virtual machines. 

Embedded

Embedded operating systems are specially created to work on embedded computer systems, which are designed with a specific task in mind.

Real-time

Real-time operating systems are designed to process data or events at specific moments in time.

Library

Last but not least, is Library. The library operating system provides its services in the form of a library. 

Are computers the only electronic devices that have operating systems?

Operating systems are commonly associated with computers or laptops.

But, are there any other devices that use an operating system?

Other devices that use an operating system include Mobile and Embedded systems. 

Smartphones are a standard part of all our lives. They enable us to make calls, surf the net, play games and much more. This device that can fit in your pocket has more processing power than most computers did 5-10 years ago.

They need an operating system just like a computer to manage programs and hardware. However, their operating systems are designed specifically to meet mobile computing needs. Also, the size and complexity of a mobile operating system is scaled back.

Embedded systems are a combination of a computer processor, memory and input/output peripheral devices.

The computer processor can either be a microcontroller or a microprocessor.

While a computer is general purpose, embedded systems are designed for a specific task. Things like an  ATM, home automation, airplane systems etc. 

These types of systems are complex and require an operating system to control software programs and hardware. But, its operating system is far less complex in nature compared to a computer’s operating system.

You also have embedded systems like your toaster, or hair dryer. These devices aren’t very complex and do not require complicated processing and therefore they do not require an operating system.

Different types of operating systems

There are many different companies that manufacture computers. Each computer uses a specific type of operating system.

While there are many operating systems available, below is a list of the most common:

  • Microsoft Windows
  • Apple mac OS
  • Linux 

For mobile devices like smartphones and tablets, the most common operating systems are:

  • Apple iOS
  • Google Android OS

Some examples of embedded operating systems are:

  • Windows CE
  • Minix 3

Why microcontrollers do not have an operating system?

A microcontroller is essentially a computer on an integrated chip. It is designed for use in an embedded system

It has memory, peripherals, and input/outputs just like a computer does. So, why doesn’t it have an operating system?

While computers are designed for a specific purpose and are standardised in their operations, microcontrollers are devices that are customisable. 

Micrcontroller are used for applications where a specific purpose needs to be achieved. 

Computers also carry out complex operations like multitasking, scheduling, and queuing. Therefore require an operating system to manage these tasks.

Microcontrollers weren’t created to carry out complex operations, therefore do not need an operating system. 

Every microcontroller is shipped void of an operating system. 

How does a microcontroller operate without an operating system?

If a microcontroller doesn’t have an operating system how does it carry out operations?

Depending on what the application is, a program will have to be written that will carry out tasks specific to the application. 

For example, if you need to blink an LED every two seconds, you as the designer will have to write a program that does just that. As you can see, there isn’t a specific operating system that exists that is designed for the sole purpose of blinking an LED every two seconds. 

It would be overkill if a microcontroller had an operating system just to blink an LED.

A microcontroller program is typically broken down into two parts; Setup and Loop

Setup

In the setup portion of the program, things like variables, input/outputs, timers, ADC, serial communication etc, are initialized. This happens once.

Loop

The loop is the main part of the program. This is where you as designer writes functions, and tasks for the microcontroller to carry out depending on the needs of the application. This loop runs infinitely while power is applied.

Do you need to write the operating system for a microcontroller? 

Yes, since microcontrollers do not come with an operating system, you will need to write a program code which essentially acts as the operating system.

The program code is a set of instructions that tells the microcontroller what it needs to do. Without it the microcontroller is just an empty device.

But, what instructions do you give it?


Well, that all depends on what you need to be done. If you need to turn on a light when motion is detected, then you will need to write a set of instructions that does just that. So, as the designer, you are in full control of the microcontroller’s ‘operating system’.

What if you do not know how to program a microcontroller?

If you are a beginner just getting started with microcontrollers, writing an operating system for a microcontroller can be a daunting task. 

What if you haven’t got any prior programming experience?

Fear not, even if you do not know how to program a microcontroller, there are many resources available online that can help you with whatever project you want to get involved in. Resources like tutorials, and open source code for many different types of projects. 

Since the microcontroller has been around for a long time, there have been many projects written by hobbyists and makers. The good news is that they have made these available for everyone online at no cost. 

If you want to get started with microcontrollers, I highly recommend the Arduino Platform. It has a great community, multiple tutorials, and code available online .

What programming languages are used to write an operating system for a microcontroller?

Just like there are many different languages that we use to communicate to each other, there are different languages that you can learn to write an ‘operating system’ for a microcontroller. 

A microcontroller can only understand machine code (assembly language). In the early days programmers had to learn to write programs in machine code.

But, this was a very cumbersome process. Therefore, higher level programming languages were developed that made it easier for programmers.

A programmer would write a program using a higher level language, and then used a compiler to convert it into machine code that a microcontroller could understand. 

Common higher level programming languages include :

  • JavaScript
  • C++
  • Python

Loading a program code (operating system) onto a microcontroller

If you have written the program code for a microcontroller but have no way to load it onto it, all your hard work writing that program is wasted.

Loading the program onto a microcontroller is a crucial step and requires a few different tools. 

You will need a compiler that converts the code you have written into machine code, a programmer (that connects your microcontroller to the computer) and software that can send the machine code to the microcontroller via the programmer. 

The great news is that the manufacturers of microcontrollers develop their own Integrated Development Environment (IDE) that has the ability to compile and send the code to the microcontroller.

Common used IDE’s are:

  • Atmel Stuio
  • Arduino IDE

Do microprocessors have operating systems?

Microprocessors are very similar to microcontrollers, but have some differences.

A microprocessor does not include peripherals (memory, timers, serial communication etc) like a microcontroller does. It only has the ability to provide processing functions. External peripherals need to be added to extend its capabilities.

Just like microcontrollers, they do not come with an operating system. They are not devices that serve a specific purpose. Depending on the specifications of the project, the programmer can write a program that meets those specifications.

However, many microprocessors are used in devices that have operating systems like computers, and mobile phones. 

Final thoughts

A microcontroller is not a general purpose device. What this means is that it does not serve any specific task. It has many features and capabilities, but does not have an operating system.

An operating system is designed to help an embedded system (like a computer or mobile phone) manage its hardware and software resources, and has a specific purpose.

You as the programmer has the job of writing the program (which is essentially an operating system) that governs how the microcontroller will operate.

The post Do microcontrollers have operating systems? appeared first on Electronic Guidebook.

]]>
331
Why is the 8051 called an 8-bit microcontroller? https://electronicguidebook.com/why-is-the-8051-called-an-8-bit-microcontroller/?utm_source=rss&utm_medium=rss&utm_campaign=why-is-the-8051-called-an-8-bit-microcontroller Tue, 21 Jul 2020 23:35:55 +0000 https://electronicguidebook.com/?p=327 You might have been using the 8051 microcontroller for a long time now, or you might be new to it. These microcontrollers are versatile integrated circuits with many capabilities. But, why is the 8051 called an 8-bit microcontroller? The 8051 is called an 8-bit microcontroller because it processes 8 bits of data every machine cycle. […]

The post Why is the 8051 called an 8-bit microcontroller? appeared first on Electronic Guidebook.

]]>
You might have been using the 8051 microcontroller for a long time now, or you might be new to it. These microcontrollers are versatile integrated circuits with many capabilities.

But, why is the 8051 called an 8-bit microcontroller? The 8051 is called an 8-bit microcontroller because it processes 8 bits of data every machine cycle. All assembly instructions happen 8-bits at a time. Also, all internal registers are 8-bit in size and all read and write operations happen 8-bits at a time. 

What does 8-bit mean? 

Understanding the basics of what 8-bit means, will give you a better understanding of the question of why the 8051 is called an 8-bit microcontroller.

Before the digital age, all electronics were analog. It dealt with a continuous range of voltages. 

In the world of microcontrollers, all data, memory, program code is digital (0’s and 1’s).

A single bit is either a 0 or 1. 

A collection of eight 0’s and/or 1’s is known as 8-bits (or a byte).

A deeper look at why the 8051 is called an 8-bit microcontroller

A 8051 microcontroller has registers, address buses and data buses.

A register is one of the main components of a microcontroller whose  primary use is to store data. 

Registers have read/ write operations which means that you can either just read the contents of the register, or write new data to it.

To move information to these registers, microcontrollers require data or address buses. They provide a means of moving information from one place to another. 

Think of them as highways. 

As we saw above, all data is either a 0 or 1. 

The registers in an 8051 microcontroller store data that is 8-bits in length. 

Also, the address and data buses move data that is 8-bits in length which is the main reason why the 8051 is called an 8-bit microcontroller.

Different types of 8-bit registers in the 8051 

The 8051 has different types of 8-bit registers, each used for certain applications.

The registers are General Purpose and Special Function. It has a total of 256 bytes of RAM in total of which 128 bytes are used for the General Purpose Registers, and 128 bytes for the Special Function Register.

Were the earlier versions of the 8051 microcontroller 8-bit?

Intel Corporation are the developers of the 8051 microcontroller. 

However, they weren’t the first microcontrollers they developed. 

The first microcontrollers developed by Intel was the 4004. A 4-bit microcontroller. 

This meant that it had registers, data buses and address busses that were 4-bit in size.

Therefore it was considered a 4-bit microcontroller.

Are the 8051 microcontroller peripherals 8-bit?

Peripherals are certain parts of a microcontroller that have specific functionalities that help a microcontroller achieve a certain task.

Microcontroller peripherals include things like Timers, Analog to Digital Converters, Pulse Width Modulation, General Purpose Input/Outputs and Serial Communication. 

A 8051 microcontroller has two dedicated 16-bit timers, Serial communication (UART) and General Purpose Input/Outputs.

But, isn’t the 8051 microcontroller 8-bit? How can it have 16-bit timers?

Yes it still is an 8-bit microcontroller, the timer values are just stored in two 8-bit registers, and their total value of the timer is a combination of these two registers. 

The lower byte is stored in register ‘TL’, and the higher byte is stored in register ‘TH’.

Are all 8051 microcontrollers 8-bit?

The 8051 microcontroller has  different versions available that vary in things like ROM, RAM, number of timers, and interrupt sources. 

The two versions are the 8052, and the 8031. 

Below is a table of their comparisons:

Feature805180528031
ROM(bytes)4K8K0K
RAM(bytes)128256128
Timers232
I/O pins323232
Serial port111
Interrupt sources686

Both these versions, just like the 8051, are 8-bit microcontrollers.

At this moment in time, all three versions of the microcontroller are only available as 8-bit microcontrollers. 

How do you know if a microcontroller is 8-bit?

Many if not most electronic devices come with a user manual.

This user manual helps us learn how to use the device. It tells us what each button does, and what functions the device has. 

Lucky enough for you and me, manufacturers of microcontrollers have written up a user manual for each device.

This user manual is commonly known as a datasheet.

It lets us know all the features of a microcontroller, what each pin does, how to use it etc.

The datasheet also contains information of whether a microcontroller is an 8-bit, 16-bit or 32-bit microcontroller. 

So, if you need to find information about your microcontroller, just consult its datasheet which is available online. 

Is the 8-bit 8051 microcontroller a good for you?

Microcontrollers have come a long way from their humble 4-bit days.

You now have the option of 8-bit, 16-bit and 32-bit microcontrollers.

The choice of which of these microcontrollers to choose all comes down to the needs of your application. If you require higher computation power, the 32-bit microcontroller is your best option. 

However, if lower power consumption is a necessity, the 8-bit microcontroller is your best bet.

Below are some of the advantages of using an 8-bit microcontroller like the 8051. 

Cheap and easy to use

An 8-bit microcontroller is a great choice for the beginner, or when money is an issue.

8-bit microcontrollers are cheaper and easier to use compared to their counterparts. 

If you are a beginner just getting started 8-bit microcontrollers are your best friend, as its architecture is simpler and has a programming model that is easier to understand. 

Also, most of the time it requires a single supply which lowers costs, and if funds are an issue, is again your best friend.

Lower power

Power is a precious commodity in many areas in life. 

It helps run our homes, workplaces and is needed by every electronic device.

But, power is not an abundant source. 

So, when designing embedded systems, a lot of thought has to go into how much power microcontrollers consume. 

The less the better!

8-bit microcontrollers use less power, which is a great advantage when it comes to designing an embedded system. 

Package style of 8051 microcontroller 

The 8051 microcontroller is available in two package styles which provide different mounting styles.They include the TQFP and PDIP.

The TQFP package style is 44 pin surface mount integrated circuit and the PDIP is a 40 pin through hole integrated circuit. 

If you are just prototyping, or building a one off project, the PDIP package will suit your application.

If you are creating a final version of your product, or mass producing circuits, the TQFP style of package is a great choice. 

Other types of 8-bit microcontroller

Is the 8051 the only 8-bit microcontroller available?

No, there are a plethora of 8-bit microcontrollers available for you to pick and choose. The 8051 is just one of many. 

There are a number of different manufacturers that develop microcontrollers. The top companies that develop the bulk of microcontrollers used in the market today include:

  • ATMEL (now owned by microchip)
  • MICROCHIP
  • NXP
  • TEXAS INSTRUMENTS

These companies all develop different ranges of microcontrollers that vary in specifications. 

But, what is common is they all have a range of 8-bit microcontrollers. 

What is the difference between 8-bit, 16-bit, and 32-bit microcontrollers?

So, an 8051 is called an 8-bit microcontroller because it processes data 8-bits every machine cycle. It has registers, data and address buses all capable of storing and transferring this data 8-bits at a time.

While a 8-bit microcontroller processes 8 bits of data a time, a 16-bit microcontroller processes 16 bits and a 32-bit microcontroller processes 32 bits. 

The main difference between the three is how many bits are processed every machine cycle.

The 16-bit and 32-bit microcontrollers have the benefits of faster operation, and better precision. The downside however, is that they consume more power.

The post Why is the 8051 called an 8-bit microcontroller? appeared first on Electronic Guidebook.

]]>
327
Can a microcontroller work independently? https://electronicguidebook.com/can-a-microcontroller-work-independently/?utm_source=rss&utm_medium=rss&utm_campaign=can-a-microcontroller-work-independently Fri, 17 Jul 2020 07:12:22 +0000 https://electronicguidebook.com/?p=323 A microcontroller is an amazing piece of technology with many capabilities. But, can a microcontroller work independently? A microcontroller can work independently as part of a stand alone embedded system. It is a device that is capable of controlling, outputs, inputs, and external peripherals by itself without the assistance of another microcontroller or microprocessor.  Taking […]

The post Can a microcontroller work independently? appeared first on Electronic Guidebook.

]]>
A microcontroller is an amazing piece of technology with many capabilities.

But, can a microcontroller work independently? A microcontroller can work independently as part of a stand alone embedded system. It is a device that is capable of controlling, outputs, inputs, and external peripherals by itself without the assistance of another microcontroller or microprocessor. 

Taking a closer look and understanding how a microcontroller works will give us a better understanding of how it can work independently. 

Also defining what working independently means will help with our question which I will cover later.

A closer look at a Microcontroller

So what is a Micrcontroller?

A microcontroller is essentially a small computer embedded on a single metal-oxide-semiconductor integrated circuit chip.

Just like our brains are tasked with controlling everything we do, a microcontroller is the brain of an embedded system tasked with controlling everything it does.

But, a microcontroller can do more than just process information. 

Just like we have eyes to help us see, a nose to help smell, legs to help us move around etc, microcontrollers have features also known as peripherals, that help them perform different tasks.

These peripherals include:

  • Memory
  • Timers
  • Analog to Digital Converter
  • Digital to Analog Converter
  • Serial Communication
  • General Input/Output pins
  • Pulse Width Modulation 

All these features are built in the microcontroller chip. 

What does working independently for a microcontroller mean?

To understand the question of whether a microcontroller can work independently, we need to understand what an embedded system is.

A microcontroller is always part of an embedded system.

An embedded system is a combination of processors, communication and input/output peripherals.

The most common embedded system you will be familiar with is a computer.

It has inputs(mouse, keyboard), outputs (computer screen), and a processor (CPU).

Similarly, microcontrollers are part of  an embedded system with inputs (sensors, buttons, switches) and outputs (motors, LEDs).

In this instance a microcontroller is working independently. It is in charge of processing, running and controlling information and input and outputs. 

It is a stand alone embedded system.

Other instances you will have larger systems that are a collection of smaller embedded systems.

At the heart of these smaller systems are microcontrollers. 

However, these microcontrollers are working together to achieve a specific goal, and each microcontroller is given a task to help achieve the end goal.

In this instance the microcontrollers are not working independently, as they rely on each other (there is some form of communication between microcontrollers).

Microcontroller vs Microprocessor

The microcontroller and the microprocessor get confused a lot . However, the two are quite different. 

The main difference is that Microprocessors do not have in-built peripherals like memory, Analog to Digital Converter, Pulse Width Modulation etc.

Due to this a microprocessor relies on external peripherals to achieve specific tasks and cannot work independently. 

When can a microcontroller work independently?

There are many applications where a microcontroller is part of a stand alone embedded system and has to work independently.

The less complex a system the easier it is for a microcontroller to work by itself. It can process and control all information.

There is no master processor, the sole microcontroller is the master itself.

Examples of stand alone embedded systems include:

  • Toasters
  • Microwaves
  • Ovens
  • Mp3 Players
  • Digital Cameras
  • Video Game Consoles
  • Radio

These are just a few of the many examples of stand alone embedded systems where a microcontroller works independently.

When can a microcontroller not work independently?

There are embedded systems that consist of multiple subsystems and microcontrollers.

In these types of systems, operations are more complex and would be too much work for a single microcontroller to carry out independently.

So multiple microcontrollers are needed, each given a specific task. 

There might even be a master microcontroller that is in charge of overseeing all operations and the other microcontrollers.

Whatever the end goal, it requires the microcontrollers to work and communicate together efficiently. 

Common examples of embedded systems with multiple subsystems and microcontrollers are:

  • Automobiles
  • Weather Stations
  • Home Security systems 
  • Mobile Phones
  • Smart Home Systems

Why would a microcontroller work independently?

The reason a microcontroller might work independently is because the application it is used in is not very complex in nature and does not require a lot of processing.

It all depends on the application. 

But, do not underestimate the capabilities of microcontrollers. They can achieve a lot even when they are working by themselves.

Final thoughts

Depending on the complexity of the embedded system, a microcontroller can work independently. 

When there is a larger system consisting of multiple subsystems, microcontrollers do not work by themselves, but with a network of microcontrollers. 

They communicate with each other and work together to complete a task.

The post Can a microcontroller work independently? appeared first on Electronic Guidebook.

]]>
323
What happens when a Microcontroller is powered up? https://electronicguidebook.com/what-happens-when-a-microcontroller-is-powered-up/?utm_source=rss&utm_medium=rss&utm_campaign=what-happens-when-a-microcontroller-is-powered-up Tue, 19 May 2020 09:17:09 +0000 https://electronicguidebook.com/?p=267 The common terminology for the process when a microcontroller is powered up is called the ‘boot process’. You might be familiar with the process of booting, as your computer does this everytime you power it on. For a computer, booting refers to the process of turning a computer on and starting the operating system. In […]

The post What happens when a Microcontroller is powered up? appeared first on Electronic Guidebook.

]]>
The common terminology for the process when a microcontroller is powered up is called the ‘boot process’.

You might be familiar with the process of booting, as your computer does this everytime you power it on.

For a computer, booting refers to the process of turning a computer on and starting the operating system. In a computer the operating system is the program that enables the software and hardware to work as one.

What happens when a microcontroller is powered up?For a microcontroller, what happens when it is powered up is a similar process. However, microcontrollers do not come installed with an operating system. The operating system is the list of instructions you write (the ‘program’) and load onto the microcontroller. 

So when the microcontroller is powered up, it executes a small program known as the ‘Boot loader’ whose primary job is to load the program  which you have written along with other data, which are then executed by RAM (Random Accessible Memory).

The instructions can be written in either C or Assembly code. 

There are many different types of microcontrollers available which are built on different types of architecture. 

The power up process for each of them might be slightly different, but the overall idea is the same. 

For an in-depth look at what happens when a microcontroller is powered up, keep on reading.

Different types of microcontroller memory

Before we dive into the details of what happens when a microcontroller is powered up, it will help to understand the different types of memory a microcontroller has, and their primary functions.

There are 3 types of memory that a microcontroller uses; SRAM, FLASH and EEPROM.

SRAM

This type of memory is read and written to repeatedly while the microcontroller is running. 

Think of variables that get updated and changed depending on different circumstances. These all get stored in SRAM.

Once powered off, all memory in SRAM is forgotten, making them volatile.

FLASH

Flash memory contains data that does not change or get altered. This is where the program you write and load onto the microcontroller gets stored and will later be executed. This is the same as the operating system of computers.

EEPROM

Unlike SRAM memory, variables stored in EEPROM are non-volatile. When the microcontroller is turned off, the data stored in EEPROM is saved and can be retrieved once the microcontroller is powered up. 

Different types of microcontrollers (AVR, 8051, PIC)

In the world of microcontrollers, you have many options depending on your needs and wants.

While different groups of microcontrollers are built on different architectures and manufactured by different companies, their start-up process when powered up follows the same procedures.

There are 4 commonly used microcontrollers available and used today from hobbyist, to engineers.

They include the PIC, ARM, 8051 and AVR microcontrollers. 

Applications of these microcontrollers include consumer electronics, household appliances, Automotive, Security, Aviation, Medical and many more. 

What is a boot loader?

When a microcontroller is powered off, its program code, and data gets stored in non-volatile memory.

When the microcontroller is powered up, it needs a way to be able to load the program code and other essential data which then can be executed by RAM. 

The way a microcontroller does this is by using something known as a Boot Loader

The boot loader is not only used on start-up, but on Reset too. 

So, if the micrcontroller’s reset button is pressed (which is essentially resetting the system), the boot loader carries out the same task of loading program code and other essential data.

When multiple stages of boot loaders are used, the process is known as chain loading. 

What is a vector table?

We need to briefly cover what a vector table is before discussing the details of start-up of a microcontroller.

A vector table contains addresses of information that are stored in different locations in memory. It essentially is a map that tells the microcontroller where to go.

For example a particular location in memory might contain instructions for what to do during a reset. So, a vector table will have the address pointing to that location.

What happens when a microcontroller powered up ?

The first thing when power is applied, the microcontroller waits for the voltage to stabilize.

After the voltage stabilizes, the microcontroller looks to reset-vector (in the vector table) for the location of where the start-up instruction is in Flash memory.

This is then loaded by microcontroller and executed.

This set of instructions are the bootloader. 

Next, the program code and other data is then loaded onto RAM.

Then the microcontroller runs whatever program you have written. 

The post What happens when a Microcontroller is powered up? appeared first on Electronic Guidebook.

]]>
267
What microcontroller does an Arduino use? https://electronicguidebook.com/what-microcontroller-does-an-arduino-use/?utm_source=rss&utm_medium=rss&utm_campaign=what-microcontroller-does-an-arduino-use Mon, 04 May 2020 23:32:04 +0000 https://electronicguidebook.com/?p=232 Arduino is a company that specialises in open-source hardware and software. They develop boards that utilise microcontrollers as their central processing unit (CPU).  So what microcontrollers does an Arduino use? There is no one word answer to this. There are many different versions and boards of Arduino which come in different sizes, specifications etc. They […]

The post What microcontroller does an Arduino use? appeared first on Electronic Guidebook.

]]>
Arduino is a company that specialises in open-source hardware and software.

They develop boards that utilise microcontrollers as their central processing unit (CPU). 

So what microcontrollers does an Arduino use?

There is no one word answer to this. There are many different versions and boards of Arduino which come in different sizes, specifications etc. They all use different microcontrollers. However, the majority of the microcontrollers used in Arduino boards are from the same family, that being the Atmel AVR family manufactured by Microchip. The most common microcontroller used from that family is the AtMega328.

An Arduino board is a useful piece of electronic hardware, that has many great features and capabilities.

The standard Arduino board has everything you need to get started. It includes an on board voltage regulator,  input and output digital/analog pins, and pre-programmed boot loader to upload programs to the microcontroller’s flash memory. 

The features of an Arduino board depends on the version and what hardware is included which increases its capability. Things like bluetooth capability, internet connectivity via wifi and many more.

There are also additional expansion boards known as ‘shields’ that can be added to your standard Arduino board to enhance its capability.

The standard Arduino board has everything you need to get started. 

It is great for beginners just getting started, to the expert trying to prototype circuits.

What is a microcontroller?

Let’s take a quick look at what microcontrollers are.

A Microcontroller is basically a mini computer that can be found on an Integrated Circuit (IC). 

It is a device that includes onboard memory, and  programmable input/output ports. 

They also include  features such as Timers, Analog to Digital Converter (ADC), Digital to Analog Converter (DAC), SPI and I2C communication and many others. 

The microcontroller acts as the brain of a bigger electronic system. It fetches, decodes, and executes all instructions which are stored in its flash memory.

Sometimes, people confuse microcontrollers for microprocessors. While they are quite similar in some aspects, they have many differences.

Purpose of a Microcontroller

Depending on the application, a microcontroller can be used in many different ways.

As we saw, it acts as the brain of a bigger electronic system.

Whether this system is your toaster, a mobile phone, weather station etc.

Their purpose is to run a specified program that is stored in Read only Memory (ROM). This program is written by the programmer with specific tasks in mind.

An example scenario would be, a Passive Infrared (PIR) sensor and Lamp connected to the microcontroller as an Input and Output respectively. 

The programmer can then write instructions like whenever the PIR sensor is triggered, to turn the lamp on. 

This program gets downloaded in machine code and interpreted by the microcontroller accordingly. 

Due to their small size and low cost, microcontrollers are a great option for hobbyists, makers, and engineers prototyping circuits.

Different types of Microcontrollers

Going forward, it will be beneficial for you to know the different types of microcontrollers because you will then be familiar with the type of microcontroller that an Arduino uses.

Just like there are many different manufacturers of cars, there are many different manufacturers of microcontrollers.

The major players in the game are Microchip, Texas Instruments, Silicon Labs, Dallas Semiconductor and Intel. There are many more, but these are the most common.

When it comes to the microcontroller, you have different versions available.

Each microcontroller is differentiated by the architecture it was built on. 

The most common microcontrollers are the PIC, AVR, 8051 and MSP. Again, there are others, but these are the most common.

Atmel Avr Microcontrollers

As we are concerned with what microcontroller an Arduino uses, we will concentrate on the AVR microcontrollers (since these are the most commonly used in an Arduino).

AVR is a family of microcontrollers that was developed by Atmel in 1996. 

In 2016, Microchip Technology acquired Atmel.

These AVR microcontrollers are based on a modified Harvard architecture 8-bit RISC single chip microcontroller.

They distinguish themselves from other microcontrollers as they were the first to use on-chip flash memory for program storage rather than EPROM or EEPROM

Different AVR Microntrollers

The AVR family of microcontrollers are further divided into subcategories. 

The subcategories determine different characteristics and specifications such as program memory, number of pins, number of timers, number of PWM channels etc. 

The three major groups are;

  • tinyAVR 
    • 0.5 – 32KB program memory
    • 6- 32 pin package
  • megaAVR
    • 4 – 256 KB program memory
    • 28 – 100 pin package
  • XMEGA
    • 16 – 384 KB program memory
    • 44 – 64 – 100 pin package

The great thing is that, depending on the needs of the project you might be working on, you can choose the appropriate AVR microcontroller that matches your project specifications.

What is an Arduino?

AVR microcontrollers are a great piece of technology that are capable of many things. 

Unfortunately, setting them up, while not hard, is quite cumbersome. You need a breadboard to be able to embed the microcontroller in, provide the right power supply run wiring all over the place etc.

If you are a beginner it can be quite daunting, or if  someone who just wants to get started prototyping it can be quite annoying going through all those steps.

What’s great about the Arduino, is that everything is already set up and ready to go. It includes a voltage supply, header pins to connect your input/outputs and on-board programmer to program the microcontroller.

You just need to connect whatever external peripheral circuitry your project requires and write the code. 

The Arduino removes all the guesswork and makes getting started a smoother experience.

A great benefit of using an Arduino is that it has a strong community. There are multiple forums containing solutions to many problems. So, if you ever get stuck just look to the community for help.

Different Arduino Boards

Just like the microcontroller, there are many different versions of the Arduino. 

They are however, all produced and manufactured by the same company (Arduino).

Different Arduino boards have different specifications such as Microcontroller, Operating Voltage, Processing Speed, Analog Inputs , PWM channels, SRAM, FLASH, and UART. 

For a comprehensive look, check out this link.

Again, depending on the need of the user, the right Arduino board can be chosen.

The Microcontroller an Arduino uses?

The majority of Arduino boards use Atmel AVR microcontrollers. The most common being from the AT Mega family, the AT Mega 328.

Below are all the Arduino Boards, and the microcontrollers that they use.

  • Arduino Uno – ATmega328P-PU
  • Arduino Mega – ATmega 2560
  • Arduino Nano – ATmega328P-AU
  • Arduino Leonardo – ATmega32u4
  • Arduino 101 – Intel Curie
  • Arduino Micro – ATmega32U4
  • Arduino Mini – ATmega328
  • Arduino Zero – ATSAMD21G18
  • Arduino Due – AT91SAM3X8E
  • Arduino ADK – ATmega2560
  • Arduino MO – ATSAMD21G18
  • Arduino MO Pro – ATSAMD21G18
  • Arduino MKR Zero – SAMD21 Cortex-M0+
  • Arduino YÚN – ATmega32U4
  • Arduino Ethernet – ATmega328
  • Arduino Tian – Atheros AR9342
  • Arduino Industrial 101 – Atheros AR9331
  • Arduino Leonardo ETH – ATmega32u4
  • Arduino MKR WAM 1300 – SAMD21 Cortex-M0+
  • Arduino MKR GSM 1400 – SAMD21 Cortex-M0+
  • Arduino Gemma – ATiny85
  • Arduino Lilypad Arduino USB – ATmega32u4
  • Arduino Lilypad Arduino Main Board – ATmega168/ATmega328V
  • Arduino Lilypad Arduino Simple – ATmega328P-AU
  • Arduino Lilypad Arduino Simple Snap – ATmega328P-AU

As you can see, many Atmel AVR microcontrollers are being used at the heart of an Arduino. The most common being from AT Mega series.

Benefits of using an Arduino

There are many benefits to using an Arduino. 

Beginner

If you are just starting out with embedded electronics, it’s quite a daunting task having to figure out what microcontroller to buy, how to set up a power supply to power it, wire up the right pins etc.

An Arduino takes away the fear and hassle of having to set up all the proper circuitry to get your microcontroller up and running.

Prototyping

The same statement holds true for an expert as well.

Maybe an engineer needs to come up with a prototype for a project as soon as possible. The last thing he/she needs to worry about is setting up the bare bones of a microcontroller circuit.

Instead, they can just grab an Arduino board and start prototyping their idea which is a better use of their time. 

Community

The truth of the matter is that you are going to come across many problems.

Some of these problems you will be able to solve through trial and error (speaking from personal experience). 

Other times however, you are going to need a helping hand.

This is where the Arduino community comes to the rescue. 

Since the Arduino board is the go to choice for hobbyists and engineers alike, there are many forums online with smart people who you can ask for help. 

Upgrades

If you have opted for the standard version of the Arduino, you are not restricted to its functionality.

You can upgrade the functionality of your board using external expansion boards known as ‘shields’.

Say you want to add bluetooth capability to your next project, all you need to do is buy a ‘bluetooth shield’.

You are not confined to the limits of the stock Arduino Board.

The post What microcontroller does an Arduino use? appeared first on Electronic Guidebook.

]]>
232
Does a Microcontroller need a battery? https://electronicguidebook.com/does-a-microcontroller-need-a-battery/?utm_source=rss&utm_medium=rss&utm_campaign=does-a-microcontroller-need-a-battery Wed, 29 Apr 2020 23:11:43 +0000 https://electronicguidebook.com/?p=208 Electricity and power are a fundamental part of many electrical and electronic devices.  At the heart of most electronic devices these days, from your toaster, to your mobile phone, lies a microcontroller. So does a microcontroller need a battery? The answer is yes. A microcontroller does not have an in-built battery, therefore you will need […]

The post Does a Microcontroller need a battery? appeared first on Electronic Guidebook.

]]>
Electricity and power are a fundamental part of many electrical and electronic devices. 

At the heart of most electronic devices these days, from your toaster, to your mobile phone, lies a microcontroller.

So does a microcontroller need a battery?

The answer is yes. A microcontroller does not have an in-built battery, therefore you will need to provide an external battery source to make it work properly. Without providing a battery source, the microcontroller will be rendered useless.

There are many ways to power a microcontroller. Using a battery is one of the options. Other options include power supplies, DC adapters, USB etc. 

The main point is that a microcontroller needs an energy source that provides it a voltage and current that is specified in its datasheet. 

Like most other electronic devices, microcontrollers have maximum and minimum voltage and current ratings. Trying to provide voltages above the threshold levels, increase the chances of frying your device. 

Supplying a voltage below the recommended minimum means that your microcontroller will not function optimally. 

The voltage and specifications are listed on the devices datasheet, which can be found on the manufacturers website.

Why do electronics need electricity?

All electronics do work. 

This work can be a motor spinning, LED lighting up, heater producing heat etc.

All this work requires a certain amount of energy. This energy is provided in the form of electrons.

Without going into too much detail,we all know all matter is made up of atoms. Atoms contain electrons that have the ability to carry charge in the form of current.

 This current is the fundamental aspect of providing energy to many electronic components.

So, basically electricity provides electronics with current (flow of electrons) that has the ability to provide the energy needed to perform work.

Different form of electricity

The two forms of electricity that exist are Static and Current electricity.

Static electricity deals with the accumulation of opposite charges on objects that are separated by an insulator. 

When the charges find a path to reunite to balance the system out, a static discharge occurs. 

You might have experienced this in the form of a shock when walking across a carpet with socks on, and then touching a metal object or a person.

Static electricity is not a suitable form of electricity when it comes to powering electronics like a microcontroller.

As a matter of fact, due to the voltages generated by static electricity, measures are taken to protect sensitive devices (which include microcontrollers) against static discharges.

Current electricity, which is defined as the constant flow of electrons, is the form of electricity that we are concerned with when powering electronic devices. 

While static electricity deals with charges at rest, current electricity deals with charges that are dynamic.

Purpose of a battery

As we saw above, electronic components like microcontrollers need electrons to provide them energy to do work.

But, in order for the electrons to provide energy to electronic devices, they themselves require a little force. 

This force is provided by an electric field and is given a term we are all familiar with known as, Voltage (V).

The purpose of a battery is to provide an electric field that gives the electrons the force required to move through a circuit and provide energy to components.

The electric field that a battery provides is generated through a chemical reaction that occurs within the battery.

An example of this can be a simple circuit containing a battery, switch, and a lamp.

Initially the switch is open, and all the electrons in the circuit are at rest.

Once the switch is closed completing the circuit, a chemical reaction occurs inside the battery, resulting in an electric field providing the force to push the electrons through the circuit.

These electrons then move through the circuit and arrive at the lamp, providing the filament inside the lamp with energy which in turn creates heat and light. 

This process carries on as long as the switch is closed, or the battery voltage runs out.

Different types of batteries

Batteries come in many different sizes, voltages, current capacities, and chemical compositions.

Some batteries have the added benefit of being able to be recharged so they can be used multiple times.

Batteries can be classed into two categories; Primary and Secondary.

Primary batteries cannot be recharged. 

This means once the battery’s chemical reactions are depleted, the battery must be disposed of (properly).

The most common chemical composition of primary batteries is Alkaline. 

The sizes of Alkaline batteries include coin cell, AA, AAA, D cell, C, D and 9V batteries.

Their voltages range from 1.2 volts to 9 volts.

Secondary batteries on the other hand, have the ability to be charged and used again.

This is why they are referred to as rechargeable batteries.

The most common chemical composition of secondary batteries are Lithium-Ion (Li-Ion), Nickel-Cadmium (Ni-Cd), Nickel-Metal Hydride (Ni-MH), and Lead Acid.

The different chemical compositions of these rechargeable batteries all give them different characteristics like energy density, power, charge/discharge efficiency, discharge rate and cycle durability.

The sizes and voltages all vary from one rechargeable battery to the next.

From the flat 3.7V Li-Ion battery to the massive 12V Lead Acid cube found in your car.

So depending on your application, you will be able to find the right rechargeable battery.

Other forms to power your Microcontroller

While batteries are cheap, easy to find and use, there are other options at your disposal to provide a voltage source for your microcontroller.

These can include a power supply, DC wall adapter (like the ones used to charge your phones), USB cable via your computer or a power bank and many more.

As long as you can supply the right voltage and enough current you should be fine.

How to power a Microcontroller?

When it comes to microcontrollers you are spoilt for choice. 

There are many different families of microcontrollers available. The most common of them are the Atmel AVR, PIC, 8051. 

Even within each family exists multiple different types of microcontrollers.

For example, the Atmel AVR family has chips such as the ATMega 8, ATTiny 16, ATMega 16 and so on. 

Each subset of microcontroller has a different number of pins and features such as clock speed, number of timers etc.

Though there are many different manufacturers of microcontrollers, and different versions of them, the one thing that stays consistent is, the way they are powered.

The battery voltage that a microcontroller will operate effectively depends entirely on the type of microcontroller itself.

Depending on what microcontroller you have, you can either run it at a voltage of 3V or 5V. The voltage specification can be found on the microcontroller datasheet.

Lets look at the Atmel AVR microcontroller; ATMega8 as an example.

The ATMega8 comes in two versions; ATMega8 and ATMega8L.

The ATMega8 operates effectively at voltages ranging from 4.5V-5.5V.

Whereas, the ATMega8L operates effectively at voltages from 2.7V-5.5V.

So, you can see, the voltage depends entirely on the chip which is specified in its datasheet. 

But, the common voltage range for most microcontrollers ranges from 3V-5V.

How do you connect the Battery to the Microntroller?

We are all familiar with batteries and their terminals. 

But, to cover all bases, batteries come with two terminals; Positive (+) and Negative(-).

Every electronic device powered by a battery will have a battery holder embedded in it. 

To make sure the device operates correctly, you will have to match the battery according to the battery holder. 

The negative terminals of the battery must touch the negative terminals of the battery holder, and the same for positive.

The same concept applies for the microcontroller. 

However, microcontrollers do not have the luxury of an embedded battery holder or  pins labelled positive (+) and negative (-).

The  microcontroller’s positive and negative pins are VCC (positive) and GND (negative) respectively.

Note VCC is a common notation for the positive pin, but not always the case. The notation depends entirely on the manufacturer.

It is common for a microcontroller to have two sets of GND pins. Make sure these are both connected to the negative terminal of the battery. 

Which pins of the microcontroller are VCC and GND can be found on its datasheet.

Breadboards

Breadboards are a great way to test and prototype circuits seen in Figure 1

Figure 1

They are also a great way to power your microcontroller using a battery.  You can place the microcontroller in the breadboard as seen in the picture below

Figure 2

You will then need a battery holder with leads like the one below.

Figure 3

After that you will connect the battery’s positive and negative leads to the microcontroller’s VCC and GND respectively as seen in Figure 4.

Figure 4

Conclusion

So, like with any other electronic device, to make a microcontroller function properly we need to supply it with a voltage and current.

While there are many other ways to power a microcontroller, a common and easy way to do so is to use batteries.

They come in many different sizes, voltage levels, current capacities and chemical compositions.

There are also batteries that can be recharged and used multiple times.

When providing a voltage to the microcontroller using a battery, make sure the output voltage of the battery matches the voltage specified in the microcontrollers datasheet (which can be found on the manufacturer’s website).

The post Does a Microcontroller need a battery? appeared first on Electronic Guidebook.

]]>
208