digital logic and data presentationdte.karnataka.gov.in/institutes/gptkarwar/genericdo...register a...
TRANSCRIPT
Computer Science & Engineering – 15CS31T
Digital logic and data presentation
Introduction • Generally output from most of sensors are in analog form, when
microprocessor are used as a part of control system this analog
signal has to be converted to digital form before it is supplied to
microprocessor.
• Similarly most of the actuators operates with analog inputs so
digital output from microprocessor has to be converted to an
Analog form before it is supplied to actuator
Computer Science & Engineering – 15CS31T
Binary coded decimal system ( BCD)
This system widely used in computer and electronics device. each
decimal digit is coded with separate binary form i.e. 0 and 1
For example the decimal number 15 in BCD system becomes
00010101
This code is useful for outputs from microprocessor based systems
where the output has to derive decimal displays
Each decimal digit in the display being supplied by the microprocessor
with its own binary code
Computer Science & Engineering – 15CS31T
Relationship between
decimal, binary and
BCD system
Some examples of binary to decimal
& decimal to binary
Computer Science & Engineering – 15CS31T
Analog and digital signals
• Analog signals: An analog signal is any continuous signal for
which the time-varying feature of the signal is a representation of
some other time-varying quantity, i.e., analogous to another time-
varying signal. For example, in an analog audio signal, the
instantaneous voltage of the signal varies continuously with
the pressure of the sound waves.
• The term analog usually refers to electrical signals
however,mechanical,pneumatic,hydralic,human speech also
considered as analog signals
• Any information may be conveyed by analog signals often such
signals is a measured response to change in physical phenomena,
such as sound,light,temprature,position,pressure
• These variables converted to analog signals by transducer
Computer Science & Engineering – 15CS31T
Computer Science & Engineering – 15CS31T
Digital signal
• A Digital signal is a signal that is being used to represent data as a
sequence of discrete values; at any given time it can only take on, at
most, one of a finite number of values.
Computer Science & Engineering – 15CS31T
Difference between Analog and Digital signals
Applications of Digital signals
PCs, PDAs
Mobile phone
Computer Science & Engineering – 15CS31T
Analog to Digital conversion (A D C)
1. Supply the regular time signal pulses produced by the clock to the ADC
2. Evert time ADC receive a pulse ,it samples the analog signal
3. the results of sampling is a series of narrow pulses
4. A sample and hold unit is then used to hold each sampled value until the next pulse occurs
5. Converter requires finite amount of time ,termed as conversion time to convert A to D
Computer Science & Engineering – 15CS31T
Sampled and held input and output for ADC
Computer Science & Engineering – 15CS31T
• A successive approximation ADC is a type of ADC converter that
coverts a continues waveform in to a discrete digital
representation via a binary search through all possible
quantization level before finally converging upon digital output
for each conversion
Computer Science & Engineering – 15CS31T
SAR It consists following 4 sub circuits
1. A sample and hold circuit to acquire input voltage
2. An analog voltage comparator that compares Vin to the output of the internal DAC
and outputs the results of comparison to SAR
3 A SAR sub circuit designed to supply an approximate digital code
4. An internal reference DAC that ,for comparison with Vref ,supplies the comparator
with an analog voltage equal to digital code output of the SAR input
SAR ADC requires
1.An input voltage Vin
2.A reference voltage Vref
3.A DAC to convert ith approximation xi to voltage
4. A comparator to perform the function s(xi-x)by comparing DAC’s voltage with i/p
voltage
5 A register to store o/p of comparator and apply xi-1-s(xi-1-x)2i
Initial approximation x0 = 0 , ith approximation xi =s(xi-1-x)/2i
Computer Science & Engineering – 15CS31T
Digital to analog conversion (DAC)
• For DAC an input is a binary word ,the output is an analog signal
that represent weighted sum of the non zero bits represented by
word
• Each additional increase in bit increases output voltage by 1V
Analog output in volts
Computer Science & Engineering – 15CS31T
Weighted resistor DAC
• It uses summing amplifier to form weighted sum of all the non zero bits in the
input word
• The reference voltage connected to resistors by means of electronic switches
which respond to binary 1
• The value of input resistance depends on which bit in the word a switch is
responding to the values of resistor for successive bits from LSB being halved
• Sum of voltages is a weighted sum of the digits in the word
• Accurate resistance have to be used for each resistor
• Limited to 4 bit conversion
Computer Science & Engineering – 15CS31T
• Only two values required 0 and 1
Computer Science & Engineering – 15CS31T
Logic gates
• Logic gates are circuits with one or more input
with only one output
Computer Science & Engineering – 15CS31T
Computer Science & Engineering – 15CS31T
Output of an exclusive-or gate
Only goes “HIGH” when its two
input terminals are at “Different”
logic levels with respect to each
other
Then this type of gate gives
and output “1” when its
BOTH inputs are “logically
equal” or “equivalent
Computer Science & Engineering – 15CS31T
Application of logic gates
• 1 parity generators
• 2 digital comparator
• 3 encoder for traffic signal
• 4 code converter
• 5 electronic switches
• 6 robotics
• 7 timer and control units
• 8 flip flops
• 9 printer ic
• 10 speed control units
Computer Science & Engineering – 15CS31T
Coder (digital coded signal to set traffic lights)
Consists of 3 and gates and two not gates
*These gates are so arranged so that code determines which light red,
green or amber that one will turned on
*For getting red light we should use transmitted signal as a=0 and b=0
*For getting amber light we should use transmitted signal as a=0 & b=1
*For getting red light we should use transmitted signal as a=1 and b=0
Traffic lights
Computer Science & Engineering – 15CS31T
Decoder with 7 segment display
Computer Science & Engineering – 15CS31T
Computer Science & Engineering – 15CS31T
When HIGH appears on one of decimal digit
input lines the appropriate level occurs on the 4
BCD output lines for eg input line 9 is HIGH
On output A0 and A3 and lows on output
a1and A2
A3=8+9
A2=4+5+6+7
A1=2+3+6+7
A0=1+3+5+7+9
Computer Science & Engineering – 15CS31T
Sequential logic system
Sometimes system requires an output which depends on earlier
input values such system known as sequential logic system
Main difference b/w a combination logic system and sequential
logic system is SLS have some form of memory
Combination logic gates receive signal from external input and
from memory and produces output after processing them
Output is a function of both external i/p and i/p from memory
Computer Science & Engineering – 15CS31T
Flip flop
The flip flop is a basic memory elements and it is made up of
assembly of logic gates 3
There are 3 number of flip flops
1.SR flip flop
2 JK flip flop
3 D flip flop
Computer Science & Engineering – 15CS31T
SR flip flop
Consists of NOR gates
Initially we have s=0 and R=0 the output will be in previous state know
as No change condition
If we set s=1 and R=0 the output from NOR gate 2 will become 0
This will then results in both input to NOT gate 1 becomes 0 and so its
output becomes 1
This feed back acts as an input to NOR gate 2 which then has both its
input as 1 and results in no further change
Now if S changes from 1 to 0 the output from NOR gate 2 remains 0
Therefore there is no further change in output when S changes from 1to 0
S R Q Q
0 0 NO CHANGE
0 1 0 1
1 0 1 0
1 1 NOT ALLOWED
Mechanical Engineering – 15ME54T
Sequential logic system
Truth table
In this case JK and output Q Qbar are same as SRQ Qbar in SR flip
flop only additional is there is a CLK(clocked input) input is given with
negative triggering( )
• When both J & K ar 0 ,q and Qbar retains their previous state i.e. Qn
• When j=0 and k=1 with clocked input resets flip flop with Q=0 and
Qbar=1
• When J =1 and K=0 with clocked input sets flip flop with Q=1 and
Qbar=0
• When both j and k equals to 1 flip flop will toggle with clocked input
i.e. as per clocked input there is continuously Q=1 and Qbar=0 and
Q=0 and Qbar=1 Q=1 and Qbar=0 and so on
Computer Science & Engineering – 15CS31T
D flip flop
D flip flop is basically a clocked SR or JK flip flop with D input being
connected directly S or J input via NOT gate to the Ror K input
D flip flop needs only one data input
When D=0 then Q=0 and Qbar =1
When D=1 with clock pulse then Q=1 and Qbar =0
Computer Science & Engineering – 15CS31T
Register
A Register is a set of memory elements which is made up of
group of flip flops which store the information until it is needed
Each flip flop stores binary signal i.e. 0 and 1
Fig shows 4 bit register consists of d flip flop
When the loaded signal is 0 no clock input occurs to the D flip
flops and so no change occurs to the states of flip flop
When the load signal is 1 then input can change the states of
flip flop
As long as load signal is 0 flip flop will hold their old states
values
2ways of of input the data in to a register
Similarly 2 way to transfer data out of register
1. Serial in serial out (SISO)
2. Serial in parallel out (SIPO)
3. Parallel in serial out (PISO)
4. Parallel in parallel out(PIPO)
Computer Science & Engineering – 15CS31T
Display
• Electronic device used for visual representation of data or images
• Many display system use light indicator s to indicate on/off status or
give alphanumeric displays
Seven segment display
Light emitting diodes (LED) • The led require low voltage and low currents and are cheaper
hence has widely used in display
• commonly used LED materials are gallium arsenide, gallium
phosphide and alloys of gallium arsenide.
• Most commonly used LED can give RED ,Yellow and Green
colors
Decoder with seven segment display Most often seven-segment displays are used to display the digits in digital watches, calculators, clocks, measuring instruments and digital counters, etc. ... A display decoder is used to convert a BCD or a binary code into a 7 segment code. It generally has 4 input lines and 7 output lines. A BCD to Seven Segment decoder is a combinational logic circuit that accepts a decimal digit in BCD (input) and generates appropriate outputs for the segments to display the input decimal digit.
Liquid crystal display (LCD)
LCD do not produce light by own but works on polarization Consist of liquid crystal which is sandwiched between two sheets of polymer When plane polarized light is incident on the liquid crystal material its plane of polarization is rotated as it passes through material The rotation allows the light to be transmitted and so the material appears light. How ever if an electric field is applied across material ,the molecules become aligned with field and light passing through the top polarizer is not rotated and cannot pass through lower polarizer but become absorbed the material then appears dark
Mechanical Engineering – 15ME54T
Data presentation system
Data presentation system generally classified as two groups
1.Indicators :give instant visual indication of sensed variable
2.Records:record the output signal over the period of time.
Data presentation elements • Analogue and digital meter
• Analogue chart recorder
• Cathode ray oscilloscope
• Visual display unit
• Printers
• Magnetic recorders
• Optical recorder
• Display LED & LCD
Cathode ray Oscilloscope It is voltage measuring device capable of displaying extremely high frequency signal up to 10MHz visual displays unit An electronic visual display, informally a screen, is a display device for presentation of images, text, or video transmitted electronically, without producing a permanent record. Electronic visual displays include television sets, computer monitors, and digital signage.
Mechanical Engineering – 15ME54T
Printers
Data presenting element record permanently on paper
• Types of printer
• Dot matrix
• Ink jet
• Laser
• Daisy wheel
• Line
• plotter
Dot matrix
Has photosensitive drum coated with selenium based light sensitive material Able to produce 1200 dots per inch
Data acquisition system (DAQ)
Selection criteria for DAQ
1.Type of computer software used i.e. windows, MacOs
2.Type of connector board to be plugged i.e PCMCIA for
laptop NuBus for MacOS
3.Analog input and its range
4.Digital input
5.Resolution
6.Minimum sampling rate
7.Timing or counting signal required
Elements of DAQ