SlideShare a Scribd company logo
By: Imran sheikh
Microcontroller from basic_to_advanced
Microcontroller from basic_to_advanced
 Architectures:
– Von Neumann
– Harvard
– Harvard modified
 Microcontroller
8 bit
16bit
32bit,etc.
 Digital Signal Processor
Digital Signal Controller
 FPGA/ASIC-Programmable Logic
 SoC-Processor System & Programmable
Logics
 Arduino IDE
 Energia
 Python IDE
 IAR workbench
 Keil
 CCS
 Xilinx ISE/Vivado web edition
 Arduino
 Raspberry Pi
 8051 development board
 PIC development board
 Tiva C series
 STM32F4
 Many more…..
 There are different programming styles
available to use or we can create it by mixing
one in another. Standards available languages
are:
◦ Assembly level: Board specific
◦ Embedded c: Generalized with common instructions
 C/C++
 Embedded C
 Python
 VHDL
 Verilog
 MATLAB
 Simulink
 External Memeories
 RS232
 CAN
 LAN(RJ45)
 SPI
 I2C
 PCI
 PCIe
 Other networking protocols
 Temperature sensor module
 Vibration switch module
 Hall magnetic sensor module
 Key switch module
 Infrared emission sensor module
 Small passive buzzer module
 Laser sensor module
 3-color full-color LED SMD modules
 Optical broken module
 Etc..many more available on:
https://tkkrlab.nl/wiki/Arduino_37_sensors
 Unsigned Integers
◦ All eight bits represent the magnitude of a number
 Bit7 to Bit0
◦ Range 00H to FFH (010 to 25510)
12
 Signed Integers
◦ 2's Complement
 Bit7 is sign bit
◦ Positive numbers: 00H to 7FH (010 to 12710)
◦ Negative numbers: 80H to FFH (-110 to -12810)
13
 Binary Coded Decimal Numbers (BCD)
◦ 8-bit number divided into two groups of four
 Each group represents a decimal digit from 0 to 9
◦ AH through FH are invalid
◦ Example: 0010 0101BCD = 2510
14
 American Standard Code for Information
Interchange (ASCII)
◦ 7-bit alphanumeric code with 128 combinations
(00H to 7FH)
◦ Represents English alphabet, decimal digits from 0
to 9, symbols, and commands
15
 Which is easy?
Assembly Language Embedded C Language
Microcontroller from basic_to_advanced
Microcontroller from basic_to_advanced
 Meeting the computing needs of the task
efficiently and cost effectively
 Speed, the amount of ROM and RAM, the
number of I/O ports and timers, size,
packaging, power consumption
 Easy to upgrade
 Cost per unit
 Availability of software development tools
 Assemblers, debuggers, C compilers,
emulator, simulator, technical support
 Wide availability and reliable sources of the
microcontrollers.
 A Harvard Architecture (separate
instruction/data memories)
 Single chip Microcontroller(µC)
 Developed by Intel in 1980 for use in
embedded systems.
 Today largely superseded by a vast range
of faster and/or functionally enhanced
8051-compatible devices manufactured
by more than 20 independent
manufacturers
Feature 8051 8052 8031
ROM (program space in bytes) 4K 8K 0K
RAM (bytes) 128 256 128
Timers 2 3 2
I/O pins 32 32 32
Serial port 1 1 1
Interrupt sources 6 8 6
Comparison of the 8051
Family
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
40
39
38
37
36
35
34
33
32
31
30
29
28
27
26
25
24
23
22
21
P1.0
P1.1
P1.2
P1.3
P1.4
P1.5
P1.6
P1.7
RST
(RXD)P3.0
(TXD)P3.1
(T0)P3.4
(T1)P3.5
XTAL2
XTAL1
GND
(INT0)P3.2
(INT1)P3.3
(RD)P3.7
(WR)P3.6
Vcc
P0.0(AD0)
P0.1(AD1)
P0.2(AD2)
P0.3(AD3)
P0.4(AD4)
P0.5(AD5)
P0.6(AD6)
P0.7(AD7)
EA/VPP
ALE/PROG
PSEN
P2.7(A15)
P2.6(A14)
P2.5(A13)
P2.4(A12)
P2.3(A11)
P2.2(A10)
P2.1(A9)
P2.0(A8)
8051
(8031)
23
 MPU (CPU)
◦ Read instructions
◦ Process binary data
24
 Storage Device
◦ Addresses
◦ Registers
 Major Categories
◦ Read/Write Memory
(R/W)
◦ Read-only-Memory
(ROM)
25
D7 D0
 Input Devices
◦ Switches and Keypads
◦ Provide binary information to the MPU
 Output devices
