MPMC Manual 23 PDF
MPMC Manual 23 PDF
JCT
COLLEGE OF ENGINEERING AND
TECHNOLOGY DEPARTMENT OF
ELECTRICAL AND ELECTRONICS ENGINEERING
FOURTH SEMESTER
NAME :
SEMESTER / YEAR :
BRANCH :
REGISTER NUMBER :
JCT COLLEGE OF ENGINEERING AND TECHNOLOGY
PICHANUR, COIMBATORE – 641105
B.E - PROGRAMME
Vision:
Mission:
B.E - PROGRAMME
VISION:
MISSION:
To create state-of art facilities for teaching, learning, laboratory practices and research.
To develop competent engineers through value addition programs, products incubation,
interactive seminars, communication programs, group discussions, trainings, etc.
To initiate collaborative relationships with Industries and Institutions for real-life
experiences.
JCT COLLEGE OF ENGINEERING AND TECHNOLOGY
PICHANUR, COIMBATORE – 641105
JCT COLLEGE OF ENGINEERING AND TECHNOLOGY
PICHANUR, COIMBATORE – 641105
PEO1: Graduates shall have successful career in industry or have motivation for higher
education or research.
PEO2: Graduates shall apply their knowledge of Electrical and Electronics Engineering and
work as part of a team on multidisciplinary projects.
PEO3: Graduates shall have lifelong learning skills, professional ethics and good
communication capabilities along with entrepreneur skills and leadership, so that they can
succeed in their life.
PSO1: Have abilities to apply their knowledge in the domain of Electronics, Electrical Drives,
Power Generation and Transmission, Power Electronics and Control system for the benefits of
the society and the Nation.
PSO2: Have abilities to successfully qualify in national level competitive examinations for
higher studies and employment.
JCT COLLEGE OF ENGINEERING AND TECHNOLOGY
PICHANUR, COIMBATORE – 641105
JCT COLLEGE OF ENGINEERING AND TECHNOLOGY
PICHANUR, COIMBATORE – 641105
1. Students have to go to respective lab classes according to the lab time table.
3. They have to know about the procedure of the experiment before start doing the experiment. It will be
4. After the viva, they have to get the indent slip from stores and get the required apparatus.
5. They have to give the circuit connections by involving themselves in their batch.
6. They have to take readings in proper manner without any error and get verified from the staff.
7. They have to submit their completed previous experiment record at the time of entering into the
laboratory.
8. After completing the experiment, they have to return all the apparatus to the stores and get back the
indent slip.
CYCLE PLAN
CYCLE – I
CYCLE -II
7. Programming with control instructions: Increment / Decrement, Ascending /
Descending order, Maximum / Minimum of numbers, rotate instructions, Hex /
ASCII / BCD code conversions.
8. Interface Experiments: A/D Interfacing. D/A Interfacing. Traffic light controller
9. Stepper motor controller interface.
10. Displaying a moving/ rolling message in the student trainer kit’s output device.
11. Programming PIC architecture with software tools.
12. Programs to verify timer and interrupts in 8051 Microcontroller
13. Study of ARM Processor
INDEX
S. No Date Name of the Experiment Page. Marks Faculty
no sign
START
INITIALIZE THE
DATA
ADD DATA
IF INCREMENT CARRY
CARRY =
YES
STOP
OUTPUT RESULT
I/O MEMORY ADDRESS DATA 1 DATA 2 (WITH
(WITHOUT CARRY)
CARRY)
3200H 02 06
INPUT
3201H 03 05
3202H (SUM) 05 10
OUTPUT
3203H (CARRY) 06 01
AIM
To write an assembly language program for adding, subtracting, multiplying division two 8
bit numbers using 8085 microprocessor kit
APPARATUS REQUIRED
7. If the carry is "0" then store the result in address which is specified.
8 If the carry is "1" then increment the C register and store the result.
PROGRAM
ADDRESS OPCODE LABEL MNEMONICS COMMENTS
3100 3A 01 32 LDA 3201H Get the subtrahend in Breg
3103 47 MOV BA Move A to B
3104 3A 00 32 LDA 3200Η Get the minuend in A reg
3107 0E 00 MVI C,00H Clear C register to account for carry
3109 90 SUB B Get Difference in A reg
310A D2 0E 31 JNC AHEAD If CY=0 go to AHEAD
310D 0C INR C If CY-1 increment C reg
310E 32 02 32 AHEAD STA 3202H Store the sum in memory
3111 79 MOV A,C Move C to A
3112 32 03 32 STA 3203H Store the carry in memory
3115 76 HLT Terminate the program
START
INITIALIZE THE
DATA
SUBTRACT DATA
IF
BORROW = INCREMENT BORROW
YES
STOP
OUTPUT
INPUT OUTPUT
3200 05 3202 02
3201 03 3203
PROGRAM
ADDRESS OPCODE LABEL MNEMONICS COMMENTS
3100 21 00 32 LX1 3200H Set pointer for data
3103 0E 00 MVI C, 00H Clear to account for Overflow
3105 AF XRA A Clear accumulator
3106 46 MOV B,M Get first data in B reg
3107 23 INX H Increment the HL pair
3108 56 MOV D,M Get second data in Dreg
3109 82 REPT ADD D Add D reg to accumulator
310A D2 0E 31 JNC AHEAD If no Carry jump to A
310D 0C INR C If CY=1 increment Creg
310E 05 AHEAD DCR B Decrement the Breg Content
310F C2 09 31 JNC REPT Repeat addition until ZF=1
3112 23 INX H Increment the HL Pair
3113 77 MOV M,A Store lower byte of product in memory
3114 23 INX H Increment the HL Pair
3115 71 MOV M,C Store higher byte of product in
memory
3116 76 HLT Terminate the program
OUTPUT
INPUT OUTPUT
3200 05 3202 06
3201 03 3203 00
FLOWCHART
A
START
[HL] [HL] +1
[HL] 4500
B M
[M] [A]
[HL] [HL] +1
[HL] [HL] +1
A 00
[M] [C]
C 00
Is there
any
C C+1
B B+ 1
IS B =
0
STOP
PROGRAM
ADDRESS OPCODE LABEL MNEMONICS COMMENTS
3100 3A 01 32 LD, 3201H Load the Accumulator
3103 47 MOV B,A Get the divisor in B reg
3104 3A 00 32 LDA 3200H Get the dividend in A reg
3107 0E 00 MVI C,00H Clear C reg for Quotient
3109 B8 AGAIN CMP B Compare B Reg wit ACC
310A DA12 31 JC STORE If divisor is less than dividend go to STOP
310D 90 SUB B Subtract divisor from dividend
310E 0C INR C Increment quotient by 1 for each subtraction
310F C3 09 31 JMP AGAIN Jump to Label Again
3112 32 03 32 STORE STA 3202H Store the remainder in memory
3115 79 MOV A,C Move C Reg to Acc
3116 32 02 32 STA 3202H Store the quotient in memory
3119 76 HLT Halt the Program
OUTPUT
INPUT OUTPUT
3200 06 3202 03
3201 02 3203
FLOWCHART
START
B 0
0
[HL 450
] 0
A M
[HL [HL]
] +1
M A-M
[B [B] +
] 1
IS
A<0
A A+
M
B B-
1
[HL [HL] +
] 1
[M [A
] ]
[HL [HL]
] +1
[M [B
] ]
STOP
RESULT
Thus the program for B-bit Addition, Subtraction, Multiplication and Division was
implemented and verified successfully.
PROGRAM
OUTPUT
INPUT OUTPUT
ADDRESS DATA ADDRESS DATA
3200 05 3200 01
3201 02 3201 02
3202 04 3202 03
3203 03 3203 04
3204 01 3204 05
Exp.No:
ASCENDING ORDER
Date :
AIM
APPARATUS REQUIRED
ALGORITHM
1. Load the count value from memory to A register and save it in B register
2. Decrement B register. Set HL pair as data array address pointer.
3. Set C register as counter for N-1 comparison.
4. Load the data of the array in accumulator using the data address pointer.
5. Increment the HL pair. Compare the data pointed by HL with accumulator.
6. If carry flag is set then go to step 10 else Go to next step.
7. Exchange the content of memory pointed by HL and accumulator
8. Decrement C reg. If zero flag is reset go to step 6 else go to next step.
9. Decrement B reg. If zero flag is reset go to step 3 else go to next step.
10. Terminate the program.
FLOWCHAT: START
[B] 04H
[HL] [8100H]
[C] 04H
[A] [HL]
[HL [HL]
] +1
IS [HL]
[A] ?
[HL] [HL]
[HL] [A]
[HL] [HL] - 1
IS [C]
[HL] [D]
=0
[HL] [HL] +1
[B] [B] - 1
[C] [C] – 01H
A IS [B]
=
0?
STOP
RESULT:
Thus the program for ascending order was implemented and verified successfully.
PROGRAM
OUTPUT
INPUT OUTPUT
ADDRESS DATA ADDRESS DATA
3200 05 3200 06
3201 03 3201 05
3202 01 3202 03
3203 02 3203 02
3204 06 3204 01
3205 3205
Exp.No:
DESCENDING ORDER
Date :
AIM
APPARATUS REQUIRED
ALGORITHM
1. Load the count value from memory to A register and save it in B register
4. Load the data of the array in accumulator using the data address pointer
FLOWCHART: START
[B] 04H
[HL] [8100H]
[C] 04H
[A] [HL]
[HL [HL]
] +1
IS [HL]
[A] ?
[D] [HL]
[HL] [A]
[HL] [HL] - 1
IS [C]
[HL] [D]
=0
[HL] [HL] +1
[B] [B] - 1
[C] [C] – 01H
A IS [B]
=
0?
STOP
RESULT
Thus the program for descending order was implemented and verified successfully.
OUTPUT
Exp.No:
TO FIND A MINIMUM AND MAXIMUM NUMBER
Date :
AIM
APPARATUS REQUIRED
2. Fetch the first element from the memory location and load it in the accumulator:
6. Compare the accumulator content with the memory content (next element)
7. If the accumulator content is smaller, then move the memory content (largest
element) to the accumulator. Else continue.
10. Store the result (accumulator content) in the specified memory location
OUTPUT
I /O MEMORY DAT DATA 2
LOCATION A1
INPUT 3100 01 02
3101 02 06
3102 03 07
3103 04 08
3104 05 09
OUTPUT 3200 05 09
2. Fetch the first element from the memory location and load it in the accumulator.
6. Compare the accumulator content with the memory content (next element).
7. If the accumulator content is smaller, then move the memory content (largest
element) to the accumulator. Else continue.
10. Store the result (accumulator content) in the specified memory location.
RESULT
Thus the program for find a maximum and minimum number in a given set was
implemented and verified successfully.
OUTPUT
INPUT OUTPUT
3500 04 3600 0A
3501 01
OUTPUT
INPUT OUTPUT
3501 01
Exp.No:
PROGRAMS USING ROTATE INSTRUCTIONS
Date :
AIM
APPARATUS REQUIRED
OUTPUT
INPUT OUTPUT
3500 05 3600 64
3501 00
OUTPUT
INPUT OUTPUT
3500 8A 3600 45
3501 00
3. Then the input is rotated using rotate accumulator left through carry
3. Then the input is rotated using rotate the accumulator right through carry
RESULT
Thus the program for using Rotate Instructions was implemented and verified
successfully.
OUTPUT
INPUT OUTPUT
3200 A 3300 41
Exp.No:
HEX/ASCII / BCD CODE CONVERSIONS
Date :
AIM
i. ASCII to Hexa ii. Hexa to ASCII iii. BCD to Hexa iv. Неxаtо BCD
APPARATUS REQUIRED
OUTPUT
INPUT OUTPUT
3300 2
3200 32 3202
4. Store it in memory
8. Store it in memory
OUTPUT
INPUT OUTPUT
4. Add the Least Significant Digit (LSD) to the result obtained by previous step
OUTPUT
INPUT OUTPUT
3300 0011
3200 32 3301 0010
RESULT
Thus the program for Hexa, ASCII and BCD Conversion was implemented and verified
successfully.
PROGRAM
ADDRESS OPCODE LABEL MNEMONICS COMMENTS
2000 3E 98 MVI A, 98H INIT 8255 PA & PC upper as I/P
2002 D3 03 OUT 03H PB & PC lower as o/p
2004 3E 00 MVI A,00H Select channel-0
2006 D3 01 OUT 01H Out at port B
2008 3E 00 LP MVI A, 00H Select SOC & ALE Pulse as 0
200A D3 02 OUT 02H Out at port-C
200C 3E 03 MVI A, 03H Select SOC & ALE Pulse as 1
200E D3 02 OUT 02H Out at port-C
2010 3E 00 MVI A, 00H Select SOC & ALE Pulse as 0
2012 D3 02 OUT 02H Out at port-C
2014 DB 02 LP1 IN 02H Read EOC at PC4 bit
2016 E6 10 ANI 10H Mask bit
2018 CA 14 20 JZ LP1
201B 3E 04 MVI A,04H Give OE as1
201D D3 02 OUT 02H Out at port-C
201F SB 00 IN 00H Read EOC at PC4 bit
2021 32 F6 27 STA 27F6H Store ACC at 27F6 location
2024 CD 33 F4 CALL FA33H Call Display Routine
2027 11 40 90 LXI D, 9040H Load De pair data 9040H
202A CD A6 03 CALL 03A6H Call Delay Routine
202D C3 08 20 JMP LP Jump loop
Exp.No:
A/D INTERFACING
Date :
AIM
To write an assembly language program for interfacing the Analog to Digital Converter
with 8085 Microprocessor.
APPARATUS REQUIRED
2. A/D Board 1
ALGORITHM
5. If the channel selection is pb2 to pb0 [0 0 0] the CHO will connect to the MA
output line. Now we get to CHO corresponding digital value see in LCD Smiley
CHO to CH7are connected to the MUX output line based on the status of the
channel selection for pb2to pb0.
8. Repeat the steps 3 and 5. Observe the multiplexer output and ADC output:
INTRODUCTION
ADC-0509 A/D Cards is an 8-bit analog to digital converter with 8 channel
multiplexer and microprocessor compatible control logic
The heart of the card is ADC-0809 monolithic CMOS Device. Its conversion is 100
micro sec. It eliminates the need for external zero and full scale adjustment. The card selects
one of the eight uni polar inputs by using the address decoder. ADC -0809 uses successive
approximation as conversion techniques. Input is latched to the decoder on the low to high
transition of the address latch enable signal. The conversion starts on the falling edge of the
start of conversion signal. During the process end of conversion signal goes low otherwise it
remains high. Digital output can be read from ADC making output enable signal high.
ADC CALCULATION
[E:g]
2500mv/19mv = 131.57895
RESULT
Thus the Interfacing of ADC with 8065 microprocessor was implemented and its
output is verified.
EE3414 – MPMC LABORATORY Page | 44
DEPARTMENT OF EEE
PROGRAM
Exp.No:
D/A INTERFACING
Date :
AIM
To write an assembly language program for interfacing the Digital to Analog Converter with
8085 Microprocessor.
APPARATUS REQUIRED
2. A/D Board 1
ALGORITHM
1. Connect the 9 pin D type connector from the DAC module to the Mp/Mc kit.
2. Connect the 26-pin connector from the DUAL CHANNEL DAC module toMp/Mc kit
3. Connect the keyboard to the Mp/Mc kit.
4. Switch on the power supply.
5. Assemble your program.
6. Execute it and measure the output voltage at the front panel of the DAC module.
7. Vary the digital count, execute the program and measure the outputanalog
voltage.
8. Take number of readings and if required draws the graph, DAC input count
output Voltage to check the linearity.
9. Switch off the power supply and remove all the connections.
CALCULATION
1 count = VCC/256
(decimal) =5/256
=0.0196v
OUTPUT
INTRODUCTION
A digital number can be converted to an analog voltage by selectively adding voltage which
is proportional to the weight of each binary digit. The module finds a great use in feedback
system, like output of a channel is fed to a control circuit to contain output in the form of
signal is observed at an oscilloscope or for a hard copy fed to an X Y Recorder/ X-T
Recorder. Different wave forms can be generated by using this DAC- 0800 Module.
CIRCUIT DESCRIPTION:
Port A& Port B are connected to channel 1 and channel 2 respectively. A reference voltage
of 8V is generated using 723 and is given to Verify points of the DAC 0800. The standard
output voltage will be 7.98V when FF is outputted and will be OV when 00 is outputted. The
output of DAC-0800 is fed to the operational amplifier to get the final output as X Out and Y
Out Several interesting waveforms can be generated and observed on Oscilloscope.
RESULT
Thus the Interfacing of DAC with 8085 microprocessor was implemented and itsoutput is
verified.
PROGRAM
ADDRESS OPCODE LABEL MNEMONICS COMMENTS
2000 3E 80 MVI A, 80H Set All Ports as Output
2002 D3 03 OUT 03H
2004 3E 11 MVI A, 11H Set All Square Red(Stop)
2006 D3 00 OUT 00H
2008 D3 02 OUT 02H
200A CD 50 20 Call delay1 Call Delay 10MSEC
200D 3E 44 Loop: MVI A, 44H Set Green (Go Led) of N & S
200F D3 00 OUT 00H Set Green (Go Led) of E& W
2011 CD 50 20 Call Delay1 Call Delay 10MSEC
2014 3E 22 MVI A, 22H
2016 D3 00 OUT 00H Set Yellow (Go LED) of N & S
2018 CD 63 20 Call Delay 2 Call Delay 5MSEC
201B 3E 99 MVI A, 99H Set All Square Red(Stop)
201D D3 00 OUT 00H Set Green (Go-Left Led) of N & S
201F CD 50 20 Call Delay 1 Call Delay 10MSEC
2022 3E 22 MVI A, 22H
2024 D3 00 OUT 00H Set Yellow (Start LED) of N & S
2026 CD 63 20 Call Delay2 Call Delay 5 MSEC
2029 3E 11 MVI A, 11H Set All Square Red(Stop)
202B D3 00 OUT 00H
202D 3E 44 MVI A, 44H Set Green (Go LED) of E & W
202F D3 02 OUT 02H
2031 CD 50 20 Call Delay1 Call Delay 10MSEC
2034 3E 22 MVI A, 22H
2036 D3 02 OUT 02H Set Yellow (Start LED) of E & W
2038 CD 63 20 Call Delay2 Call Delay 5MSEC
203B 3E 99 MVI A, 99H Set All Square Red (Stop)
203D D3 02 OUT 02H Set Green (go-left led) of E & W
203F CD 50 20 Call Delay 1 Call Delay 10MSEC
2042 3E 22 MVI A, 22H Set Yellow (start LED) of E & W
2044 D3 02 OUT 02H
2046 CD 63 20 Call Delay 2 Call Delay 5 MSEC
2049 3E 11 MVI A, 11H Set All Square Red (Stop)
204B D3 02 OUT 02H
204D C3 0D 20 JMP Loop Jump to Loop
2050 06 25 Delay1: MVI B, 25H 10 MSEC DelayRoutine
2052 0E FF LP3 MVI C, 0FFH
2054 16 FF LP2 MVI D, 0FFH
2056 15 LP1 DCR D
2057 C2 56 20 JNZ LP1
205A 0D DCR C
205B C2 54 20 JNZ LP2
205E 05 DCR B
205F C2 52 20 JNZ LP3
2062 C9 RET
2063 06 05 Delay2: MVI B, 05H 5 MSEC Delay Routine
2065 0E FF LP6: MVI C, 0FFH
Exp.No:
TRAFFIC LIGHT CONTROLLER
Date :
AIM
To write an assembly language program for interfacing the Traffic Light Controller with
8085 Microprocessor.
APPARATUS REQUIRED
ALGORITHM
INTRODUCTION
In this modern life, the number of vehicles increases more day by day. The increase of
vehicle may cause accidents and other problems on the road. Controlling traffic at regular
intervals of time with accuracy and uniformity has become a necessity to avoid accidents,
discomfort of drivers. The microprocessor controls the traffic signals very effectively and
with accurate timings.
CIRCUIT DESCRIPTION
In this Traffic Light Module one square is shown which has four ends called East, West, and
North & South. The Traffic light Module is interfaced with Port A and Fort C of 8255. Port
A is connected with North and South LED's, Port C is connected with East and West LED's.
Each end has four LED's called Stop, Start, and GO straight & GO LEFT.
Port A
North South
PA7 PA6 PA5 PA4 PA3 PA2 PA1 PA0
Port B
North South
PC7 PC6 PC5 PC4 PC3 PC2 PC1 PC0
GO GO- Start Stop GO GO- Start Stop
RESULT
Thus the Interfacing of Traffic Light Controller with 8085 microprocessor was implemented
and its output is verified
PROGRAM
ADDRESS OPCODE LABEL MNEMONICS COMMENTS
MOV SI, 1200 MOV 1200 TO SI
MOV DI, 1300 MOV 1300 TO DI
MOV CX, 0006 Assign Count Value CX As 6
CLD Clear Direction Flag
L1: MOVSB Copies A Single Byte and
Increment
LOOP L1 Repeat Till it Completes Block
Transfer
HLT Halt
OUTPUT
INPUT OUTPUT
2002H 1302H
2003H 1303H
2004H 1304H
2005H 1305H
Exp.No:
DISPLAY THE DATA
Date :
AIM
APPARATUS REQUIRED
ALGORITHM
Step 1:
Move the contents to DS
Step 2:
Place it in an array
Step 3:
Move the contents to source index Step
4:
Increment SI and DI
Step 5:
Loop it till it gets completed
Step 6:
End
Result:
Thus the above program was written executed and desired output was obtained.
OUTPUT
INPUT OUTPUT
3200 05
A Reg 02
B Reg 03 3201 00
Exp.No:
DEMONSTRATION OF BASIC INSTRUCTIONS WITH 8051 MICRO
Date : CONTROLLER EXECUTION, INCLUDING CONDITIONAL JUMPS,
LOOPING (8-BIT ADDITION AND SUBTRACTION)
AIM
To write an assembly language program for 8-bit addition and subtraction using 8051.
APPARATUS REQUIRED
OUTPUT
INPUT OUTPUT
3200 07
A Reg 33
B Reg 02 3201 00
RESULT
Thus the program for Addition and Subtraction was implemented and verified
successfully.
OUTPUT
INPUT OUTPUT
3701 06
3600 02
3601 03 3700 00
Exp.No:
DEMONSTRATION OF BASIC INSTRUCTIONS WITH 8051 MICRO
Date : CONTROLLER EXECUTION, INCLUDING CONDITIONAL JUMPS,
LOOPING (8-BIT MULTIPLICATION AND DIVISION)
AIM
To write an assembly language program for 8-bit multiplication and division using8051.
APPARATUS REQUIRED
OUTPUT
INPUT OUTPUT
3701 02
3600 06
3601 03 3700 00
RESULT
Thus the program for Multiplication and Division was implemented and verified successfully.
Exp.No:
LARGEST ELEMENT IN AN ARRAY
Date :
AIM:
To write an assembly language program to find the largest element in an array and to
execute it using 8051.
APPARATUS REQUIRED:
ALGORITHM
1. Start.
4. Compare the numbers and swap them so that the two numbers are in ascending
order.
6. Repeat the steps 3, 4 and 5 and store the largest number as the result in memory.
7. Stop.
RESULT:
Thus an assembly language program written to find the largest element in an array was
executed using 8051 microcontroller and the output was verified.
Exp.No:
SMALLEST ELEMENT IN AN ARRAY
Date :
AIM:
To write an assembly language program to find the smallest element in an array and to
execute it using 8051.
APPARATUS REQUIRED:
ALGORITHM
1. Start.
2. Load the array count in a register
3. Get the first two numbers.
4. Compare the numbers and swap them so that the two numbers are in ascending
order.
5. Repeat steps 3 and 4 till the array is completed.
6. Repeat the steps 3, 4 and 5 and store the largest number as the result in memory.
7. Stop.
RESULT:
Thus an assembly language program written for finding the smallest element in an array was
executed using 8051 microcontroller and the output was verified.
PROGRAM
This program will move the motor in Anti-clock wise direction. For Clock wise
direction change F9, F5, F6, FA in place of FA, F6, F5, F9.
Exp.No:
PROGRAM FOR STEPPER MOTOR CONTROLLER
Date :
AIM
APPARATUS REQUIRED
2. Stepper Motor 1
THEORY
There are many systems to monitor various processes and give out control signals in the
form of digits but there is only one device to convert these digital pulses into precise
incremental motion and that device is stepping motor Stepper motor is a device which
converts digital pulses into precise angular of linear steps of desired valve Stepper Motor has
two phase bifilar form with having a Step Angle of 1.8 Stepper Motor module can hold
Motor in infinitely static condition. It can control speed up to 3,000 RPM i.e. O to 10,000
Step per second. It can be program in three parameters the Speed, Direction & Number of
steps. The speed of motor is generated by frequency of switching not the supply voltage. A
pulse input to two phase clock will move the shaft of motor by on step for every pulse: Thus
number of steps can be moved and can be precisely controlled. If there is no pulse the motor
will remain lock up in the portion in which the last step was taken. Since at any time of two
winding always energized which lock the motor electromagnetically.
STEPPER MOTOR:
Stepping Motors differ from conventional Servo Motors in following respect:
A pulse input two phase clock (instead of continuous pulses) will move the shaft of motor by
one step for every pulse, thus number of steps be moved can be precisely controlled When
there is no pulse input, the rotor will remain locked up in the portion in which the last step
was taken since at any time two winding always energized which fock the rotor
electromagnetically.
Stepping motors can be programmed in three parameters namely:
(a) Direction
The stepping action is caused by sequential switching of supply to the two phases of the
motor as described in switching diagram. All stepping motors are of bifilar type with six
leads. Watch of the two phases of motor has double winding with a centre top switching the
supply from one side to another of a phase causes reversal of magnetic polar without actually
reversing the polarity of supply. For step input sequence gives 1.8° (full) after and eight step
input sequences give 0.9° (half) step function.
Switching Sequence
1 1 0 1 0 2 Phase
2 0 1 1 0 Excitation
3 0 1 0 1
4 1 0 0 1
1 1 0 1 0
2 0 0 1 0
3 0 1 1 0
4 0 1 0 1
5 0 1 0 1
6 0 0 0 1
7 1 0 0 1
8 1 0 0 0
The above switching Sequence/Logic will move shaft in one direction. To change direction
of rotation read the sequence upward.
The specified torque of any stepping motor is the torque at stand still (holding torque). This
torque is directly proportional to the current in the winding. The current in winding is
governed by the DC resistance of winding.
As the switching sequence starts the inductive reactance of the winding which increases with
the frequency of switching opposes the rise of current to desired level within the time given
for one step depending upon the speed of stepping. This is mainly due to L/R time constant
of winding. The drop in current level causes drop in torque as the speed increases. In order to
improve torque at high speeds it is necessary to maintain current at the desired level. This
can be done by one of the following methods:
BLOCK DIAGRAM:
PROCEDURE
1. Enter the above program starting from location 3000 and execute the same.
2. The stepper motor rotates.
3. Varying the count at R4 and RS can vary the speed.
RESULT
Thus stepper motor was interfaced with 8051 and run in forward and reverse directions at
various speeds.
PROGRAM
Exp.No:
TRAFFIC LIGHT CONTROLLER
Date :
AIM
To write an assembly language program for interfacing the Traffic Light Controller with
8051 Microcontroller.
APPARATUS REQUIRED
ALGORITHM
INTRODUCTION
In this modern life, the number of vehicles increases more day by day. The increase of
vehicle may cause accidents and other problems on the road. Controlling traffic at regular
intervals of time with accuracy and uniformity has become a necessity to avoid accidents,
discomfort of drivers. The microprocessor controls the traffic signals very effectively and
with accurate timings.
CIRCUIT DESCRIPTION
In this Traffic Light Module one square is shown which has four ends called East, West, and
North & South. The Traffic light Module is interfaced with Port A and Fort C of 8255. Port
A is connected with North and South LED's, Port C is connected with East and West LED's.
Each end has four LED's called Stop, Start, and GO straight & GO LEFT.
RESULT
Thus the Interfacing of Traffic Light Controller with 8051 microcontroller was implemented
and its output is verified
PROGRAM
Exp.No:
STUDY ON INTERFACE WITH ANALOG TO DIGITAL
Date : CONVERTOR
AIM
APPARATUS REQUIRED
2. A/D Converter 1
INTRODUCTION
ADC-0809 A/D Card is an 8-bit analog to digital converter with 8 channel multiplexer and
microprocessor compatible control logic. The heart of the card is ADC- 0809 monolithic C-
MOS Device. Its conversion time is 100 micro sec. It eliminates the need for external zero
and full scale adjustment. The card selects one of the eight uni polar inputs by using the
address decoder. ADC-0809 uses successive approximation as conversion techniques. Input
is latched to the deodar on the low to high transition of the address latch enable signal. The
conversion starts on the falling edge of the start of conversion signal. During the process end
of conversion signal goes low otherwise remains high. Digital output can be read from ADC
making output enable signal high.
CIRCUIT DESCRIPTION
The Data line of ADC-0809 00 to 07 is connected to Port A as input sort soc connected to
PCU as Output Port; EOC is connected to IC4 as Input Port & ALE is connected to PC1 as
Output Port. All eight inputs of 0-5 Volts ADC: 0809 analog with external clock, external
EOC, external SOC signals are brought to 26 pin connector. A Clock input of a specified
frequency is required for the operation of ADC-G009 A Counter 7:41 593 has been used for
this purpose
RESULT:
Thus the interfacing of analog to digital converter was interfaced with 8051
microcontroller and the output is verified.
PROGRAM
Exp.No:
STUDY ON INTERFACE WITH DIGITAL TO ANALOG
Date : CONVERTER
AIM
APPARATUS REQUIRED
2. D/A Converter 1
INTRODUCTION
A digital number can be converted to an analog voltage by selectively adding voltage which
is proportional to the weight of each binary digit. The module finds a great use in feed back
system, like output of a channel is fed to a control circuit to contain output in the form of
signal is observed at an oscilloscope or for a hard copy fed to an X- Y Recorder/ X-T
Recorder. Different wave forms can be generated by using this DAC- 0800Module.
CIRCUIT DESCRIPTION
Port A& Port B are connected to channel 1 and channel 2 respectively. A reference voltage
of 8V is generated using 723 and is given to Verify points of the DAC 0800. The standard
output voltage will be 7.98V when FF is outputted and will be 0v when 00 is outputted. The
output of DAC-0800 is fed to the operational amplifier to get the final output as X Out and Y
Out. Several interesting waveforms can be generated and observed on Oscilloscope
RESULT:
Thus the interfacing of digital to analog converter was interfaced with 8051
microcontroller and the output is verified.
Exp.No:
DISPLAY THE DATA
Date :
AIM
APPARATUS REQUIRED
ALGORITHM
Step 1:
Move the contents to DS
Step 2:
Place it in an array
Step 3:
Move the contents to source index Step
4:
Increment SI and DI
Step 5:
Loop it till it gets completed
Step 6:
End
Result:
Thus the above program was written executed and desired output was obtained.
Pin Diagram
Exp.No:
STUDY ON PIC ARCHITECTURE
Date :
AIM
The PIC 16F877A PIC microcontroller is one of the most popular general purpose
microcontrollers. It is of 8-bit which means the most available operations are limited to 8-
bits.It is a 40-pin IC.
Ports:
There is one 6-bit ports: A , 3 8-bit ports: B ,C,D and one 3 bit port: E.
PORTA (Pin 2 to 7) and TRISA register: PORTA is a 6-bit wide, bidirectional port. The
corresponding data direction register is TRISA. Setting a TRISA bit ( = 1) will make the
corresponding. PORTA pin an input (i.e., put the corresponding output driver in a High-
Impedance mode).Clearing a TRISA bit (= 0) will make the corresponding PORTA pin an
output (i.e., put the contents of the output latch on the selected pin).Reading the PORTA
register reads the status of the pins, whereas writing to it will write to the port latch. All write
operations are read- modify write operations. Therefore, a write to a port implies that the port
pins are read, the value is modified and then written to the port data latch.
PORTB (Pin 33 to 40)and TRISB register: PORTB is an 8-bit wide, bidirectional port. The
corresponding data direction register is TRISB. Setting a TRISB bit (= 1) will make the
corresponding PORTB pin an input (i.e., put the corresponding output driver in a High-
Impedance mode). Clearing a TRISB bit (= 0) will make the corresponding PORTB pin an
output (i.e. put the contents of the output latch on the selected pin).Three pins of PORTB are
multiplexed with the In-Circuit. Debugger and Low- Voltage Programming function:
RB3/PGM, RB6/PGC and RB7/PGD.
PORTC (pin 15 to 18 and pin 24 to 26) and TRISC register: PORTC is an 8-bit wide,
bidirectional port. The corresponding data direction register is TRISC. Setting a TRISC bit
(= 1) will make the corresponding PORTC pin an input (i.e., put the corresponding output
driver in a High-Impedance mode). Clearing a TRISC bit (= 0) will make the corresponding
PORTC pin an output (i.e. put the contents of the output latch on the selected pin).PORTC is
multiplexed with several peripheral functions PORTC pins
have Schmitt Trigger input buffers. When the I2C module is enabled, the PORTC<4:3>pins
can be configured with normal I2C levels, or with SM Bus levels, by using the CKE bit
(SSPSTAT<6>).When enabling peripheral functions, care should be taken in defining TRIS
bits for each PORTC pin. Some peripherals override the TRIS bit to make a pin an output,
while other peripherals override the TRIS bit to make a pin an input.
Since the TRIS bit override is in effect while the peripheral is enabled, read-modify write
instructions (BSF, BCF, XOR WF) with TRISC as the destination, should be avoided. The
user should refer to corresponding peripheral section for the correct TRIS bit settings.
PORTD (Pin 19to22 and pin 27to30) and TRISD register: PORTD is an 8-bit port with
Schmitt Trigger input buffers. Each pin is individually configurable as an input or output.
PORTD can be configured as an 8-bit wide microprocessor port (Parallel Slave Port) by
setting control bit, PSPMODE (TRISE<4>). In this mode, the input buffers are TTL.
PORTE (Pin8 to 10) and TRISE register: PORTE has three pins (RE0/RD/AN5,
RE1/WR/AN6 and RE2/CS/AN7) which are individually configurable as inputs or outputs.
These pins have Schmitt Trigger input buffers. The PORTE pins become the I/O control
inputs for the microprocessor port when bit PSPMODE (TRISE<4>) is set. In this mode, the
user must make certain that the TRISE<2:0> bits are set and that the pins are configured as
digital inputs.
Also, ensure that ADCON1 is configured for digital I/O. In this mode, the input buffers are
TTL. PORTE pins are multiplexed with analog inputs. When selected for analog input, these
pins will read as ‘0’s.
RESULT:
Thus the study of PIC processor has been done and ensured its composition with internal
features specifically.
PROGRAM:
Exp.No:
PROGRAMS TO VERIFY TIMER AND INTERRUPTS OPERATIONS IN
Date : 8051 MICROCONTROLLER
AIM:
To write a program to generate a square wave of frequency, transfer a data serially from one
kit to another and to verify the result.
APPARATUS REQUIRED:
Y(dec) = (Ts/2)/(1.085microsec)
= Count(hexa)
Result:
Thus to generate a square wave of frequency, transfer a data serially from one kit to another and
also the result is verified.
Exp.No:
STUDY OF ARM PROCESSOR
Date :
AIM:
To study of ARM processor system and describe the features of architecture.
ARCHITECTURE OF ARM PROCESSOR:
1.1. Features of ARM DEVELOPMENT KIT Processor:
16-bit/32-bit ARM7TDMI-S microcontroller in a tiny LQFP64 package.8 kb to 40 kb of on-
chip static RAM and 32 kb to 512 kb of on-chip flash memory. 128-bit wide
interface/accelerator enables high-speed 60 MHz operation. In-System/In-Application
Programming (ISP/IAP) via on-chip boot loader software.
Single flash sector/full chip erase in 400 ms and programming of 256 bytes in 1ms.USB 2.0
Full-speed compliant device controller with 2 Kb of endpoint RAM. The LPC2146/48
provides 8 Kb of on-chip RAM accessible to USB by DMA.
One or two (LPC2141/42 vs. LPC2144/46/48) 10-bit ADCs provide a total of 6/14 analog
inputs, with conversion times as low as 2.44 μs per channel. Single 10-bit DAC provides
variable analog output (LPC2142/44/46/48 only).Two 32-bit timers/external event counters
(with four capture and four compare channels each), PWM unit (six outputs) and watchdog.
Low power Real-Time Clock (RTC) with independent power and 32 kHz clock input.
Multiple serial interfaces including two UARTs (16C550), two Fast I2Cbus (400 kbit/s), SPI
and SSP with buffering and variable data length capabilities.
Vectored Interrupt Controller (VIC) with configurable priorities and vector addresses. Up to
45 of 5 V tolerant fast general purpose I/O pins in a tiny LQFP64 package. Up to 21 external
interrupt pins available.
60MHz maximum CPU clock available from programmable on-chip PLL with settling time
of 100μs.On-chip integrated oscillator operates with an external crystal from 1 MHz to 25
MHz. Power saving modes include Idle and Power down.
Individual enable/disable of peripheral functions as well as peripheral clock scaling for
additional power optimization. Processor wake-up from Power-down mode via external
interrupt or BOD. Single power supply chip with POR and BOD circuits: CPU operating
voltage range of 3.0 V to 3.6 V (3.3 V ± 10 %) with 5 V
RESULT:
Thus the study of ARM processor has been done and ensured its composition with internal features
specifically.