SUBMITTED TO
Mrs .Monika Mehra
(ECE-HOD)
SUBMITTED BY
GAGANDEEP
1514002
 INDIAN SERVICE MACHINE (Abbreviated as ISM) is the
company name that our founder felt appropriate, following the
lines of IBM (International Business Machine), ambitiously to
grow to the level.
 ISM was established in the year 1994 as a small scale industry
to assemble and resale PC’s and service PC’s, immediately
diversified to offer training based on PC Technologies.
 Over the period ISM felt native training clients on Embedded
Systems, having identified their strength in Embedded System
design and development; ISM acquired expertise on this domain
and collaborated with Embedded industry to offer an industry
relevant Embedded Systems training programs.
 Introduction of Embedded system & IOT
 8-bit microcontroller (8051)
 Minor project based on (8051)
 ARM 7/cortex m-3 (32-bit microcontrollers)
 ARM Protocols
 IPC In Linux
•An embedded system is some combination of computer
hardware and software, either fixed in capability or
programmable, that is specifically designed for a
particular function
What makes Embedded systems
different?
•Real time operation
• Size
• Cost
• Time
• Reliability
• Safety
• Energy
 Microcontroller is a VLSI chip which consist of a CPU
 CPU is a device Which executes instruction
Block diagram
Hardware used:-
• 8051 Microcontroller
• RFID Reader
• GSM Module
• LCD interface
Software used:-
•Kiel μVision IDE
• Uart protocol( flash-
magic)
General assembly
• A RFID tags used to indentified the unique ID
number
•The controller then matches the unique
code to the Central Database. Stipulated
price of the toll will be deducted from his
account..
•Then an SMS will be sent to the owner
using the GSM module about how much
money has been debited from his account.
APPLICATIONS
•Thus it can be installed inside the car from where it is not visible.
•As the cars need to be at a specified position for the system to scan the number plate
which is not required in RFID based system.
•Security is an added advantage
Block diagram of ARM based microcontroller
Important Protocols of ARM
•I2C
•Features of I2C
Only two bus lines are required; a serial data line (SDA) and a serial clock line (SCL)
•Each device connected to the bus is software addressable by a unique address and simple
master/slave relationships exist at all times;
•masters can operate as master-transmitters or as master-receivers
•It’s a true multi-master bus including collision detection and arbitration to prevent data
corruption if two or more masters simultaneously initiate data transfer
•Serial, 8-bit oriented, bi-directional data transfers can be made at up to 100 kbit/s in the
Standard-mode, up to 400 kbit/s in the Fast-mode, or up to 3.4 Mbit/s in the High-speed
mode.
•On-chip filtering rejects spikes on the bus data line to preserve data integrity
•The number of ICs that can be connected to the same bus is limited only by a maximum
bus capacitance of 400 pF
Control area network (CAN)
•The CAN Bus is an automotive bus developed by Robert Bosch
•CAN is a serial bus protocol to connect individual systems and
sensors as an alternative to conventional multi-wire looms.
•The Controller Area Network (CAN) is a serial communication way,
which efficiently supports distributed real-time control with a very
high level of security.
•It allows automotive components to
communicate on a dual-wire
networked data bus up to 1Mbps
•CAN is based on the “broadcast
communication mechanism”, which
is based on a message-oriented
transmission protocol.
SPI---Serial Peripheral Interface
•The Serial Peripheral Interface (SPI) bus was
developed by Motorola to provide full-duplex
synchronous serial communication between
master and slave devices.
•SPI can be clocked up to 10 MHz.
•The SPI busis commonly used for
communication with Flash memory,
•sensors, real-time clocks (RTCs),
analog-to-digital converters, and more
•SPI
Modes in SPI
•The frame of the data exchange is described by two
parameters, the clock polarity (CPOL) and the clock phase
(CPHA).
•This diagram shows the four possible states for these
parameters and the corresponding mode in SPI
Introducation of Embedded Linux
•Linux is a 100% free operating system
• Linus Torvalds. who was then a student at the
University of Helsinki in Finland, developed
Linux in 1991
•Implementation of IPC using Pipes, FIFO,
Message Queue for IPC, System calls related to
pipes, FIFO’s & Message Queues, Using ipcs,
ipcrm, Sample program
Inter Process Communication
•Files
•Pipes
• Message Queue
• Shared Memory
• Semaphores
• Signals
• Sockets
Files System Call
Create File =int creat (const char * pathname, int flags)
int open (const char * pathname, int flags)
Flags : O_RDONLY, O_WRONLY, O_RDWRO_CREAT , O_APPEND,
O_NONBLOCK,
ssize_t write = int (fd, void *buf, size_t count)
lseek System Call = off_t lseek ( int fd, off_t offset, int where)
Where : SEEK_SET, SEEK_CUR, SEEK_END
Pipes
•We use the term pipe when we connected a data flow from one process
•to another.
•In linux we familiar with a pipe “ | ” which is used to linking shell
system call used to create pipes
int open( const char *path, O_RDONLY |O_NONBLOCK);
int read( pid, buffer , size);
int write(pid, buffer , size);
pid ----- Descriptor returned by open()
buffer ----- Character buffer
size ----- Size of buffer
Message Queue
Features of Message Queue
•Easy and efficient .
•Used between related and unrelated process.
•Provide sending block of data.
•Blocking & Synchronization problems are
..avoid.
System Calls related to Message Queue
int msgget (key_t key,int msgflag); key ------- An arbitrary number
Msgflag--------- IPC_PRIVATE
IPC_CREAT
int msgsnd (int msqid,const void*msg_ptr,size_t msg_szint msgflag);
int msgrcv (int msqid,void *msg_ptr,size_t msg_sz,long int mtype,int
msgflag) ;
Sockets
Why do we need sockets?
•Provides an abstraction for interprocess
communication
Function:-
Initiate and accept a connection
Define an “end- point” for communication
Send and receive data
Terminate a connection gracefully
Types of sockets
Stream socket :(connection- oriented socket)
– It provides reliable, connected networking service
– Error free; no out- of- order packets (uses TCP)
– applications: telnet/ ssh, http, …
Continue…
• Datagram socket :( connectionless socket)
– It provides unreliable, best- effort
networking service
– Packets may be lost; may arrive out
of order (uses UDP)
– applications: streaming audio/
video (real-player), …
Client Server
System call
Make socket sock = socket( AF_ INET, SOCK_ STREAM, 0);
Setup structure
(
memset(& sin, 0, sizeof( sin));
sin. sin_ family = AF_ INET;
sin. sin_ addr. s_ addr = htonl( INADDR_ ANY);
sin. sin_ port = htons( port);
);
Bind if (bind( sock, (struct sockaddr *) &sin, sizeof( sin)) < 0)
return -1;
return sock;
sock = accept ( listen_ socket, (struct sockaddr *) &sin, &sin_ len);
return sock;
socket()
bind()
listen()
accept()
read()
write()
read()
close()
Socket()
connect()
write()
read()
close()
TCP Client
TCP Server
Well-known port
blocks until connection from client
process request
Connection establishment
Functionallty
Ppt on six month training on embedded system & IOT

