8086 microcontroller and ARM, Study notes of Microcontrollers

This is the basics of 8086 microcontroller

Typology: Study notes

2022/2023

Uploaded on 04/09/2023

rohith-menon-21bci0157
rohith-menon-21bci0157 šŸ‡®šŸ‡³

1 document

1 / 32

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
ADC Interfacing
•ADCs (Analog-to-Digital Converters) are among the most widely used devices for data
acquisition.
•A physical quantity, like temperature, pressure, humidity, and velocity, etc., is
converted to electrical (voltage, current) signals using a device called a transducer or
sensor.
•We need an Analog-to-Digital Converter to translate the analog signals to digital
numbers, so the microcontroller can read and process them.
•An ADC has an n-bit resolution where ncan be 8, 10,12,16 or even 24 bits.
•The higher-resolution ADC provides a smaller step size, where step size is the smallest
change that can be discerned by an ADC
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20

Partial preview of the text

Download 8086 microcontroller and ARM and more Study notes Microcontrollers in PDF only on Docsity!

ADC Interfacing

  • ADCs (Analog-to-Digital Converters) are among the most widely used devices for data

acquisition.

  • A physical quantity, like temperature, pressure, humidity, and velocity, etc., is

converted to electrical (voltage, current) signals using a device called a transducer or

sensor.

  • We need an Analog-to-Digital Converter to translate the analog signals to digital

numbers, so the microcontroller can read and process them.

  • An ADC has an n - bit resolution where n can be 8 , 10 , 12 , 16 or even 24 bits.
  • The higher-resolution ADC provides a smaller step size, where step size is the smallest

change that can be discerned by an ADC

n-bit Number of steps Step Size (mV) 8 256 5/256 = 19. 10 1024 5/1024 = 4. 12 4096 5/4096 = 1. 16 65536 5/65536 = 0. Notes: V CC

= 5 V

Step size (resolution) is the smallest change that can be discerned by an ADC. Resolution vs. Step Size for ADC

  • In addition to resolution, conversion time is another major factor in judging an ADC.
  • Conversion time is defined as the time it takes the ADC to convert the analog input to a digital (binary) number.
  • In parallel ADC, we have 8 of more pins dedicated to bringing out the binary data, but in serial ADC we have only one pin for data out.
  • CLK IN is an input pin connected to an external clock source when an external clock is used for timing.
  • However, the 0804 has an internal clock generator.
  • To use the internal clock generator (also called self-clocking), CLK IN and CLK R pins are connected to a capacitor and a resistor and the clock frequency is determined by: Vref /2: (Pin 9):
  • It is used for the reference voltage.
  • If this pin is open (not connected), the analog input voltage is in the range of 0 to 5 volts (the same as the Vcc pin).
  • If the analog input range needs to be 0 to 4 volts, Vref/2 is connected to 2 volts.

V ref /2 Relation to V in Range (ADC0804)

  • D0-D7 are the digital data output pins.  These are tri-state buffered and the converted data is accessed only when CS =0 and RD is forced low.
  • RD is used to get the converted data out of the ADC0804 chip.
  • If ā€œ output enable ā€ ,a high-to-low RD pulse is used to get the 8-bit converted data out of ADC804.
  • INTR is ā€œend of conversionā€ .When the conversion is finished; it goes low to signal the CPU that the converted data is ready to be picked up.
  • WR is an active low input  It is ā€œstart conversionā€ When WR makes a low-to-high transition, ADC804 starts converting the analog input value of Vin to an 8-bit digital number  When the data conversion is complete, the INTR pin is forced low by the ADC0804.

Interfacing – ADC with 8051 Steps for converting the analogue input and reading the output from ADC.  Make CS=0 and send a low to high pulse to WR pin to start the conversion.  Now keep checking the INTR pin. INTR will be 1 if conversion is not finished and INTR will be 0 if conversion is finished.  If conversion is not finished (INTR=1) , poll until it is finished.  If conversion is finished (INTR=0), go to the next step.  Make CS=0 and send a high to low pulse to RD pin to read the data from the ADC.

8051 Connection to ADC0804 with Self-Clocking

Selected Analog Channel C B A IN0 0 0 0 IN1 0 0 1 IN2 0 1 0 IN3 0 1 1 IN4 1 0 0 IN5 1 0 1 IN6 1 1 0 ADC0808/0809 Analog Channel Selection V ref Relation to V in Range for ADC0808/

ADC 0848

Pin Diagram ADC0848 Block Diagram

ADC0848 V ref vs. Step Size

  • Read and Write Timing for ADC
  • 8051 Connection to ADC0804 with Clock from XTAL2 of the
  • ADC 0808/
  • Selecting a Channel and Read Timing for ADC
  • 8051 Connection to ADC0809 for Channel
  • Selecting a Channel and Read Timing for the ADC