◦ LEDs and LCDs
◦ Receive binary information from the MPU
26
 MPU communicates with Memory and I/O
using the System Bus
◦ Address bus
 Unidirectional
 Memory and I/O Addresses
◦ Data bus
 Bidirectional
 Transfers Binary Data and Instructions
◦ Control lines
 Read and Write timing signals
27
28
 Machine Language
◦ Binary Instructions
◦ Difficult to decipher and write
 Error-prone
◦ All programs converted into machine language for
execution
29
Instructio
n
He
x
Mnemoni
c
Description Processor
1000000
0
80 ADD B Add reg B to Acc Intel 8085
0010100
0
28 ADD A,
R0
Add Reg R0 to
Acc
Intel 8051
0001101
1
1B ABA Add Acc A and B Motorola
6811
 Assembly Language
◦ Machine instructions represented in mnemonics
◦ One-to-one correspondence
◦ Efficient execution and use of memory
◦ Machine-specific
30
 High-Level Languages
◦ BASIC, C, and C++
◦ Written in statements of spoken languages
◦ Machine independent
◦ Easy to write and troubleshoot
◦ Larger memory and less efficient execution
31
Microcontroller from basic_to_advanced
 RISC CPUs
◦ 8-bit
◦ 16-bit
 Number of I/O pins: 4-70
 Memory types and sizes:
◦ Flash; OTP; ROM
◦ 0.5k – 256k
5/6 Programming
pins
8 A/D channels
2 Oscillator Inputs
2 RS-232 inputs
33 I/O ports
 Download @ http://microchip.com
 Assembly compiler for programming PICs
 Based on specific PIC instruction set
PIC: Elements of a
digital controller
CPU
Central
Processing
Unit
Input
Peripherals
Output
Peripherals
ROM
Read Only
Memory
RAM
Read & Write
Memory
Program
download
User
input
User
output
The microcontroller contains all these elements in one chip
16F877 pin-out
The microcontroller pins have multiple functions
Screenshot of MPLAB Project
The C program is compiled and tested in simulation mode
Microcontroller from basic_to_advanced
ARM
 Developed at Acorn Computers Limited,
of Cambridge, England,
between 1983 and 1985
 Problems with CISC:
 Slower then memory parts
 Clock cycles per instruction
41
 Typical RISC architecture:
 Large uniform register file
 Load/store architecture
 Simple addressing modes
 Uniform and fixed-length instruction fields
42
 Enhancements:
 Each instruction controls the ALU and shifter
 Auto-increment
and auto-decrement addressing modes
 Multiple Load/Store
 Conditional execution
43
 Floating Point Processor-Ex.TMS320F28335
 Fixed Point Processor-Ex.TMS320F6745
Digital Signal Controller
 Simple logic gates
◦ combine transistors to
implement combinational
and sequential logic
 Interconnect
◦ wires to connect inputs and
outputs to logic blocks
 I/O blocks
◦ special blocks at periphery
for external connections
 Add wires to make connections
◦ done when chip is fabbed
 “mask-programmable”
◦ construct any circuit
 Logic blocks
◦ to implement combinational
and sequential logic
 Interconnect
◦ wires to connect inputs and
outputs to logic blocks
 I/O blocks
◦ special logic blocks at periphery
of device for external connections
 Key questions:
◦ how to make logic blocks programmable?
◦ how to connect the wires?
◦ after the chip has been fabbed
 Soft-core are available with FPGA /ASIC’s and
SoC.
◦ ARM processor
◦ Microblaze processor
 Implementation of random logic
◦ easier changes at system-level (one device is modified)
◦ can eliminate need for full-custom chips
 Prototyping
◦ ensemble of gate arrays used to emulate a circuit to be
manufactured
◦ get more/better/faster debugging done than possible with
simulation
 Reconfigurable hardware
◦ one hardware block used to implement more than one function
◦ functions must be mutually-exclusive in time
◦ can greatly reduce cost while enhancing flexibility
◦ RAM-based only option
 Special-purpose computation engines
◦ hardware dedicated to solving one problem (or class of
problems)
◦ accelerators attached to general-purpose computers
 Complete ARM®-based processing system
◦ Application Processor Unit (APU)
 Dual ARM Cortex™-A9 processors
 Caches and support blocks
◦ Fully integrated memory controllers
◦ I/O peripherals
 Tightly integrated programmable logic
◦ Used to extend the processing system
◦ Scalable density and performance
 Flexible array of I/O
◦ Wide range of external multi-standard I/O
◦ High-performance integrated serial transceivers
◦ Analog-to-digital converter inputs
Microcontroller from basic_to_advanced
 The Zynq-7000 AP SoC architecture consists
of two major sections
◦ PS: Processing system
 Dual ARM Cortex-A9 processor based
 Multiple peripherals
 Hard silicon core
