INTRODUCTION TO EMBEDDED SYSTEMS
“You don’t have conversations with microprocessors. You tell them what to do, then helplessly watch the disaster when they take you literally!”-David Brin
• Microprocessor is an electronic component that is used by a computer to do its work.
• It is a central processing unit on a single integrated circuit chip.
• These chips contain millions of transistors, resistors, and diodes.
• These all work together.
• Microcontroller is a compact integrated circuit
• Which is designed to govern a specific operation in an embedded system.
• A microcontroller consists of a processor, memory, and input and output pins on a single chip
Microprocessors vs Microcontrollers
§ Arduino is an open-source software and hardware producer
§ Arduino boards are microcontroller development boards.
§ It consists of SRAM and EEPROM flash
§ Serial Communication
Some other types of Arduino are:
· LilyPad Arduino
· Arduino Mega
· Arduino Leonardo
· Arduino Red Board
· Arduino Shields
The development of the Arduino UNO board is considered new compared to other Arduino boards. This board comes up with numerous features that help the user to use this in their project. The Arduino UNO uses the Atmega328p microcontroller that helps to increase the transfer rate and contains large memory compared to other boards. No extra devices are needed for the Arduino UNO board like a joystick, mouse, keyboard, and many more. The Arduino UNO contains SCL and SDA pins and also has two additional pins that fit near to RESET pin.
The board contains 14 digital input pins and output pins in which 6 pins are used as PWM, 6 pins as analog inputs, a USB connection, a reset button, and one power jack. The Arduino UNO board can be attached to a computer system by a USB port and also get a power supply to the board from the computer system. The Arduino UNO contains a flash memory of size 32 KB that is used for the data in it. The other feature of the Arduino UNO is compatibility with other shields and can be combined with other Arduino products. This is the most used Arduino board
Components of Arduino UNO
- USB Connector
This is a printer USB port used to load a program from the Arduino IDE onto the Arduino board. The board can also be powered through this port.
2. Power Port
The Arduino board can be powered through an AC-to-DC adapter or a battery. The power source can be connected by plugging in a 2.1mm center-positive plug into the power jack of the board.
The Arduino UNO board operates at a voltage of 5 volts, but it can withstand a maximum voltage of 20 volts. If the board is supplied with a higher voltage, there is a voltage regulator (it sits between the power port and USB connector) that protects the board from burning out.
It is the most prominent black rectangular chip with 28 pins. Think of it as the brains of your Arduino. The microcontroller used on the UNO board is Atmega328P by Atmel ( a major microcontroller manufacturer). Atmega328P has the following components in it:
· Flash memory of 32KB. The program loaded from Arduino IDE is stored here.
· RAM of 2KB. This is a runtime memory.
· CPU: It controls everything that goes on within the device. It fetches the program instructions from flash memory and runs them with the help of RAM.
· Electrically Erasable Programmable Read-Only Memory (EEPROM) of 1KB. This is a type of nonvolatile memory, and it keeps the data even after the device is restarted and reset.
Atmega328P is pre-programmed with the bootloader. This allows you to directly upload a new Arduino program into the device, without using any external hardware programmer, making the Arduino UNO board easy to use.
ANALOG INPUT PINS
The Arduino UNO board has 6 analog input pins, labeled “Analog 0 to 5.” These pins can read the signal from an analog sensor like a temperature sensor and convert it into a digital value so that the system understands. These pins just measure voltage and not the current because they have very high internal resistance. Hence, only a small amount of current flows through these pins.
Although these pins are labeled analog and are analog input by default, these pins can also be used for digital input or output.
You can find these pins labeled “Digital 0 to 13.” These pins can be used as either input or output pins. When used as output, these pins act as a power supply source for the components connected to them. When used as input pins, they read the signals from the component connected to them.
When digital pins are used as output pins, they supply 40 milliamps of current at 5 volts, which is more than enough to light an LED.
Some of the digital pins are labeled with a tilde (~) symbol next to the PINs (PINs 3, 5, 6, 9, 10, and 11). These pins act as normal digital pins but can also be used for Pulse-Width Modulation (PWM), which simulates analog output like fading an LED in and out.
→The Arduino UNO is also equipped with some special pins. One of these is digital pin 13 (top right). This pin is connected with the built-in LED. This is a LED that you can program and is not being used by the Arduino. We will be using the pinMode function to specify we want to use the LED_BUILTIN pin as an OUTPUT. On the Arduino UNO, LED_BUILTIN is an alias for 13 (the built-in LED pin).
When this switch is clicked, it sends a logical pulse to the reset pin of the Microcontroller, and now runs the program again from the start. This can be very useful if your code doesn’t repeat, but you want to test it multiple times.
This is a quartz crystal oscillator that ticks 16 million times a second. On each tick, the microcontroller performs one operation, for example, addition, subtraction, etc.
USB Interface Chip
Think of this as a signal translator. It converts signals at the USB level to a level that an Arduino UNO board understands.
TX RX LEDs
TX stands for transmitting, and RX for receive. These are indicator LEDs that blink whenever the UNO board is transmitting or receiving data.
§ Arduino uses high-level Language
§ Arduino uses embedded C language
§ EMBEDDED C is a subset of C language
§ Arduino codes are called sketch
How to Setup Arduino IDE?
• Selecting the serial port
• Go to 1. Tools
3. Select Your Port
How to select the board?
· Then go to
· Select your Board
• There are preinstalled examples in Arduino IDE
• Go to
• 1. File
• 2. Examples
- 3. Choose your favorite example
WORKING OF CODE
· Void setup() - This part is executed only when the program begins. This is used to declare the mode of pin-like output or input.
· void loop() –This part will be executed repeatedly. This part consists of functioning code.
Input / Output
• pinMode(pin, mode); — used in void setup()
sets the pin to either input or output
Ex: pinMode(12, OUTPUT); — here we are conveying to the Arduino that we use pin 12 to give output
• digitalRead(pin) ; — used in void loop()
Reads whether the information is high or low from a pin
After you are done with coding the next part is the UPLOADING PART:
1. If you are using the Physical Arduino board connected to your laptop then just click on the UPLOAD button and the code gets integrated into the Arduino board connected to your laptop
2. If you are connecting to some of the Arduino present in some software then create a . HEX and copy-paste the code location to the software to make the Arduino work
Code for Blinking LED
IoT is a vast growing field and Industrial IoT can connect machines, tools, and sensors on the shop floor to give process engineers and managers much-needed visibility into production.
We will get back to you with many blogs to enhance our technical knowledge, stay tuned!!!