Ppt on six month training on embedded system & IOT

  • 1.
    SUBMITTED TO Mrs .MonikaMehra (ECE-HOD) SUBMITTED BY GAGANDEEP 1514002
  • 2.
     INDIAN SERVICEMACHINE (Abbreviated as ISM) is the company name that our founder felt appropriate, following the lines of IBM (International Business Machine), ambitiously to grow to the level.  ISM was established in the year 1994 as a small scale industry to assemble and resale PC’s and service PC’s, immediately diversified to offer training based on PC Technologies.  Over the period ISM felt native training clients on Embedded Systems, having identified their strength in Embedded System design and development; ISM acquired expertise on this domain and collaborated with Embedded industry to offer an industry relevant Embedded Systems training programs.
  • 3.
     Introduction ofEmbedded system & IOT  8-bit microcontroller (8051)  Minor project based on (8051)  ARM 7/cortex m-3 (32-bit microcontrollers)  ARM Protocols  IPC In Linux
  • 4.
    •An embedded systemis some combination of computer hardware and software, either fixed in capability or programmable, that is specifically designed for a particular function What makes Embedded systems different? •Real time operation • Size • Cost • Time • Reliability • Safety • Energy
  • 6.
     Microcontroller isa VLSI chip which consist of a CPU  CPU is a device Which executes instruction
  • 7.
    Block diagram Hardware used:- •8051 Microcontroller • RFID Reader • GSM Module • LCD interface Software used:- •Kiel μVision IDE • Uart protocol( flash- magic)
  • 8.
    General assembly • ARFID tags used to indentified the unique ID number •The controller then matches the unique code to the Central Database. Stipulated price of the toll will be deducted from his account.. •Then an SMS will be sent to the owner using the GSM module about how much money has been debited from his account. APPLICATIONS •Thus it can be installed inside the car from where it is not visible. •As the cars need to be at a specified position for the system to scan the number plate which is not required in RFID based system. •Security is an added advantage
  • 9.
    Block diagram ofARM based microcontroller
  • 10.
    Important Protocols ofARM •I2C •Features of I2C Only two bus lines are required; a serial data line (SDA) and a serial clock line (SCL) •Each device connected to the bus is software addressable by a unique address and simple master/slave relationships exist at all times; •masters can operate as master-transmitters or as master-receivers •It’s a true multi-master bus including collision detection and arbitration to prevent data corruption if two or more masters simultaneously initiate data transfer •Serial, 8-bit oriented, bi-directional data transfers can be made at up to 100 kbit/s in the Standard-mode, up to 400 kbit/s in the Fast-mode, or up to 3.4 Mbit/s in the High-speed mode. •On-chip filtering rejects spikes on the bus data line to preserve data integrity •The number of ICs that can be connected to the same bus is limited only by a maximum bus capacitance of 400 pF
  • 11.
    Control area network(CAN) •The CAN Bus is an automotive bus developed by Robert Bosch •CAN is a serial bus protocol to connect individual systems and sensors as an alternative to conventional multi-wire looms. •The Controller Area Network (CAN) is a serial communication way, which efficiently supports distributed real-time control with a very high level of security.
  • 12.
    •It allows automotivecomponents to communicate on a dual-wire networked data bus up to 1Mbps •CAN is based on the “broadcast communication mechanism”, which is based on a message-oriented transmission protocol.
  • 13.
    SPI---Serial Peripheral Interface •TheSerial Peripheral Interface (SPI) bus was developed by Motorola to provide full-duplex synchronous serial communication between master and slave devices. •SPI can be clocked up to 10 MHz. •The SPI busis commonly used for communication with Flash memory, •sensors, real-time clocks (RTCs), analog-to-digital converters, and more •SPI
  • 14.
    Modes in SPI •Theframe of the data exchange is described by two parameters, the clock polarity (CPOL) and the clock phase (CPHA). •This diagram shows the four possible states for these parameters and the corresponding mode in SPI
  • 15.
    Introducation of EmbeddedLinux •Linux is a 100% free operating system • Linus Torvalds. who was then a student at the University of Helsinki in Finland, developed Linux in 1991 •Implementation of IPC using Pipes, FIFO, Message Queue for IPC, System calls related to pipes, FIFO’s & Message Queues, Using ipcs, ipcrm, Sample program
  • 16.
    Inter Process Communication •Files •Pipes •Message Queue • Shared Memory • Semaphores • Signals • Sockets
  • 17.
    Files System Call CreateFile =int creat (const char * pathname, int flags) int open (const char * pathname, int flags) Flags : O_RDONLY, O_WRONLY, O_RDWRO_CREAT , O_APPEND, O_NONBLOCK, ssize_t write = int (fd, void *buf, size_t count) lseek System Call = off_t lseek ( int fd, off_t offset, int where) Where : SEEK_SET, SEEK_CUR, SEEK_END
  • 18.
    Pipes •We use theterm pipe when we connected a data flow from one process •to another. •In linux we familiar with a pipe “ | ” which is used to linking shell system call used to create pipes int open( const char *path, O_RDONLY |O_NONBLOCK); int read( pid, buffer , size); int write(pid, buffer , size); pid ----- Descriptor returned by open() buffer ----- Character buffer size ----- Size of buffer
  • 19.
    Message Queue Features ofMessage Queue •Easy and efficient . •Used between related and unrelated process. •Provide sending block of data. •Blocking & Synchronization problems are ..avoid. System Calls related to Message Queue int msgget (key_t key,int msgflag); key ------- An arbitrary number Msgflag--------- IPC_PRIVATE IPC_CREAT int msgsnd (int msqid,const void*msg_ptr,size_t msg_szint msgflag); int msgrcv (int msqid,void *msg_ptr,size_t msg_sz,long int mtype,int msgflag) ;
  • 20.
    Sockets Why do weneed sockets? •Provides an abstraction for interprocess communication
  • 21.
    Function:- Initiate and accepta connection Define an “end- point” for communication Send and receive data Terminate a connection gracefully Types of sockets Stream socket :(connection- oriented socket) – It provides reliable, connected networking service – Error free; no out- of- order packets (uses TCP) – applications: telnet/ ssh, http, … Continue…
  • 22.
    • Datagram socket:( connectionless socket) – It provides unreliable, best- effort networking service – Packets may be lost; may arrive out of order (uses UDP) – applications: streaming audio/ video (real-player), … Client Server
  • 23.
    System call Make socketsock = socket( AF_ INET, SOCK_ STREAM, 0); Setup structure ( memset(& sin, 0, sizeof( sin)); sin. sin_ family = AF_ INET; sin. sin_ addr. s_ addr = htonl( INADDR_ ANY); sin. sin_ port = htons( port); ); Bind if (bind( sock, (struct sockaddr *) &sin, sizeof( sin)) < 0) return -1; return sock; sock = accept ( listen_ socket, (struct sockaddr *) &sin, &sin_ len); return sock;
  • 24.
    socket() bind() listen() accept() read() write() read() close() Socket() connect() write() read() close() TCP Client TCP Server Well-knownport blocks until connection from client process request Connection establishment Functionallty

Editor's Notes