◦ PL: Programmable logic
 digital logic design
Microcontroller from basic_to_advanced
 Three basic modes:
◦ 1. Continuous dedicated monitoring of the sensor
by the microprocessor
◦ 2. Polling the sensor
◦ 3. Interrupt mode
 Microprocessor is dedicated for use with the
sensor
 Its output is monitored by the microprocessor
continuously
 The microprocessor reads the sensor’s output
at a given rate
 Output is then used to act
 Sensor operates as if the microprocessor did
not exist.
 Its output is monitored by the microprocessor
 The microprocessor reads the sensor’s output
at a given rate or intervals - poling
 Output is then used to act
 Microprocessor is in sleep mode
 Outputs of the sensor are not being
processed
 Upon a given event, microprocessor wakes up
through one of its interrupt options
 The sensor activates the interrupt
 Interrupts can be timed
 Interrupts can be issued by sources other
than the sensor
 The microprocessor may be involved in other
functions, separate from the sensor, such as
control of an actuator
 Feedback from actuators may also be used to
perform interrupts
 Microprocessor input interfacing
requirements
 Microprocessor output requirements
 Errors introduced by microprocessors
 Signal level
 Impedance and matching
 Response, frequency
 Signal conditioning
 Signal scaling
 Isolation
 Loading
 Signal levels
 Power levels
 Isolation
 Basic level: zero to Vdd
◦ Must scale signals if necessary
 No dual polarity signals
◦ Must translate/scale as necessary
 Direct reading or A/D
 Can read voltages only
◦ AC or DC
◦ Limitations in frequency
 P are high input impedance devices
◦ ~ 1 - 10 M
◦ Input current - < 1 A.
 Ideal for direct connection of low
impedance sensors (magnetic, thermistors,
thermoelectric, etc.)
 High impedance sensors (capacitive,
pyroelectric, etc.) must be buffered
◦ Voltage followers
◦ FET amplifiers
 Most sensors are slow devices
◦ Can be interfaced directly
◦ No concern for response and frequency range
 Some sensors are part of oscillators
◦ Frequencies may be quite high
◦ Need to worry about proper sampling by the
microprocessor
 Example: 10 mHz P, cycle time of 0.4 s.
(most processor divide the clock frequency
by a factor - 4 in this case)
 Any operation such as reading an input
required n cycles, say n=5
 Effective frequency: 0.5 MHz
 Sampling cannot be done at rates higher
than 250 kHz
 Any sensor producing a signal above this
frequency will be read erroneously
 Some solutions:
◦ Divide the sensor’s frequency
 Reduces sensitivity
 Must be done externally to the P
◦ F-V converter
 Introduces conversion errors
 Must be done externally
◦ Frequency counter at input
 Use output of the counter as input to mP.
 Expensive
◦ Faster microprocessors
 Offset
◦ Primarily for dc levels
◦ Can be offset up or down
◦ Usually done to remove the dc level
◦ Sometimes needed to remove negative polarity.
◦ AC signals may sometimes be coupled through
capacitors to eliminate dc levels
 Example
◦ Thermistor: 500 at 20ºC
◦ Varies from 100 to 900 for temp. between 0
and 100ºC
 At 500ºC
◦ V = (12/1500)*500 = 4 V
 At 0ºC
◦ V = (12/1400)*400 = 3.428 V
 At 100ºC
◦ V = (12/1900)*900 = 5.684 V
 V varies between 3.428V and 5.684V
◦ 5.684V is above the 5V operating voltage of the
microprocessor
 Errors introduced by the microprocessor:
◦ Due to resolution of A/D, D/A
◦ Sampling errors
 These come in addition to any errors in the
sensor/actuator
 Most microprocessors are 8 bit
microprocessors
 Integer arithmetics
 Largest value represented: 256
 Roundoff errors due to this representation
 Special math subroutines have been
developed to minimize these errors
(otherwise they would be unacceptably high)
 All inputs and outputs on a microprocessor
are sampled. That is:
◦ Inputs are only read at intervals
◦ Outputs are only updated at intervals
◦ Intervals depend on the frequency of the clock, operation to
be executed and on the software that executes it
◦ Sampling may not even be constant during operation because
of the need to perform different tasks at different times
◦ Errors are due to changes in input/output between sampling
to which the microprocessor is oblivious
◦ Errors are not fixed - depend among other things on how
well the program is written
Microcontroller from basic_to_advanced
 There are lots of application use
microcontroller some of them are given
below:
◦ CAR
◦ Refrigerator
◦ Airplane
◦ Trains
◦ Medical devices, etc.
Some example will be explained in Last slides.
75
76
Microcontroller from basic_to_advanced
 Microcontroller and Microprocessor
 Digital System
 Signal and System(Z transform and Filter
Designing)
 Digital Signal Processing
 Networking
 Control system
 Basic analog design
