Part B Interfacing Expts
Part B Interfacing Expts
THEORY:
A motor in which the rotor is able to assume only discrete stationary angular
position is a stepper motor. The rotary motion occurs in a step-wise manner from one
equilibrium position to the next. Stepper Motors are used very wisely in position control
systems like printers, disk drives, process control machine tools, etc.
The basic two-phase stepper motor consists of two pairs of stator poles. Each of
the four poles has its own winding. The excitation of any one winding generates a North
Pole. A South Pole gets induced at the diametrically opposite side. The rotor magnetic
system has two end faces. It is a permanent magnet with one face as South Pole and the
other as North Pole.
The Stepper Motor windings A1, A2, B1, B2 are cyclically excited with a DC
current to run the motor in clockwise direction. By reversing the phase sequence as A1,
B2, A2, B1, anticlockwise stepping can be obtained.
In this scheme, any two adjacent stator windings are energized. The switching
scheme is shown in the table given below. This scheme produces more torque.
ANTICLOCKWISE CLOCKWISE
STEP A1 A2 B1 B2 DATA STEP A1 A2 B1 B2 DATA
1 1 0 0 1 09h 1 1 0 1 0 0Ah
2 0 1 0 1 05h 2 0 1 1 0 06h
3 0 1 1 0 06h 3 0 1 0 1 05h
4 1 0 1 0 0Ah 4 1 0 0 1 09h
Look-up table
PROCEDURE:
Enter the above program starting from location 4100.and execute the same. The
stepper motor rotates. Varying the count at R1 and R3 can vary the speed. Entering the
data in the look-up TABLE in the reverse order can vary direction of rotation
CIRCUIT DIAGRAM:
PROGRAM:
OBSERVATION:
RESULT:
Program executed and output verified
EXPERIMENT 14
DISPLAY INTERFACING USING 8051
AIM:
Write an ALP to interface 7 segment display using 8051
THEORY:
The 7-segment display, also written as “seven segment display”, consists of seven LEDs
(hence its name) arranged in a rectangular fashion as shown. Each of the seven LEDs is called a
segment because when illuminated the segment forms part of a numerical digit (both Decimal and
Hex) to be displayed. An additional 8th LED is sometimes used within the same package thus
allowing the indication of a decimal point, (DP) when two or more 7-segment displays are
connected together to display numbers greater than ten.
Each one of the seven LEDs in the display is given a positional segment with one of its
connection pins being brought straight out of the rectangular plastic package. These individually
LED pins are labelled from a through to g representing each individual LED. The other LED pins
are connected together and wired to form a common pin.So by forward biasing the appropriate
pins of the LED segments in a particular order, some segments will be light and others will be dark
allowing the desired character pattern of the number to be generated on the display. This then
allows us to display each of the ten decimal digits 0 through to 9 on the same 7-segment display.
The displays common pin is generally used to identify which type of 7-segment display it
is. As each LED has two connecting pins, one called the “Anode” and the other called the
“Cathode”, there are therefore two types of LED 7-segment display called: Common Cathode (CC)
and Common Anode (CA).
The difference between the two displays, as their name suggests, is that the common
cathode has all the cathodes of the 7-segments connected directly together and the common anode
has all the anodes of the 7-segments connected together and is illuminated as follows.
The Common Cathode (CC) – In the common cathode display, all the cathode connections of the
LED segments are joined together to logic “0” or ground. The individual segments are illuminated
by application of a “HIGH”, or logic “1” signal via a current limiting resistor to forward bias the
individual Anode terminals (a-g).
CIRCUIT DIAGRAM:
PROGRAM:
ADDRESS OPCODE LABEL MNEMONCS COMMENTS
OBSERVATION:
Input data Output Displayed
RESULT:
Program executed and output verified
EXPERIMENT 15
DAC INTERFACING USING 8051
AIM:
Write an assembly language program for interfacing 8051 Micro Controller with
DAC interface
THEORY:
8 bit resolution
100µs conversion time
8 channel multiplexer with latched control logic
No need for external zero or full scale adjustments
Low power consumption(15mW)
Latched tristate output
PROCESS:
PROGRAM:
To generate the square wave at DAC With (00 H) as input to DAC, the analog output is
+5v. Similarly with FF (H) as input, the output is +5v.Outputting digital data 00 and FF
at regular intervals to DAC result in a square wave of amplitude 15 v
ADDRESS OPCODE LABEL MNEMONCS COMMENTS
RESULT:
Program executed and output verified.
2. TRIANGULAR WAVE GENERATION
AIM:
Write an ALP to generate a triangular wave with DAC interfacing
and observe on CRO/DSO
PROGRAM:
MOV A, #00
INC A
DEC A
SJMP LOOP1
RESULT:
Program executed and output verified.