Microprocessors vs Microcontrollers_0
Microprocessors vs Microcontrollers_0
ARDUINO
ENVIRONMENT
MICROPROCESSORS vs MICROCONTROLLERS
A microprocessor is a small electronic device that contains the function of the control and
logic operations of a digital computer or known as the Central Processing Unit.
A microcontroller is a compact integrated circuit that includes a processor, memory, and
input and output peripherals.
Inside a Microcontroller
1. CPU: The heart of the microcontroller, it fetches instructions from memory, processes
them, and executes them. Unlike the powerful CPUs in computers, microcontrollers often
have simpler architectures (like 8-bit or 16-bit) to balance performance with efficiency and
cost
2. Memory:
- RAM (Random Access Memory): Stores temporary data used during program execution.
Information in RAM is lost when power is switched off.
- ROM/Flash Memory: Stores the program instructions that tell the microcontroller what
to do. This memory is non-volatile, meaning the information persists even after power
down. Flash memory allows for easy reprogramming of the microcontroller
3. Input/Output (I/O) Peripherals: These are the bridges between the microcontroller and the
outside world. They allow the microcontroller to:
- Receive input: Through sensors (temperature, light, etc.), buttons, or other devices.
- Generate output: By controlling LEDs, motors, displays, or communicating with other
devices.
-Serial communication: Enables microcontrollers to talk to each other or other devices
using protocols like I2C or SPI
Examples of Microcontroller
The small size, low power consumption, and versatility of microcontrollers make them
ideal for a vast range of applications.
Consumer Electronics: In devices like smartphones, game consoles, TVs, and even toys,
microcontrollers manage various functions like button presses, display control, and
power management.
Home Appliances: Washing machines, refrigerators, and thermostats all rely on
microcontrollers to automate tasks, adjust settings, and improve efficiency.
Industrial Automation: Microcontrollers are the brains behind robots, assembly lines,
and control systems in factories, ensuring smooth operation and precise movements.
Automotive Systems: Engine control units, anti-lock braking systems (ABS), and airbag
deployment systems all use microcontrollers for real-time monitoring and critical
decision-making.
Wearable technology: Fitness trackers, smartwatches, and even smart clothing often use
microcontrollers to process sensor data and perform calculations.
What is Arduino?
Arduino is an open-source electronics prototyping platform based on flexible, easy-to-
use hardware and software. It is intended for artists, designers, hobbyists and anyone
interested in creating interactive object or developing environments. Arduino can sense its
environment by receiving inputs from sensors, and interact with its environment by
controlling lights, motors, or other actuators. The Arduino integrated development
environment (IDE) is a cross-platform application written in Java, and is derived from the
IDE for the Processing programming language and wiring projects. It can run independently
and communicate with other software such as Flash, Processing, MaxMSP and more.
Arduino IDE is open source so you can download and share thousands of interactive
projects for free!
Here are some Arduino projects just to give your some ideas of tasks it can complete
HISTORY
Arduino started in 2005 as a project for students at the Interaction Design Institute Ivrea
in Ivrea, Italy. At that time, programming students used a "BASIC Stamp" for projects. This
was at a cost of $100, considered expensive for students. Massimo Banzi, one of the
founders of Arduino, taught at Ivrea. The name "Arduino" comes from a bar in Ivrea where
some of the founders of the project used to meet. The bar itself was named after Arduino,
Margrave of Ivrea and King of Italy from 1002 to 1014. Colombian student Hernando
Barragan contributed a hardware thesis for a wiring design. After the wiring platform was
complete, researchers worked to make it lighter, less expensive, and available to the open
source community. The school eventually closed down, so these researchers, including a
man called David Cuartielles, promoted the idea. This idea was to become the Arduino as we
know it today.
ARDUINO UNO
Now let’s take a close look at the Arduino micro-controller and try to locate I/O ports (input/output)
and on board LEDs.
◆ I/ O pins, digital pins 0-13, analog pins 0-5.
◆ 2 power sources. One is the USB port that can draw power from the USB connection. Another is
power jack that inputs DC power of 6-12 volts.
◆ 4 LEDs and reset button. L is the on board LED that connects with digital pin 13. TX and RX are
indicators of transmission signal and received signal. When we download a sketch to the Arduino,
these two lights blink, indicating that data is being transmitted and received.
Program Structure
The absolute minimum requirement of an Arduino program is the use of two functions:
void setup() and void loop(). The "void" indicates that nothing is returned on execution.
void setup() - this function executes only once, when the Arduino is powered
on. Here we define things such as the mode of a pin (input or output), the
baud rate of serial communication or the initialization of a library.
void loop() - this is where we write the code that we want to execute over
and over again, such as turning on/off a lamp based on an input, or to
conduct a sensor reading every X second.
The above functions are always required in an Arduino sketch, but you are of course able to add
several more functions, which is useful for longer programs.