Contact: imran.sheikh.vjti@gmail.com

More Related Content

What's hot (20)

PDF
System-on-Chip Design, Embedded System Design Challenges
pboulet
 
PPTX
Mac protocols
juno susi
 
PPTX
DAC and sensor interfacing with PIC
Sasidharan Srinivasan
 
PDF
DDR4 SDRAM : Notes
Subhajit Sahu
 
PPT
Fpga Knowledge
ranvirsingh
 
PPTX
Risc cisc Difference
Sehrish Asif
 
PDF
Tutorial on IEEE 802.15.4e standard
Giuseppe Anastasi
 
PDF
RAM (Random Access Memory)
divyanshbatham
 
PPTX
Pic microcontroller architecture
DominicHendry
 
PPT
SPI Bus Protocol
Sudhanshu Janwadkar
 
PPTX
wireless sensor network
A. Shamel
 
PPTX
I2c protocol - Inter–Integrated Circuit Communication Protocol
Ankur Soni
 
PPTX
Microprocessor
Anand Tiwari
 
PPTX
RISC and ARM contollers Design-Philosophy.pptx
Amit Suryavanshi
 
PDF
SRAM Design
Bharat Biyani
 
PDF
Introduction to Microprocessor and Microcontroller.pdf
Engineering Funda
 
PPT
Embedded System Basics
Dr M Muruganandam Masilamani
 
PPTX
Designing memory controller for ddr5 and hbm2.0
Deepak Shankar
 
PPTX
Pentium processor
Pranjali Deshmukh
 
PPT
microcontroller basics
sagar Ramdev
 
System-on-Chip Design, Embedded System Design Challenges
pboulet
 
Mac protocols
juno susi
 
DAC and sensor interfacing with PIC
Sasidharan Srinivasan
 
DDR4 SDRAM : Notes
Subhajit Sahu
 
Fpga Knowledge
ranvirsingh
 
Risc cisc Difference
Sehrish Asif
 
Tutorial on IEEE 802.15.4e standard
Giuseppe Anastasi
 
RAM (Random Access Memory)
divyanshbatham
 
Pic microcontroller architecture
DominicHendry
 
SPI Bus Protocol
Sudhanshu Janwadkar
 
wireless sensor network
A. Shamel
 
I2c protocol - Inter–Integrated Circuit Communication Protocol
Ankur Soni
 
Microprocessor
Anand Tiwari
 
RISC and ARM contollers Design-Philosophy.pptx
Amit Suryavanshi
 
SRAM Design
Bharat Biyani
 
Introduction to Microprocessor and Microcontroller.pdf
Engineering Funda
 
Embedded System Basics
Dr M Muruganandam Masilamani
 
Designing memory controller for ddr5 and hbm2.0
Deepak Shankar
 
Pentium processor
Pranjali Deshmukh
 
microcontroller basics
sagar Ramdev
 

Similar to Microcontroller from basic_to_advanced (20)

PPTX
Embedded Systems Introdution
Sheikh Ismail
 
PDF
E-Note_19681_Content_Document_20240512114009AM.pdf
gowdapriya678
 
PPTX
Msp 430 architecture module 1
SARALA T
 
PPT
Lecture 1 (course overview and 8051 architecture) rv01
cairo university
 
PPTX
SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT I Core of Embedded Systems
Arti Parab Academics
 
PPT
Ajal mod 1
AJAL A J
 
PPT
Embeded system by Mitesh Kumar
Mitesh Kumar
 
PPT
Embedded systems-unit-1
Prabhu Mali
 
PDF
Architecture and Programmingpart1_Microcontroller
ssuser1bfdb5
 
PPTX
Chapter 1 Introductuon to Microcontrollers_2023.pptx
huypmg22git
 
PPTX
CHAPTER1.pptx ON 8051 MICROCONTROLLER INTRODUCTION CHAPTER
NagarathnaRajur2
 
PPTX
Embedded System basic and classifications
rajkciitr
 
PPTX
Chapter_2_ESD_Typical Embedded System.pptx
ShanthiM13
 
PPT
Microprocessor Based Systems.ppt
TALHARIAZ46
 
PPTX
Embedded systems - UNIT-1 - Mtech
sangeetha rakhi
 
PDF
Solution manual the 8051 microcontroller based embedded systems
manishpatel_79
 
PPTX
Project report on embedded system using 8051 microcontroller
Vandna Sambyal
 
PPT
Embedded systems, 8051 microcontroller
Amandeep Alag
 
