Embedded Systems Training Report
Embedded Systems Training Report
“EMBEDDED SYSTEMS”
At SPIRE SOFTWARE SOLUTIONS
DIPLOMA IN
ELECTRONICS AND COMMUNICATION ENGINEERING
Submitted by
THAMMARALA 19328-EC-049
GOPALA KRISHNA
CERTIFICATE
I would like to express my special thanks of gratitude to our Head of the Department
Mr. G.SRIKANTH, M.Tech, Electronics and Communication Engineering, Behara
Polytechnic College for providing all necessary Support for successful completion of
our training.
I thank all the staff members of our department & the college administration who helped
me in carrying out this training successfully.
DEPARTMENT OF ECE i
ABSTRACT
Industrial training is the important phase of a student life. A well planned, properly
executed and evaluated industrial training helps a lot in developing a professional
attitude. It develops an awareness of industrial approach to gain practical knowledge
based on electronics, Embedded Systems, most of the practical knowledge that has been
gained during the course of studies is put to test.
The aim and motivation of this industrial training is to receive discipline, skills,
teamwork and technical knowledge through a proper training environment, which will
help me, as a student in the field of Electronics and communication, to develop a
responsiveness of the self-disciplinary nature of skills in electronics and
communication technology, During a period of five months training at Behara
Polytechnic college under Spire Software Solutions.
During the training period I have learnt about Number Systems, Microcontrollers,
Embedded C, Keil Software, Liquid Crystal Display, 4*4 Matrix Keypad, Motor
Drivers, Analog & Digital Sensors, Analog to Digital Converters, Arduino, Embedded
Systems, Circuit Simulation on Proteus, and PCB Designing on Proteus. After that we
have practically designed and simulated circuits on Proteus 8 Professional also have
done PCB design and made physical Printed Circuit Board of SMPS.
DEPARTMENT OF ECE ii
PREFACE
Practical training constitutes an integral part of engineering studies. The training gives
an opportunity to the students to express themselves to the industrial environment
which is quite different from the teaching classroom. The training enables the student
to work in the future. It enables the student to undergo those experiences which help
them later when they join an organization.
During this period, the students get the real, first-hand experience for working in the
actual environment. Most of the theoretical knowledge that has been gained during the
course of their studies is put to test here. It covers all the remains uncovered in the
classroom i.e. without it our studies remains ineffective and incomplete. Apart from
this, the students get an opportunity to learn the latest technology, which immensely
helps them in building their carrier.
I had the opportunity to have a real experience on many ventures, which increased my
sphere of knowledge to a great extent. I was entrusted with a real life project, working
on which had finally made me step into the ongoing technology and gradually become
a part of it. And all the credit goes to Spire Software Solutions for providing me the
opportunity and facility for the making of this dissertation. I availed this instance in a
very satisfactory manner and think it will be very beneficial for me in building my
future.
CONTENTS
ACKNOWLEDGEMENT........................................................................i
ABSTRACT..............................................................................................ii
PREFACE................................................................................................iii
CHAPTER 1
NUMBER SYSTEMS...........................................................................1-6
1.1 Introduction ............................................................................................................. 1
1.2 Units of Digital Information ................................................................................... 1
1.3 Types of Number System........................................................................................ 2
1.3.1 Decimal Number System ................................................................................. 2
1.3.2 Binary Number System .................................................................................... 2
1.3.3 Octal Number System ...................................................................................... 2
1.3.4 Hexadecimal Number System .......................................................................... 2
1.3.5 Comparison Table of Four Number Systems ................................................... 3
1.4 Conversions............................................................................................................. 3
1.4.1 Decimal to Binary ............................................................................................ 4
1.4.2 Decimal to Octal............................................................................................... 4
1.4.3 Decimal to Hexadecimal .................................................................................. 4
1.4.4 Binary to Decimal ............................................................................................ 4
1.4.5 Binary to Octal ................................................................................................. 5
1.4.6 Binary to Hexadecimal ..................................................................................... 5
1.4.7 Octal to Decimal............................................................................................... 5
1.4.8 Octal to Binary ................................................................................................. 5
1.4.9 Hexadecimal to Decimal .................................................................................. 5
1.4.10 Hexadecimal to Binary ................................................................................... 6
CHAPTER 2
INTRODUCTION TO EMBEDDED SYSTEMS…........................7-10
2.1 Definition ................................................................................................................ 7
2.2 History of Embedded System ................................................................................. 7
2.3 Characteristics of Embedded Systems .................................................................... 7
2.4 Advantages .............................................................................................................. 8
DEPARTMENT OF ECE iv
CONTENTS
CHAPTER 3
BASICS OF C LANGUAGE…........................................................11-14
3.1 Introduction ........................................................................................................... 11
3.2 Types of Sections .................................................................................................. 11
3.3 Keywords .............................................................................................................. 11
3.4 Data Types ............................................................................................................ 11
3.5 Functions ............................................................................................................... 11
3.5.1 Functions with argument ................................................................................ 11
3.5.2 Functions without argument ........................................................................... 12
3.6 Loops..................................................................................................................... 12
3.6.1 Entry Controlled Loops .................................................................................. 12
3.6.2 Exit Controlled Loops .................................................................................... 12
3.7 Keil Software ........................................................................................................ 12
3.7.1 How to download ........................................................................................... 12
3.7.2 How to install ................................................................................................. 12
3.7.3 Keil Setup for 8051 ........................................................................................ 13
3.7.4 Generate Hex Code ........................................................................................ 13
3.8 PROGRAMS......................................................................................................... 13
3.8.1 Program to blink the LEDs are connected to port 0 ....................................... 13
3.8.2 Program to blink the LEDs are connected to port 0, port 2, port 3 ................ 14
CHAPTER 4
INTRODUCTION TO 8051 MICROCONTROLLER.................15-22
4.1 Introduction ............................................................................................................ 15
4.2 Specifications ......................................................................................................... 15
4.3 Pin Description Of 8051 ........................................................................................ 15
4.4 Difference Between Microprocessor and Microcontroller .................................... 16
4.5 Advantages ............................................................................................................. 17
DEPARTMENT OF ECE v
CONTENTS
CHAPTER 5
MICROCONTROLLER PERIPHERALS………….....................23-41
5.1 Liquid Crystal Display .......................................................................................... 23
5.2 Specifications ........................................................................................................ 23
5.3 PIN description of 16x2 LCD ............................................................................... 23
5.4 LCD Commands ................................................................................................... 24
5.5 LCD Interfacing with 8051 ................................................................................... 25
5.5.1 Program to interface LCD to 8051 in 8-bit mode .......................................... 25
5.5.2 Program to interface LCD to 8051 in 4-bit mode .......................................... 27
5.6 Matrix Keypad ...................................................................................................... 28
5.7 Working of Matrix Keypad ................................................................................... 29
5.8 Interfacing Matrix Keypad with 8051................................................................... 30
5.9 Sensors .................................................................................................................. 34
5.9.1 Analog Sensors ............................................................................................... 34
5.9.2 Digital Sensors ............................................................................................... 35
5.10 Light Sensor ........................................................................................................ 35
5.11 IR Sensor............................................................................................................. 35
5.11.1 Active Infrared Sensors ................................................................................ 36
DEPARTMENT OF ECE vi
CONTENTS
CHAPTER 6
ANALOG TO DIGITALCONVERTERS...…………………......42-45
6.1 A-D Converter ...................................................................................................... 42
6.2 Characteristics of ADC ......................................................................................... 42
6.3 ADC 0804 ............................................................................................................. 43
6.3.1 PIN Diagram of ADC 0804 ............................................................................ 43
6.3.2 Features of 0804 ............................................................................................. 44
6.4 ADC 0808 ............................................................................................................. 44
6.4.1 PIN Diagram of ADC 0808 ............................................................................ 44
6.4.2 Features of ADC 0808.................................................................................... 45
CHAPTER 7
PROTEUS..........................................................................................46-49
7.1 Introduction ........................................................................................................... 46
7.2 Features ................................................................................................................. 46
7.3 How to download .................................................................................................. 46
7.4 PCB Designing...................................................................................................... 47
7.4.1 Schematic Capture.......................................................................................... 47
7.4.2 PCB Layout .................................................................................................... 47
7.5 SMPS .................................................................................................................... 48
7.6 Interfacing LED and Switch with 8051 Microcontroller ...................................... 48
CHAPTER 8
ARDUINO..........................................................................................50-58
8.1 Introduction ............................................................................................................ 50
8.2 Arduino History ..................................................................................................... 50
8.3 Arduino Family ...................................................................................................... 50
LIST OF FIGURES
Fig 2.1 - Embedded System .......................................................................................... 7
Fig 2.2 - Block Diagram of Embedded System ............................................................ 9
Fig 4.1 - Pin Diagram Of 8051 .................................................................................... 16
Fig 4.2 - Architecture of 8051...................................................................................... 18
Fig 4.3 - Timer 0 .......................................................................................................... 20
Fig 4.4 - Timer 1 .......................................................................................................... 20
Fig 4.5 - TMOD Register ............................................................................................. 20
Fig 5.1 - PIN Diagram of 16x2 LCD .......................................................................... 23
Fig 5.2 - 4*4 Matrix Keypad....................................................................................... 29
Fig 5.3 - Schematic of 4*4 Matrix Keypad................................................................. 29
Fig 5.4 - Interfacing Matrix Keypad & LCD with 8051 ............................................. 30
Fig 5.5 - Sensor Block Diagram ................................................................................. 34
Fig 5.6 - LDR Sensor .................................................................................................. 35
Fig 5.7 - IR MODULE ................................................................................................ 36
Fig 5.8 - PIR Sensor .................................................................................................... 37
Fig 5.9 - Ultrasonic Sensor ......................................................................................... 37
Fig 5.10 - PIN Diagram of L293D Motor Driver ....................................................... 38
Fig 5.11 - L293D Interfacing with Motors ................................................................. 40
Fig 6.1 - Block Diagram of ADC................................................................................ 42
Fig 6.2 - PIN Diagram of ADC 0804 .......................................................................... 43
Fig 6.3 - PIN Diagram of ADC 0808 .......................................................................... 45
Fig 7.1 - SMPS Schematic Diagram ........................................................................... 48
Fig 8.1 - Arduino UNO ................................................................................................ 51
Fig 8.2 - PIN Diagram of Arduino UNO ..................................................................... 53
Fig 8.3 - Interfacing LCD with Arduino UNO ............................................................ 56
Fig 8.4 - Matrix Keypad Interfacing with Arduino UNO ............................................ 57
DEPARTMENT OF ECE ix
LIST OF TABLES
LIST OF TABLES
Table 1.1 - Units of Digital Information ....................................................................... 1
Table 2.2 - Number Systems ......................................................................................... 3
Table 4.1 - Difference between Microprocessor and Microcontroller ........................ 17
Table 4.2 - Difference between a Timer and a Counter ............................................... 19
Table 4.3 - Timer Modes ............................................................................................. 21
Table 5.1 - LCD Commands ....................................................................................... 25
Table 5.2 - PIN Diagram of L293D ............................................................................ 40
DEPARTMENT OF ECE x
CHAPTER 1
NUMBER SYSTEMS
NUMBER SYSTEMS
NUMBER SYSTEMS
1.1 Introduction
The number system is used for representing the information. In digital
electronics we use a positional number system which has different bases. The base or
radix of the number system is the total number of the digits used in the number system.
The most common used number systems in digital electronics are:
• Decimal Number System (base 10)
• Binary Number System (base 2)
• Octal Number System (base 8)
• Hexadecimal Number System (base 16)
The decimal system is the number system that we use every day to represent
any number, no matter how large or how small. The computers understand the binary
number system.
1.2 Units of Digital Information
Bit: A bit is a binary digit, the smallest increment of data on a computer. A bit can hold
only one of two values: 0 or 1, corresponding to the electrical values of off or on,
respectively.
Nibble: Group of 4 bits is called Nibble.
Byte: Group of 8 bits is called Byte. Byte is the basic unit in computers.
Computer count by base 2, so in computer jargon, the following units are used:
Unit Equivalent
7 5 9 . 3
1 0 1 1
0 0000 0 0
1 0001 1 1
2 0010 2 2
3 0011 3 3
4 0100 4 4
5 0101 5 5
6 0110 6 6
7 0111 7 7
8 1000 10 8
9 1001 11 9
10 1010 12 A
11 1011 13 B
12 1100 14 C
13 1101 15 D
14 1110 16 E
15 1111 17 F
1.4 Conversions
Here are the methods to convert the number from one number system into
another number system.
2 47
2 23 - 1
2 11 - 1
2 5 -1
2 2 -1
2 1 -0
0 -1
(47)10 ⇒ (101111)2
8 234
8 29 -2
8 3 -5
0 -3
(234)10 ⇒ (352)8
16 873
16 54 -9
16 3 -6
0 -3
(873)10 ⇒ (369)16
= (61)10
2.4 Advantages
Less expensive.
Easy for mass production.
Very few interconnections.
Fast operation.
Highly reliable.
Enhanced Performance.
2.5 Disadvantages
No technological improvement.
Less power supply durability, if it is battery operated.
Hard to take backup of embedded files.
Larger time to market.
The sensor reads external inputs, the converters make that input readable to the
processor, and the processor turns that information into useful output for the
embedded system.
2.7 Classification
1. Based on generation
2. Based on complexity & performance requirements
3. Based on deterministic behaviour
4. Based on triggering
2.8 Applications
Fitness devices
Factory robot
Traffic lights control system
GPS system, etc.
BASICS OF C LANGUAGE
BASICS OF C LANGUAGE
BASICS OF C LANGUAGE
3.1 Introduction
• Low level language ⇒ Machine Language
• Mid-level language ⇒ Assembly Language
• High level language ⇒ Programmable Language
C language is a user-friendly language. C language is the high-level language.
3.3 Keywords
auto break case char unsigned
const continue default do void
double else enum extern volatile
float for goto if while
int long register return typedef
switch signed sizeof static union
3.5 Functions
In c, we can divide a large program into the basic building blocks known as
function. The function contains the set of programming statements enclosed by {}. A
function can be called multiple times to provide reusability and modularity to the C
program.
3.6 Loops
A loop statement allows us to execute a statement or group of statements
multiple times.
3.8 PROGRAMS
3.8.1 Program to blink the LEDs are connected to port 0
#include <reg51.h>
3.8.2 Program to blink the LEDs are connected to port 0, port 2, port 3
#include <reg51.h>
4.2 Specifications
1. 2.7v to 6v operating range.
2. 4 Kbytes of in-system programmable flash memory.
3. RAM is 128 bytes
4. 32 programmable I/O lines arranged four 8-bit ports.
5. Two 16-bit timer/counter
6. 6 interrupts
7. It works with EEPROM
8. 16-bit unidirectional address bus
S. No Microprocessor Microcontroller
S. No Microprocessor Microcontroller
It has no RAM, ROM, Input-Output It has a CPU along with RAM, ROM,
5. units, timers, and other peripherals and other peripherals embedded on a
on the chip. single chip.
4.5 Advantages
• The low time required for performing the operation
• It is easy to use, troubleshooting and system maintenance is simple
• At the same time, many tasks can be performed so the human effect can be
saved
• The processor chip is very small and flexibility occurs
• Due to their higher integration, cost and size of the system is reduced
• The microcontroller is easy to interface additional RAM, ROM, and I/O port
• Once microcontroller is programmed then they cannot be reprogrammed
• Without any digital parts, it can act as microcomputer
• It is easy to use, troubleshooting and system maintaining is simple
4.6 Disadvantages
• It is generally used in micro equipment
• It has a more complex structure as compared to microprocessor
• The microcontroller cannot interface a higher power device directly
• It only performed a limited number of executions simultaneously
Counter: A counter is a device that stores (and sometimes displays) the number of
times a particular event or process occurred, with respect to a clock signal. It is used to
count the events happening outside the microcontroller. In electronics, counters can be
implemented quite easily using register-type circuits such as a flip-flop.
S. No Timer Counter
4.11.1 GATE
Every timer has a means of starting and stopping. Some timers do this by
software, some by hardware, and some have both software and hardware controls. 8051
timers have both software and hardware controls. The start and stop of a timer is
controlled by software using the instruction SETB TR1 and CLR TR1 for timer 1, and
SETB TR0 and CLR TR0 for timer 0.
The SETB instruction is used to start it and it is stopped by the CLR instruction.
These instructions start and stop the timers as long as GATE = 0 in the TMOD register.
Timers can be started and stopped by an external source by making GATE = 1 in the
TMOD register.
4.11.3 M1 / M2
M1 M2 Mode
0 0 13-bit timer mode.
0 1 16-bit timer mode.
1 0 8-bit auto reload mode.
1 1 Spilt mode.
MICROCONTROLLER PERIPHERALS
MICROCONTROLLER PERIPHERALS
MICROCONTROLLER PERIPHERALS
5.1 Liquid Crystal Display
The LCD is the combination of two states of matter, the solid and liquid. It uses
liquid crystal to produce a visible image. LCDs are super thin technology display
screens that are generally used in laptops, computers.
1. 16x2 LCD
2. 20x4 LCD
5.2 Specifications
• Operating voltage is 4.7v to 5.3v.
• Current consumption is 1mA without backlight.
• Alphanumeric LCD display module.
• It consists of two rows and each row can print 16 characters.
• Each character is built by a 5x8 pixel box.
• Available in green and blue backlight.
• It can also display any custom generated characters.
• It can work in both 8-bit and 4-bit mode.
• Read/Write (RW) :
i. When the R/W pin is low then it performs a write operation.
ii. When the R/W pin is high then it performs a read operation.
• Enable :
i. When the enable pin is high, it allows the commands and data.
ii. When the enable pin is low, it doesn’t allow the commands and data.
• D0 - D7: These are the data input pins.
• Anode & Cathode: These two pins are used for ON and OFF of the LED.
Note:
• When the RS = 0 then the enable pin gets high to receive the commands. After
receiving commands, the enable pin gets low.
• When the RS = 1 then the enable pin gets high to receive the data. After
receiving data, the enable pin gets low.
02 Return home
sbit rs = P2^0;
sbit en = P2^1;
lcdcmd(0x06);
lcdcmd(0x80);
msg(“Good Boy Gopal”);
}
void lcdcmd (unsigned char cmd);
{
LCD = cmd;
rs = 0;
en = 1;
delay (10);
en = 0;
}
void lcddata (unsigned char dat);
{
LCD = dat;
rs = 1;
en = 1;
delay (10);
en = 0;
}
void msg(unsigned char g[])
{
unsigned char k;
for (k=0; g[k]!='\0'; k++)
{
lcddata(g[k]);
}
}
void delay (unsigned int time)
{
int i, j;
for (i=0; i<time; i++)
For (j=0; j<1275; j++);
}
#include <reg51.h>
#define port1 P1
sbit rs = P2^2;
sbit en = P2^3;
void main()
{
lcdcmd(0x28);
lcdcmd(0x0e);
lcdcmd(0x01);
lcdcmd(0x80);
msg("GOOD BOY GOPAL");
}
• To read the keypress, we need to configure the rows as outputs and columns
as inputs.
• Columns are read after applying signals to the rows in order to determine
whether or not a key is pressed and if pressed, which key is pressed.
To detect the key that’s pressed, two ports of the microcontroller are connected
to the rows and columns of the matrix respectively. The port which is connected to the
rows of the matrix is configured as an output port, hence making each row logic 0. On
the contrary, the port which is connected to the columns is configured as an input port,
making the column at logic 1.
To find the row which has the pressed key, the microcontroller grounds the
rows one by one and checks in which case the column is logic zero. This helps the
microcontroller to find which key was pressed.
sbit rw = P0^6;
sbit en = P0^7;
unsigned char keypad[4][4] = {'7','8','9','/',
'4','5','6','x',
'1','2','3','-',
'e','0','=','+'};
void main()
{
unsigned char collocation,rowlocation;
COL = 0xFF;// Sents port 3 as output port
while(1)
{
do
{
ROW =0X00; //sets the row matrix as an input port
collocation = COL;
collocation &= 0x0F;
}while(collocation != 0x0F);// waits for one of the coloumns to be logic 0
do
{
do
{
MSDelay(20);
collocation = COL;
collocation &= 0x0F;
}while(collocation == 0x0F);
MSDelay(20); // delay fucntion to prevent debouncing
collocation = COL;
collocation &=0x0F;
}while(collocation == 0x0F);
while(1) // finds which row the key belong to
{
ROW = 0XFE;
collocation = COL;
collocation &=0x0F;
if(collocation != 0x0F)
{
rowlocation = 0;
break;
}
ROW = 0XFD;
collocation = COL;
collocation &=0x0F;
if(collocation != 0x0F)
{
rowlocation = 1;
break;
}
ROW = 0XFB;
collocation = COL;
collocation &=0x0F;
if(collocation != 0x0F)
{
rowlocation = 2;
break;
}
ROW = 0XF7;
collocation = COL;
collocation &=0x0F;
rowlocation = 3;
break;
}
send_command(0x38); // 16_bit mode; Enable 5x7 dot matrix for each character
MSDelay(250);
send_command(0x0E); // Display ON & cursor ON
MSDelay(250);
send_command(0x01); // Clear the Display
MSDelay(250);
send_command(0x06); // To shift the cursor right
MSDelay(250);
}
void LCDtransfer(unsigned char keypress)
{
ldata = keypress;
rs = 1;
rw = 0;
en = 1;
MSDelay(10);
en = 0;
return;
}
en = 1;
MSDelay(10);
en = 0;
return;
}
5.9 Sensors
A sensor is a device that detects and responds to some type of input from the
physical environment. The specific input could be light, heat, motion, moisture,
pressure, or any one of a great number of other environmental phenomena. The output
is generally a signal that is converted to human-readable display at the sensor location
or transmitted electronically over a network for reading or further processing.
So, the Analogue sensor senses the external parameters (wind speed, solar
radiation, light intensity, etc.) and gives analog voltage as an output. Thus, the output
voltage may be in the range of 0 to 5V. Moreover, Logic High is “1” (3.5 to 5V) and
Logic Low is “0” (0 to 3.5 V).
5.11 IR Sensor
The IR sensor or infrared sensor is one kind of electronic component, used to
detect specific characteristics in its surroundings through emitting or detecting IR
radiation. These sensors can also be used to detect or measure the heat of a target and
its motion. In many electronic devices, the IR sensor circuit is a very essential module.
This kind of sensor is similar to human’s visionary senses to detect obstacles.
Types of IR Sensor
The classification of IR sensors can be done based on the application which
includes the following.
• Active Infrared Sensors
• Passive Infrared Sensors
In order to calculate the distance between the sensor and the object, the sensor
measures the time it takes between the emissions of the sound by the transmitter to its
contact with the receiver. The formula for this calculation is D = ½ T x C (where D is
the distance, T is the time, and C is the speed of sound ~ 343 meters/second).
PIN DESCRIPTION:
Pin15 Pin 15 will control the output polarity of the Pin 14 (Output 4) by
(Input 4) logic signals.
Pin16 Pin 16 will the Power we will provide to the L293D to activate it or
(Vcc) to turn it on. The power level of Pin 16 should be 4.5 – 7Volts.
PROTEUS
PROTEUS
PROTEUS
7.1 Introduction
The Proteus Design Suite is a proprietary software tool suite used primarily for
electronic design automation. The software is used mainly by electronic design
engineers and technicians to create schematics and electronic prints for manufacturing
printed circuit boards.
It was developed in Yorkshire, England by Labcenter Electronics Ltd and is
available in English, French, Spanish and Chinese languages.
7.2 Features
Schematic Capture:
Schematic capture in the Proteus Design Suite is used for both the simulation of designs
and as the design phase of a PCB layout project. It is therefore a core component and
is included with all product configurations.
Microcontroller Simulation:
The micro-controller simulation in Proteus works by applying either a hex file or a
debug file to the microcontroller part on the schematic. It is then co-simulated along
with any analog and digital electronics connected to it.
PCB Design:
The PCB Layout module is automatically given connectivity information in the form
of a netlist from the schematic capture module. It applies this information, together
with the user specified design rules and various design automation tools, to assist with
error free board design. PCB's of up to 16 copper layers can be produced with design
size limited by product configuration.
3D Verification:
The 3D Viewer module allows the board under development to be viewed in 3D
together with a semi-transparent height plane that represents the board’s enclosure.
7.5 SMPS
Required Components:
• Step down transformer (6v)
• AC Source – 230v
• Bridge rectifier
• Capacitor
• Voltage regulator – 5V
• Voltage regulator – 12V
• DC Motor
• LED
S1 = 1;
led = 0;
if (S1 == 0)
{
led = 1;
delay (500);
}
else
{
led = 0;
}
}
void delay (unsigned int time)
{
unsigned int a,b;
for (a=0; a<time; a++)
for (b=0; b<1275; b++);
}
ARDUINO
8.1 Introduction
Arduino is an open-source platform used for building electronics projects.
Arduino consists of both a physical programmable circuit board (often referred to as a
microcontroller) and a piece of software, or IDE (Integrated Development
Environment) that runs on your computer, used to write and upload computer code to
the physical board.
The Arduino platform has become quite popular with people just starting out
with electronics, and for good reason. Unlike most previous programmable circuit
boards, the Arduino does not need a separate piece of hardware (called a programmer)
in order to load new code onto the board -- you can simply use a USB cable.
Additionally, the Arduino IDE uses a simplified version of C++, making it easier to
learn to program. Finally, Arduino provides a standard form factor that breaks out the
functions of the micro-controller into a more accessible package.
• Arduino Nano
• Arduino Micro
• Arduino Bluetooth
• Arduino Ethernet
• NodeMcu Board
• Arduino Diecimila
• Arduino Zero
The board is equipped with sets of digital and analog input/output (I/O) pins
that may be interfaced to various expansion boards (shields) and other circuits. The
board has 14 digital I/O pins (six capable of PWM output), 6 analog I/O pins, and is
programmable with the Arduino IDE (Integrated Development Environment), via a
type B USB cable. It can be powered by the USB cable or by an external 9-volt battery,
though it accepts voltages between 7 and 20 volts. It is similar to the Arduino Nano and
Leonardo.
The word "uno" means "one" in Italian and was chosen to mark the initial
release of Arduino Software. The Uno board is the first in a series of USB-based
Arduino boards; it and version 1.0 of the Arduino IDE were the reference versions of
Arduino, which have now evolved to newer releases. The ATmega328 on the board
comes preprogrammed with a bootloader that allows uploading new code to it without
the use of an external hardware programmer.
External Interrupt Pins: This pin of the Arduino board is used to produce the External
interrupt and it is done by pin numbers 2 and 3.
PWM Pins: This pins of the board is used to convert the digital signal into an analog
by varying the width of the Pulse. The pin numbers 3, 5, 6, 9, 10 and 11 are used as a
PWM pin.
SPI Pins: This is the Serial Peripheral Interface pin, it is used to maintain SPI
communication with the help of the SPI library. SPI pins include:
SS: Pin number 10 is used as a Slave Select
MOSI: Pin number 11 is used as a Master Out Slave In
MISO: Pin number 12 is used as a Master In Slave Out
SCK: Pin number 13 is used as a Serial Clock
LED Pin: The board has an inbuilt LED using digital pin-13. The LED glows only
when the digital pin becomes high.
AREF Pin: This is an analog reference pin of the Arduino board. It is used to provide
a reference voltage from an external power supply
• Medical Instrument.
• Emergency Light for Railways.
The Arduino IDE supports the languages C and C++ using special rules of code
structuring. The Arduino IDE supplies a software library from the Wiring project,
which provides many common input and output procedures. User-written code only
requires two basic functions, for starting the sketch and the main program loop, that are
compiled and linked with a program stub main() into an executable cyclic executive
program with the GNU toolchain, also included with the IDE distribution. The Arduino
IDE employs the program avrdude to convert the executable code into a text file in
hexadecimal encoding that is loaded into the Arduino board by a loader program in the
board's firmware.
To get it started with Arduino Uno board and blink the built-in LED, load the
example code by selecting Files>Examples>Basics>Blink. Once the example code
(also shown below) is loaded into your IDE, click on the ‘upload’ button given on the
top bar. Once the upload is finished, you should see the Arduino’s built-in LED
blinking.
lcd.setCursor(0, 0);
lcd.print("Who is Goodboy?");
delay(500);
lcd.setCursor(0, 1);
lcd.print("The GopalKrishna!");
}
void loop() {
}
{'.','0','=','+'}
};
byte rowPins[ROWS] = {7,6,5,4}; //connect to the row pinouts of the keypad
byte colPins[COLS] = {3,2,1,0}; //connect to the column pinouts of the keypad
//initialize an instance of class NewKeypad
Keypad customKeypad = Keypad( makeKeymap(hexaKeys), rowPins, colPins,
ROWS, COLS);
LiquidCrystal lcd(13, 12, 11, 10, 9, 8);
void setup()
{
lcd.begin(16, 2);
lcd.print("TheGopalKrishna!");
lcd.setCursor(0, 1);
}
void loop()
{
char customKey = customKeypad.getKey();
if (customKey)
{
lcd.print(customKey);
}
if (customKey=='.')
{
lcd.clear();
lcd.begin(16, 2);
lcd.print("TheGopalKrishna");
lcd.setCursor(0, 1);
}
}