PPT
presentation_microcontroller_1457634560_181219.ppt
LalithKumar818864
 
Embedded Systems Introdution
Sheikh Ismail
 
E-Note_19681_Content_Document_20240512114009AM.pdf
gowdapriya678
 
Msp 430 architecture module 1
SARALA T
 
Lecture 1 (course overview and 8051 architecture) rv01
cairo university
 
SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT I Core of Embedded Systems
Arti Parab Academics
 
Ajal mod 1
AJAL A J
 
Embeded system by Mitesh Kumar
Mitesh Kumar
 
Embedded systems-unit-1
Prabhu Mali
 
Architecture and Programmingpart1_Microcontroller
ssuser1bfdb5
 
Chapter 1 Introductuon to Microcontrollers_2023.pptx
huypmg22git
 
CHAPTER1.pptx ON 8051 MICROCONTROLLER INTRODUCTION CHAPTER
NagarathnaRajur2
 
Embedded System basic and classifications
rajkciitr
 
Chapter_2_ESD_Typical Embedded System.pptx
ShanthiM13
 
Microprocessor Based Systems.ppt
TALHARIAZ46
 
Embedded systems - UNIT-1 - Mtech
sangeetha rakhi
 
Solution manual the 8051 microcontroller based embedded systems
manishpatel_79
 
Project report on embedded system using 8051 microcontroller
Vandna Sambyal
 
Embedded systems, 8051 microcontroller
Amandeep Alag
 
presentation_microcontroller_1457634560_181219.ppt
LalithKumar818864
 
Ad

Recently uploaded (20)

PPTX
Introduction to File Transfer Protocol with commands in FTP
BeulahS2
 
PPTX
ASBC application presentation template (ENG)_v3 (1).pptx
HassanMohammed730118
 
PDF
June 2025 Top 10 Sites -Electrical and Electronics Engineering: An Internatio...
elelijjournal653
 
PDF
CLIP_Internals_and_Architecture.pdf sdvsdv sdv
JoseLuisCahuanaRamos3
 
PPTX
Bharatiya Antariksh Hackathon 2025 Idea Submission PPT.pptx
AsadShad4
 
PPTX
Stability of IBR Dominated Grids - IEEE PEDG 2025 - short.pptx
ssuser307730
 
PPTX
FSE_LLM4SE1_A Tool for In-depth Analysis of Code Execution Reasoning of Large...
cl144
 
PDF
13th International Conference of Security, Privacy and Trust Management (SPTM...
ijcisjournal
 
PDF
Designing for Tomorrow – Architecture’s Role in the Sustainability Movement
BIM Services
 
PDF
June 2025 - Top 10 Read Articles in Network Security and Its Applications
IJNSA Journal
 
PPTX
Kel.3_A_Review_on_Internet_of_Things_for_Defense_v3.pptx
Endang Saefullah
 
PPT
SF 9_Unit 1.ppt software engineering ppt
AmarrKannthh
 
PDF
Module - 4 Machine Learning -22ISE62.pdf
Dr. Shivashankar
 
PPT
دراسة حاله لقرية تقع في جنوب غرب السودان
محمد قصص فتوتة
 
PDF
FSE-Journal-First-Automated code editing with search-generate-modify.pdf
cl144
 
PPTX
Functions in Python Programming Language
BeulahS2
 
PDF
bs-en-12390-3 testing hardened concrete.pdf
ADVANCEDCONSTRUCTION
 
PDF
PRIZ Academy - Process functional modelling
PRIZ Guru
 
PPSX
OOPS Concepts in Python and Exception Handling
Dr. A. B. Shinde
 
PDF
تقرير عن التحليل الديناميكي لتدفق الهواء حول جناح.pdf
محمد قصص فتوتة
 
Introduction to File Transfer Protocol with commands in FTP
BeulahS2
 
ASBC application presentation template (ENG)_v3 (1).pptx
HassanMohammed730118
 
June 2025 Top 10 Sites -Electrical and Electronics Engineering: An Internatio...
elelijjournal653
 
CLIP_Internals_and_Architecture.pdf sdvsdv sdv
JoseLuisCahuanaRamos3
 
Bharatiya Antariksh Hackathon 2025 Idea Submission PPT.pptx
AsadShad4
 
Stability of IBR Dominated Grids - IEEE PEDG 2025 - short.pptx
ssuser307730
 
FSE_LLM4SE1_A Tool for In-depth Analysis of Code Execution Reasoning of Large...
cl144
 
13th International Conference of Security, Privacy and Trust Management (SPTM...
ijcisjournal
 
Designing for Tomorrow – Architecture’s Role in the Sustainability Movement
BIM Services
 
June 2025 - Top 10 Read Articles in Network Security and Its Applications
IJNSA Journal
 
Kel.3_A_Review_on_Internet_of_Things_for_Defense_v3.pptx
Endang Saefullah
 
SF 9_Unit 1.ppt software engineering ppt
AmarrKannthh
 
Module - 4 Machine Learning -22ISE62.pdf
Dr. Shivashankar
 
دراسة حاله لقرية تقع في جنوب غرب السودان
محمد قصص فتوتة
 
FSE-Journal-First-Automated code editing with search-generate-modify.pdf
cl144
 
Functions in Python Programming Language
BeulahS2
 
bs-en-12390-3 testing hardened concrete.pdf
ADVANCEDCONSTRUCTION
 
PRIZ Academy - Process functional modelling
PRIZ Guru
 
OOPS Concepts in Python and Exception Handling
Dr. A. B. Shinde
 
تقرير عن التحليل الديناميكي لتدفق الهواء حول جناح.pdf
محمد قصص فتوتة
 
Ad

Microcontroller from basic_to_advanced

  • 4.  Architectures: – Von Neumann – Harvard – Harvard modified
  • 5.  Microcontroller 8 bit 16bit 32bit,etc.  Digital Signal Processor Digital Signal Controller  FPGA/ASIC-Programmable Logic  SoC-Processor System & Programmable Logics
  • 6.  Arduino IDE  Energia  Python IDE  IAR workbench  Keil  CCS  Xilinx ISE/Vivado web edition
  • 7.  Arduino  Raspberry Pi  8051 development board  PIC development board  Tiva C series  STM32F4  Many more…..
  • 8.  There are different programming styles available to use or we can create it by mixing one in another. Standards available languages are: ◦ Assembly level: Board specific ◦ Embedded c: Generalized with common instructions
  • 9.  C/C++  Embedded C  Python  VHDL  Verilog  MATLAB  Simulink
  • 10.  External Memeories  RS232  CAN  LAN(RJ45)  SPI  I2C  PCI  PCIe  Other networking protocols
  • 11.  Temperature sensor module  Vibration switch module  Hall magnetic sensor module  Key switch module  Infrared emission sensor module  Small passive buzzer module  Laser sensor module  3-color full-color LED SMD modules  Optical broken module  Etc..many more available on: https://tkkrlab.nl/wiki/Arduino_37_sensors
  • 12.  Unsigned Integers ◦ All eight bits represent the magnitude of a number  Bit7 to Bit0 ◦ Range 00H to FFH (010 to 25510) 12
  • 13.  Signed Integers ◦ 2's Complement  Bit7 is sign bit ◦ Positive numbers: 00H to 7FH (010 to 12710) ◦ Negative numbers: 80H to FFH (-110 to -12810) 13
  • 14.  Binary Coded Decimal Numbers (BCD) ◦ 8-bit number divided into two groups of four  Each group represents a decimal digit from 0 to 9 ◦ AH through FH are invalid ◦ Example: 0010 0101BCD = 2510 14
  • 15.  American Standard Code for Information Interchange (ASCII) ◦ 7-bit alphanumeric code with 128 combinations (00H to 7FH) ◦ Represents English alphabet, decimal digits from 0 to 9, symbols, and commands 15
  • 16.  Which is easy? Assembly Language Embedded C Language
  • 19.  Meeting the computing needs of the task efficiently and cost effectively  Speed, the amount of ROM and RAM, the number of I/O ports and timers, size, packaging, power consumption  Easy to upgrade  Cost per unit  Availability of software development tools  Assemblers, debuggers, C compilers, emulator, simulator, technical support  Wide availability and reliable sources of the microcontrollers.
  • 20.  A Harvard Architecture (separate instruction/data memories)  Single chip Microcontroller(µC)  Developed by Intel in 1980 for use in embedded systems.  Today largely superseded by a vast range of faster and/or functionally enhanced 8051-compatible devices manufactured by more than 20 independent manufacturers
  • 21. Feature 8051 8052 8031 ROM (program space in bytes) 4K 8K 0K RAM (bytes) 128 256 128 Timers 2 3 2 I/O pins 32 32 32 Serial port 1 1 1 Interrupt sources 6 8 6 Comparison of the 8051 Family
  • 23. 23
  • 24.  MPU (CPU) ◦ Read instructions ◦ Process binary data 24
  • 25.  Storage Device ◦ Addresses ◦ Registers  Major Categories ◦ Read/Write Memory (R/W) ◦ Read-only-Memory (ROM) 25 D7 D0
  • 26.  Input Devices ◦ Switches and Keypads ◦ Provide binary information to the MPU  Output devices ◦ LEDs and LCDs ◦ Receive binary information from the MPU 26
  • 27.  MPU communicates with Memory and I/O using the System Bus ◦ Address bus  Unidirectional  Memory and I/O Addresses ◦ Data bus  Bidirectional  Transfers Binary Data and Instructions ◦ Control lines  Read and Write timing signals 27
  • 28. 28
  • 29.  Machine Language ◦ Binary Instructions ◦ Difficult to decipher and write  Error-prone ◦ All programs converted into machine language for execution 29 Instructio n He x Mnemoni c Description Processor 1000000 0 80 ADD B Add reg B to Acc Intel 8085 0010100 0 28 ADD A, R0 Add Reg R0 to Acc Intel 8051 0001101 1 1B ABA Add Acc A and B Motorola 6811
  • 30.  Assembly Language ◦ Machine instructions represented in mnemonics ◦ One-to-one correspondence ◦ Efficient execution and use of memory ◦ Machine-specific 30
  • 31.  High-Level Languages ◦ BASIC, C, and C++ ◦ Written in statements of spoken languages ◦ Machine independent ◦ Easy to write and troubleshoot ◦ Larger memory and less efficient execution 31
  • 33.  RISC CPUs ◦ 8-bit ◦ 16-bit  Number of I/O pins: 4-70  Memory types and sizes: ◦ Flash; OTP; ROM ◦ 0.5k – 256k
  • 34. 5/6 Programming pins 8 A/D channels 2 Oscillator Inputs 2 RS-232 inputs 33 I/O ports
  • 35.  Download @ http://microchip.com  Assembly compiler for programming PICs  Based on specific PIC instruction set
  • 36. PIC: Elements of a digital controller CPU Central Processing Unit Input Peripherals Output Peripherals ROM Read Only Memory RAM Read & Write Memory Program download User input User output The microcontroller contains all these elements in one chip
  • 37. 16F877 pin-out The microcontroller pins have multiple functions
  • 38. Screenshot of MPLAB Project The C program is compiled and tested in simulation mode
  • 40. ARM
  • 41.  Developed at Acorn Computers Limited, of Cambridge, England, between 1983 and 1985  Problems with CISC:  Slower then memory parts  Clock cycles per instruction 41
  • 42.  Typical RISC architecture:  Large uniform register file  Load/store architecture  Simple addressing modes  Uniform and fixed-length instruction fields 42
  • 43.  Enhancements:  Each instruction controls the ALU and shifter  Auto-increment and auto-decrement addressing modes  Multiple Load/Store  Conditional execution 43
  • 44.  Floating Point Processor-Ex.TMS320F28335  Fixed Point Processor-Ex.TMS320F6745
  • 46.  Simple logic gates ◦ combine transistors to implement combinational and sequential logic  Interconnect ◦ wires to connect inputs and outputs to logic blocks  I/O blocks ◦ special blocks at periphery for external connections  Add wires to make connections ◦ done when chip is fabbed  “mask-programmable” ◦ construct any circuit
  • 47.  Logic blocks ◦ to implement combinational and sequential logic  Interconnect ◦ wires to connect inputs and outputs to logic blocks  I/O blocks ◦ special logic blocks at periphery of device for external connections  Key questions: ◦ how to make logic blocks programmable? ◦ how to connect the wires? ◦ after the chip has been fabbed
  • 48.  Soft-core are available with FPGA /ASIC’s and SoC. ◦ ARM processor ◦ Microblaze processor
  • 49.  Implementation of random logic ◦ easier changes at system-level (one device is modified) ◦ can eliminate need for full-custom chips  Prototyping ◦ ensemble of gate arrays used to emulate a circuit to be manufactured ◦ get more/better/faster debugging done than possible with simulation  Reconfigurable hardware ◦ one hardware block used to implement more than one function ◦ functions must be mutually-exclusive in time ◦ can greatly reduce cost while enhancing flexibility ◦ RAM-based only option  Special-purpose computation engines ◦ hardware dedicated to solving one problem (or class of problems) ◦ accelerators attached to general-purpose computers
  • 50.  Complete ARM®-based processing system ◦ Application Processor Unit (APU)  Dual ARM Cortex™-A9 processors  Caches and support blocks ◦ Fully integrated memory controllers ◦ I/O peripherals  Tightly integrated programmable logic ◦ Used to extend the processing system ◦ Scalable density and performance  Flexible array of I/O ◦ Wide range of external multi-standard I/O ◦ High-performance integrated serial transceivers ◦ Analog-to-digital converter inputs
  • 52.  The Zynq-7000 AP SoC architecture consists of two major sections ◦ PS: Processing system  Dual ARM Cortex-A9 processor based  Multiple peripherals  Hard silicon core ◦ PL: Programmable logic  digital logic design
  • 54.  Three basic modes: ◦ 1. Continuous dedicated monitoring of the sensor by the microprocessor ◦ 2. Polling the sensor ◦ 3. Interrupt mode
  • 55.  Microprocessor is dedicated for use with the sensor  Its output is monitored by the microprocessor continuously  The microprocessor reads the sensor’s output at a given rate  Output is then used to act
  • 56.  Sensor operates as if the microprocessor did not exist.  Its output is monitored by the microprocessor  The microprocessor reads the sensor’s output at a given rate or intervals - poling  Output is then used to act
  • 57.  Microprocessor is in sleep mode  Outputs of the sensor are not being processed  Upon a given event, microprocessor wakes up through one of its interrupt options  The sensor activates the interrupt
  • 58.  Interrupts can be timed  Interrupts can be issued by sources other than the sensor  The microprocessor may be involved in other functions, separate from the sensor, such as control of an actuator  Feedback from actuators may also be used to perform interrupts
  • 59.  Microprocessor input interfacing requirements  Microprocessor output requirements  Errors introduced by microprocessors
  • 60.  Signal level  Impedance and matching  Response, frequency  Signal conditioning  Signal scaling  Isolation  Loading
  • 61.  Signal levels  Power levels  Isolation
  • 62.  Basic level: zero to Vdd ◦ Must scale signals if necessary  No dual polarity signals ◦ Must translate/scale as necessary  Direct reading or A/D  Can read voltages only ◦ AC or DC ◦ Limitations in frequency
  • 63.  P are high input impedance devices ◦ ~ 1 - 10 M ◦ Input current - < 1 A.  Ideal for direct connection of low impedance sensors (magnetic, thermistors, thermoelectric, etc.)  High impedance sensors (capacitive, pyroelectric, etc.) must be buffered ◦ Voltage followers ◦ FET amplifiers
  • 64.  Most sensors are slow devices ◦ Can be interfaced directly ◦ No concern for response and frequency range  Some sensors are part of oscillators ◦ Frequencies may be quite high ◦ Need to worry about proper sampling by the microprocessor
  • 65.  Example: 10 mHz P, cycle time of 0.4 s. (most processor divide the clock frequency by a factor - 4 in this case)  Any operation such as reading an input required n cycles, say n=5  Effective frequency: 0.5 MHz  Sampling cannot be done at rates higher than 250 kHz  Any sensor producing a signal above this frequency will be read erroneously
  • 66.  Some solutions: ◦ Divide the sensor’s frequency  Reduces sensitivity  Must be done externally to the P ◦ F-V converter  Introduces conversion errors  Must be done externally ◦ Frequency counter at input  Use output of the counter as input to mP.  Expensive ◦ Faster microprocessors
  • 67.  Offset ◦ Primarily for dc levels ◦ Can be offset up or down ◦ Usually done to remove the dc level ◦ Sometimes needed to remove negative polarity. ◦ AC signals may sometimes be coupled through capacitors to eliminate dc levels
  • 68.  Example ◦ Thermistor: 500 at 20ºC ◦ Varies from 100 to 900 for temp. between 0 and 100ºC
  • 69.  At 500ºC ◦ V = (12/1500)*500 = 4 V  At 0ºC ◦ V = (12/1400)*400 = 3.428 V  At 100ºC ◦ V = (12/1900)*900 = 5.684 V  V varies between 3.428V and 5.684V ◦ 5.684V is above the 5V operating voltage of the microprocessor
  • 70.  Errors introduced by the microprocessor: ◦ Due to resolution of A/D, D/A ◦ Sampling errors  These come in addition to any errors in the sensor/actuator
  • 71.  Most microprocessors are 8 bit microprocessors  Integer arithmetics  Largest value represented: 256  Roundoff errors due to this representation  Special math subroutines have been developed to minimize these errors (otherwise they would be unacceptably high)
  • 72.  All inputs and outputs on a microprocessor are sampled. That is: ◦ Inputs are only read at intervals ◦ Outputs are only updated at intervals ◦ Intervals depend on the frequency of the clock, operation to be executed and on the software that executes it ◦ Sampling may not even be constant during operation because of the need to perform different tasks at different times ◦ Errors are due to changes in input/output between sampling to which the microprocessor is oblivious ◦ Errors are not fixed - depend among other things on how well the program is written
  • 74.  There are lots of application use microcontroller some of them are given below: ◦ CAR ◦ Refrigerator ◦ Airplane ◦ Trains ◦ Medical devices, etc. Some example will be explained in Last slides.
  • 75. 75
  • 76. 76
  • 78.  Microcontroller and Microprocessor  Digital System  Signal and System(Z transform and Filter Designing)  Digital Signal Processing  Networking  Control system  Basic analog design