MP DSP Lab Manual
MP DSP Lab Manual
net
DEPARTMENT
OF
ELECTRONICS & COMMUNICATION ENGINEERING
MARCH - 2012
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
MITS MITS/ECE
LAB WISE-LAB MANUALS DEPARTMENT : ECE
DEPARTMENT
OF
ELECTRONICS & COMMUNICATION ENGINEERING
MARCH 2012
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
TABLE OF CONTENTS
5 ALP Program to
6 ALP Program to
7 ALP Program to
8 ALP Program to
11 ALP Program to
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
5 A) Signed Multiplication
B) Signed Division
10 A) Block move
D) String comparison
E) String insertion
F) String deletion
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
1 Generation of positive RAMP wave using DAC Generation of triangular wave using DAC
8051 Microcontrollers
2 8051 Timers
5 2s compliment
6 8-bit subtraction
7 8-bit division
9 Sum of n-number
13 Generation of 00 to 0f numbers
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
OVERVIEWS OF TRAINER
The lNTELs 8086 CPU are very popular and powerful third generation microprocessor. This
processor has 16 bit internal architecture, and can transfer 16 bits at a time. Because of its powerful
architecture and flexibility in operation, this processor is suitable for a wide spectrum of micro
computer applications
SDA trainer is a System Design Aid for the Intel 8086 microprocessors. IT is a highly versatile
and powerful system designed to assist students and engineers in learning about the architecture
and programming of these processors and designing systems& interfacing around them. This
trainer kit is configured for maximum mode only. It is housed in an attractive plastic cabinet; with
the power supply is connected externally.
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
SPECIFICATIONS
CPU:Intel 8086 operating at 5MHz in MAX mode; provision for onboard 8087 Co-processor
SERIAL I/O: One RS 232C compatible interface using USART 8251A,with hardware
selectable baudrate using one channel of 8253 timer with MAX 232C IC
TIMER:Three 16 bit counter/ timers using 8253A counter 1 is used for serial I/O baudrate
generation
PIC: Programmable interrupt controller using 8259A provides interrupt vectors for 8 jumper
selectable internal/ external sources
KEYBOARD/ DISPLAY :
INTERRUPTS:
CPU BUS: All address, data and center lines ate TTL compatible and are terminated in berg
strip header
PARALLER I/O: All signals are TTL compatible and terminated in berg strip headers for PPI
expansion. Its compatible with all of our experimental interface modules.
SERIAL I/O: Serial port signals are terminated in standard 9 pin D type connecter.
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
COMPUTER INTERFACE This can be interfaced to host computer system through the main
serial port; The driver program or communication between computer and trainer allows the
computer to be used as a simple dumb terminal and also facilitates uploading
The first configuration requires a computer system with an RS -232C port, can be used as the
controlling device as shown below.
RS 232C CABLE
Computer Trainer
When a Computer system is interfaced to trainer, the driver program must be resident in the
computer system.
The second mode of operation id achieved through onboard KEYBOARD/DISPAY.
In this mode the trainer kit interacts with the user through a computer keyboard and 16x2 LCD
display. This configuration eliminates the need for a computer and offers a convenient way for
using the trainer as a stand alone system.
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
START
STOP
10
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
APPARATUS:
ALS-86 p kit.
Key board
Power supply
ALGORITHM:
1. Start.
2. Load content in AX Register
3. Load content in BX Register
4. Load content in CX Register
5. Load content in DX Register
6. Load content in SI Register
7. Load content in DI Register
8. End program
SAMPLE OUTPUT:-
AX = 1111 BX=2222,
CX=3333 DX=4444,
SI=5555 DI=6666.
RESULT: Thus the initialization of the register with immediate data has been executed successfully
and the result is verified.
11
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
START
STOP
12
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
PROG 2 ALP Program to move the data from memory locations to registers
AIM:
program initializes the registers with immediate data
APPARATUS:
ALS-86 p kit.
Key board
Power supply
ALGORITHM:
1. Start.
2. Load content in AX Register from memory location 4100
3. Load content in BX Register from memory location 4102
4. Load content in CX Register from memory location 4104
5. Load content in DX Register from memory location 4106
6. Load content in SI Register from memory location 4108
7. Load content in DI Register from memory location 410A
8. End program
INPUT :- OUTPUT:-
4100 : 1111 AX = 1111,
4102 : 2222 BX= 2222,
4104 : 3333 CX= 3333,
4106 : 4444 DX=4444,
4108 : 5555 SI=5555,
410A: 6666 DI= 6666.
RESULT: Thus the date is moved from memory to the registers has been executed successfully and the
result is verified.
13
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
START
PUSH DS
POP ES
Load CX with 09
MOVSB
NO
CX=0
YES
STOP
14
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
Start
Stop
15
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
AIM:
program to move a block of memory from one memory location to other
APPARATUS:
ALS-86 p kit.
Key board
Power supply
ALGORITHM:
1. Start.
2. Load the source Index with starting memory address of content
3. Load the destination Index where to store the memory content
4. Initialize the counter CX with value 10
5. Push the contents on to the stack and pop the contents from the stack and
store in the memory location pointed by the DI
6. Repeat the step 5 for 10 times until CX becomes 0.
7. End of program
RESULT: Thus the program to move a block of memory from one memory location to other has
been executed successfully and the result is verified.
16
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
AIM:
Write a program to interchange two words
APPARATUS:
ALS-86 p kit.
Key board
Power supply
ALGORITHM:
1. Move pointer 1 SI to 4100 location
2. Move Pointer 2 DI to 4102 location
3. Move DI contents to AX
4. Move SI contents to BX
5. Exchange AX with BX
6. Now store them back and Move the content
7. End of program
RESULT: Thus the program to interchange two words has been executed successfully and the
result is verified.
17
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
Start
Stop
18
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
AIM:
To perform the addition of two 8 bit numbers using 8086
APPARATUS:
ALS-86 p kit.
Key board
Power supply
ALGORITHM:
1. Initialize the segment address & clear the carry flag
2. Initialize the destination address
3. Move the first 8-bit number to AL register
4. Move the second 8-bit number to BL register
5. Add the contents of AL and BL and store result in AL
6. End of program
INPUT :- 4100 : 45
4101 : 55
OUTPUT:- 4102 : 9A
RESULT: Thus the addition of two 8-bit numbers has been executed successfully using 8086
microprocessor and the result is verified.
19
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
AIM:
To perform the addition of two 16- bit numbers using 8086
APPARATUS:
ALS-86 p kit.
Key board
Power supply
ALGORITHM:
1. start
2. Initialize the segment address & clear the carry flag
3. Initialize the destination address
4. Move the first 8-bit number to AX register
5. Move the second 8-bit number to BX register
6. Add the contents of AX and BX and store result in AX
7. End of program
4102 : 1111
RESULT: Thus the addition of two 16-bit numbers has been executed successfully using 8086
microprocessor and the result is verified
20
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
Start
Stop
21
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
AIM:
To perform the addition of two 32 bit numbers using 8086
APPARATUS:
ALS-86 p kit.
Key board
Power supply
ALGORITHM:
1. start
2. Initialize the segment address & clear the carry flag
3. Initialize the destination address
4. Load AX, BX, CX, DX values from respective memory locations
5. Add AX and CX register content and store the result in AX
6. ADD with carry BX and DX register content and store the result in BX
7. Store the results into memory from registers AX and BX
8. End of program
INPUT :- 4100 : 11 11 22 22
4104 : 33 33 44 44
OUTPUT:- 4108 : 44 44 66 66
RESULT: Thus the addition of two 32-bit numbers has been executed successfully using 8086
microprocessor and the result is verified
22
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
Start
Stop
23
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
AIM:
To perform the subtraction of two 8 bit numbers using 8086
APPARATUS:
ALS-86 p kit.
Key board
Power supply
ALGORITHM:
1. start
2. Initialize the segment address & clear the carry flag
3. Initialize the destination address
4. Move the first 8-bit number to AL register
5. Move the second 8-bit number to BL register
6. Subtract the contents of AL and BL and store result in AL
7. Store the result into memory from registers
8. End of program
INPUT :- 4100 : 45
4101 : 55
OUTPUT:- 4102 : F0
RESULT: Thus the Subtraction of two 8-bit numbers has been executed successfully using
8086 MP and the result is verified.
24
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
AIM:
To perform the subtraction of two 16- bit numbers using 8086
APPARATUS:
ALS-86 p kit.
Key board
Power supply
ALGORITHM:
1. start
2. Initialize the segment address & clear the carry flag
3. Initialize the destination address
4. Move the first 16-bit number to AX register
5. Move the second 16-bit number to BX register
6. Subtract the contents of AX and BX and store result in AX
7. Store the result into memory from registers
8. End of program
4102 : 2211
RESULT: Thus the Subtraction of two 16 -bit numbers has been executed successfully using
8086 MP and the result is verified
25
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
Start
Stop
26
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
AIM:
To perform the multiplication of two 8- bit numbers using 8086
APPARATUS:
ALS-86 p kit.
Key board
Power supply
ALGORITHM:
1. start
2. Initialize the segment address
3. Initialize the destination address
4. Read two numbers into registers from memory
5. Multiply the two numbers & store the result in another register
6. Store the result into memory from registers
7. End of program
INPUT :- 4100 : 33
4101 : 22
RESULT: Thus the multiplication of two 8 -bit numbers has been executed successfully using
8086 MP and the result is verified
27
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
AIM:
To perform the multiplication of two 16- bit numbers or word using 8086
microprocessor
APPARATUS:
ALS-86 p kit.
Key board
Power supply
ALGORITHM:
1. Initialize the segment address
2. Initialize the destination address
3. Take two 16 bit numbers from memory & store them in registers
4. Multiply the two numbers and store the result in another register
5. Store the result into memory from registers
6. End of program
4102 : 2222
RESULT: Thus the multiplication of two 8 -bit numbers has been executed successfully using
8086 MP and the result is verified
28
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
Start
Stop
29
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
AIM:
To perform the division of 16 bit by 8 bit number using 8086 microprocessor
APPARATUS:
ALS-86 p kit.
Key board
Power supply
ALGORITHM:
1. start
2. Initialize the segment address
3. Initialize the destination address
4. Load two numbers from memory to registers
5. Divide the two numbers &store the result in a register
6. Store the result into memory from registers
7. End of program
4102 : 0002
4105 : 0001
RESULT: Thus the division of 16-bit number by 8 bit number has been executed successfully
using 8086 MP and the result is verified
30
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
AIM:
To perform the division of 32- bit number by 16 Bit number using 8086
microprocessor
APPARATUS:
ALS-86 p kit.
Key board
Power supply
ALGORITHM:
1. start
2. Initialize the segment address
3. Initialize the destination address
4. Load two numbers from memory to registers
5. Divide the two numbers &store the result in a register
6. Store the result into memory from registers
7. End of program
OUTPUT:- AX : 1244
DX : 0001
RESULT: Thus the division of 32-bit number by 16- bit number has been executed successfully
using 8086 MP and the result is verified
31
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
START
Initialize CL with 05
Initialize AL with 00
Add AL and CL
Decrement CL
CL = 0
STOP
32
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
AIM:
To perform the sum of given numbers(1,2,3,4,and 5) using 8086 microprocessor
APPARATUS:
ALS-86 p kit.
Key board
Power supply
ALGORITHM:
1. start
2. Initialize the CL register with 05
3. Initialize the register A to 00
4. Add register contents of A and C
5. Decrement the count value if count is not equal to zero jump to
Loop1(L1)
6. Repeat step 5 up to count becomes 0
7. End of program
INPUT :-
5+4+3+2+1
OUTPUT:- AL: 0F
RESULT: Thus the sum of given N numbers(1,2,3,4,and 5) has been executed successfully
using 8086 MP and the result is verified
33
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
START
Initialize CL with 05
Load BL with CL
Initialize AL with 00
Add AL and CL
CL = 0
AL = AX/BL
STOP
34
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
AIM:
To perform the average of given numbers(1,2,3,4,and 5) using 8086 microprocessor
APPARATUS:
ALS-86 p kit.
Key board
Power supply
ALGORITHM:
1. start
2. Initialize the CL and BL register with 05
3. Initialize the register A to 00
4. Add register contents of A and C
5. Decrement the count value if count is not equal to zero jump to
Loop1(L1)
6. Repeat step 5 up to count becomes 0
7. Divide the content of A with 05.
8. End of program
INPUT :-
(5+4+3+2+1) / 05
OUTPUT:- AL: 03
RESULT: Thus the average of given N numbers(1,2,3,4,and 5) has been executed successfully
using 8086 MP and the result is verified
35
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
START
Initialize CL with 05
Initialize BL with 00
Load AL with CL
Add AL and BL
Decrement CL
No
CL = 0
Yes
STOP
36
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
AIM:
To perform the sum of squares of N numbers (1,2,3,4,and 5) using 8086
microprocessor
APPARATUS:
ALS-86 p kit.
Key board
Power supply
ALGORITHM:
1. start
2. Initialize the CL and load the same into AL
3. Initialize the register BL to 00
4. Multiply CL with AL
5. Add AL and BL store result in BL
6. Decrement the count value if count is not equal to zero jump to
Loop1(L1)
7. Repeat step 6 up to count becomes 0
8. End of program
INPUT :-
52+42+32+22+1
25+16+9+4+1
RESULT: Thus the sum of squares of given N numbers(1,2,3,4,and 5) has been executed
successfully using 8086 MP and the result is verified
37
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
AIM:
To perform a program to sort given 8 number in descending order starting from address
4100
APPARATUS:
ALS-86 p kit.
Key board
Power supply
ALGORITHM:
1. start
2. Initialize the segment address
3. Initialize the destination address
4. Counter initializes to 8
5. BX to point input stream
6. Get the byte AL
7. Increment the pointer
8. Compare AL with next byte
9. If AL>=[BL] jump out
10. Else exchange
11. Adjacent byte
12. If exchange is mode flag it
13. Loop till the end
14. Now see if a pass is exchange free
End of program
38
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
INPUT :-
4100 : 02
4101 : 04
4102 : 06
4103 : 03
4104 : 01
4105 : 05
4106 : 08
4107 : 07
OUTPUT:-
4100 : 08
4101 : 07
4102 : 06
4103 : 05
4104 : 04
4105 : 03
4106 : 02
4107 : 0
RESULT:
By using 8086 microprocessor trainer the given 8 bytes of data is sorted in the
descending order
39
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
AIM:
To perform a program to sort given 8 number in ascending order starting from address
4100
APPARATUS:
ALS-86 p kit.
Key board
Power supply
ALGORITHM:
1. start
2. Initialize the segment address
3. Initialize the destination address
4. Get the data byte into AL
5. Get the 10 digit to lower
6. Nibble of AL, most with units
7. Multiply by 10s digit by 10
8. Add unit to it
9. End of program
INPUT :-
4100 : 02
4101 : 04
4102 : 06
4103 : 03
4104 : 01
4105 : 05
4106 : 08
4107 : 07
OUTPUT:-
4100 : 01
4101 : 02
4102 : 03
4103 : 04
4104 : 05
4105 : 06
4106 : 07
4107 : 08
RESULT:
By using 8086 microprocessor trainer the given 8 bytes of data is sorted in the
ascending order
40
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
AIM:
APPARATUS:
ALS-86 p kit.
Key board
Power supply
ALGORITHM:
1. start
2. Initialize the segment address
3. Initialize the destination address
4. Get the hex decimal byte to AL
5. Set AH to 0
6. Divide the number by 100
7. Now 100s are in AL move it to CH
8. Get the remainder to AL
9. Set AH to 0
10. Now divide the number by 10
11. Now 10s are in AL
12. Units are in AH
13. Position is in AH to lower nibble and it with F0
14. Now AL will contain 10s and units & get 100s to AH from CH
15. Now the result in AH,AL
16. End of program
41
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
RESULT:
Thus conversion of Hex number to decimal number performed by 8086 MP
42
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
AIM:
Program to convert given decimal number to hexa decimal number
APPARATUS:
ALS-86 p kit.
Key board
Power supply
ALGORITHM:
10. start
11. Initialize the segment address
12. Initialize the destination address
13. Get the data byte into AL
14. Get the 10 digit to lower
15. Nibble of AL, most with units
16. Multiply by 10s digit by 10
17. Add unit to it
18. End of program
RESULT:
Thus conversion of decimal number to Hex number performed by 8086 microprocessor
43
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
AIM:
APPARATUS:
ALS-86 p kit.
Key board
Power supply
ALGORITHM:
1. start
2. Initialize the segment address
3. Initialize the destination address
4. Get the data words to AX
5. Initializes count location to 0
6. Set counter to 16
7. Shift AX to check last bit
8. If it not 1 jump out and if it is 1 increment counter
9. Repeat for all 16 bits
10. End of the program
Input : 4100 : 32 00
Output : 4102 : 03
RESULT:
Thus number of ones are counted in a given word using 8086 microprocessor program
44
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
8086 Kit
PROG 13 Program to convert binary to ASCII program
AIM: Program to convert given binary number to ASCII using 8086 microprocessor
APPARATUS:
ALS-86 p kit.
Key board
Power supply
ALGORITHM:
1. start
2. Get the AL value from 4100 memory location load the same in AH.
3. Mask with higher nibble
4. Call convert to ASCII routine
5. Load AL from AH and initialize the counter with 4
6. Rotate AL for 4 times(getting higher nibble)
7. Mask with higher nibble
8. Call convert to ASCII routine
9. End of the program
Input : 4100 : 3A
Output : AL : 33 AH : 41
RESULT:
The given binary number is converted into ASCII value using 8086 microprocessor.
45
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
AIM: To write an assembly language program to perform addition of two 8-bit signed and unsigned numbers
RESOURCES REQUIERED:
Personal Computer
MASM/TASM Software Installed
--------------------------- --------------------------
X+Y 0110 1000 = 68H CF=0 X+Y 0000 0001 = 01H CF=1, AF=1
Result :
Thus the program for addition of two bytes has been executed successfully by using MASM &
result is verified
46
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
MASM
PROG 1B SUBTRACTION OF TWO 8-BIT NUMBERS
AIM: To write an assembly language program to perform subtraction of two 8-bit signed and unsigned
numbers
RESOURCES REQUIERED:
Personal Computer
MASM/TASM Software Installed
Result :
Thus the program for addition of two bytes has been executed successfully by using masm & result
is verified
47
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
RESOURCES REQUIERED:
Personal Computer
MASM/TASM Software Installed
Result :
Thus the program for addition of two words has been executed successfully by using MASM & result is
verified
48
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
AIM: To write an assembly language program to perform subtraction of two 16-bit signed and
unsigned numbers
RESOURCES REQUIERED:
Personal Computer
MASM/TASM Software Installed
X= 3322 11001100100010
Y= 2211 10001000010001
----------------------------
X+Y= 1111 1000100010001
Result
Thus the program for subtraction of two words has been executed successfully by using
MASM & result is verified.
49
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
MASM
PROG 3A MULTIPLICATION OF TWO 8 -BIT NUMBERS
AIM: To write an assembly language program to perform multiplication of two 8-bit unsigned
numbers
RESOURCES REQUIERED:
Personal Computer
MASM/TASM Software Installed
Result
Thus the program for multiplication of two 8-bit program executed successfully by using TASM &
result is verified.
50
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
MASM
PROG 3B MULTIPLICATION OF TWO 16 -BIT NUMBERS
AIM: To write an assembly language program to perform multiplication of two 16-bit unsigned
numbers
RESOURCES REQUIERED:
Personal Computer
MASM/TASM Software Installed
Result :
Thus the program for multiplication of two 16-bit program executed successfully by using TASM
& result is verified.
51
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
MASM
PROG 4A DIVISION OF 16-BIT Number by an 8 -BIT NUMBER
AIM: To write an assembly language program to perform division of 16-bit unsigned number by
8-bit unsigned number
RESOURCES REQUIERED:
Personal Computer
MASM/TASM Software Installed
FLAGS AFFECTED: IF
CALCULATIONS:
Result:
Thus the 16 bit by 8 bit division of program executed successfully by using MASM & result is
verified.
52
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
MASM
PROG 4B DIVISION OF 32-BIT Number by a 16-BIT NUMBER
AIM: To write an assembly language program to perform division of 32-bit unsigned number by
16-bit unsigned number.
RESOURCES REQUIERED:
Personal Computer
MASM/TASM Software Installed
FLAGS AFFECTED: IF
CALCULATIONS:
Result :
Thus the 32 bit by 16 bit division of program executed successfully by using MASM & result is
verified.
53
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
MASM
PROG 5A Signed Multiplication
AIM: To write an assembly language program to perform multiplication of two 16-bit signed
numbers
RESOURCES REQUIERED:
Personal Computer
MASM/TASM Software Installed
CALCULATIONS:
SYMBOL ADDRESS VALUES1 VALUES2
X 0000
Y 0002
RESLW 0004
RESHW 0006
Result: thus the multiplication of two 16-bit signed numbers performed using MASM & results
verified
54
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
MASM
PROG 5B Signed Division
AIM: To write an assembly language program to perform Division of 16-bit signed number by 8-
Bit Signed Number
RESOURCES REQUIERED:
Personal Computer
MASM/TASM Software Installed
FLAGS AFFECTED: IF
CALCULATIONS:
Result: Thus the division 16-bit by 8-bit signed numbers are performed using MASM & results
verified
55
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
MASM
PROG 6A ASCII ADDITION
AIM: To write an ALP to perform the addition of two ASCII bytes.
RESOURCES REQUIERED:
Personal Computer
MASM/TASM Software Installed
CALCULATIONS:
Result :
Thus the program for AAA has been executed successfully by using MASM & result is verified.
56
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
MASM
PROG 6B ASCII SUBTRACTION
AIM: To write an ALP to perform the subtraction of two ASCII bytes.
RESOURCES REQUIERED:
Personal Computer
MASM/TASM Software Installed
CALCULATIONS:
37 35 = 02
RES= 0002H
Result
Thus the program for AAS has been executed successfully by using MASM & result is
verified.
57
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
MASM
PROG 6C ASCII MULTIPLICATION
AIM: To write an ALP to perform the multiplication of two ASCII bytes.
RESOURCES REQUIERED:
Personal Computer
MASM/TASM Software Installed
CALCULATIONS:
09 * 05 =
RES = 0405 (AX) unpacked BCD of 45
Result:
Thus the program for AAM has been executed successfully by using MASM & result is verified
58
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
MASM
PROG 6D ASCII DIVISION
AIM: To write an ALP to perform the division of two ASCII numbers.
RESOURCES REQUIERED:
Personal Computer
MASM/TASM Software Installed
CALCULATIONS:
Result :
Thus the program for AAD has been executed successfully by using TASM & result is
verified.
59
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
MASM
PROG 7 PACKED BCD TO UNPACKED BCD
AIM: To write an assembly language program to perform PACKED BCD into UNPACKED BCD
conversion.
RESOURCES REQUIERED:
Personal Computer
MASM/TASM Software Installed
FLAGS AFFECTED: PF
CALCULATIONS:
SYMBOL ADDRESS VALUES1 VALUES2
BCD 0000 49
UBCD1 0002
UBCD2 0003
INPUT: BCD = 49
Result :
Thus packed BCD converted into unpacked BCD using MASM & results verified
60
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
MASM
PROG 8 BCD TO ASCII CONVERSION
FLAGS AFFECTED: PF
CALCULATIONS:
SYMBOL ADDRESS VALUES1 VALUES2
BCD 0000 49
ASCII1 0002
ASCII2 0003
INPUT: BCD = 49
Result :
Thus the given BCD number converted into ASCII using MASM & results verified.
61
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
MASM
PROG 9A DECIMAL ADJUSTMENT AFTER ADDITION
AIM: To write an assembly language program to perform DECIMAL adjust after addition of two
8-bit signed and unsigned numbers
RESOURCES REQUIERED:
Personal Computer
MASM/TASM Software Installed
Program:
Result :
Thus the program for DAA has been executed successfully by using MASM & result is
verified.
62
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
MASM
PROG 9B DECIMAL ADJUSTMENT AFTER SUBTRACTION
AIM: To write an assembly language program to perform DECIMAL adjust after subtraction of
two 8-bit signed and unsigned numbers
RESOURCES REQUIERED:
Personal Computer
MASM/TASM Software Installed
Program:
Result :
Thus the program for DAS has been executed successfully by using MASM & result is
verified.
63
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
MASM
PROG 10 A BLOCK MOVE
AIM: To write an assembly language program to move the block of data from a specified source
location to the specified destination location.
RESOURCES REQUIERED:
Personal Computer
MASM/TASM Software Installed
REGISTERS USED: AX, DS, ES, SI, DI
FLAGS AFFECTED: No flags are affected
RESULT:
INPUT: STR (DS:2000H) = 04H,F9H,BCH,98H,40H
Results:
Thus the block of data moved from a specified source location to the specified destination location
using MASM 7 results verified.
64
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
MASM
PROG 10 B STRING REVERSING: for any Known Character Length
AIM: To write an assembly language program to reverse the given string.
RESOURCES REQUIERED:
Personal Computer
MASM/TASM Software Installed
REGISTERS USED: AX, DS, SI, BX
Result :
Thus the given string is reversed using MASM & results verified.
65
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
MASM
PROG 10 C LENGTH OF THE STRING
AIM: To write an assembly language program to find the length of the given string.
RESOURCES REQUIERED:
Personal Computer
MASM/TASM Software Installed
REGISTERS USED: AX,DS,SI,CL
FLAGS AFFECTED: ZF,PF,SF,AF,CF
RESULT:
INPUT: STR (DS:0000H) =
01H, #03H,08H,09H,05H,07H,#02H
Result :
Thus the length of the given string is identified using MASM software & results are verfified.
66
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
MASM
PROG 10 D STRING COMPARISION
RESOURCES REQUIERED:
Personal Computer
MASM/TASM Software Installed
REGISTERS USED: AX, DS, SI, DI, CL
FLAGS AFFECTED: ZF,CF
RESULT:
INPUT: SRC (DS:0000H) =
04H,05H,07H,08H
DST (ES:0000H) =
04H,06H,07H,09H
OUTPUT:
I): IF SRC = DST THEN ZF = 1 &
II): IF SRC DST THEN ZF = 0
Result :
The given two strings are compared using MASM software and results are verified.
67
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
MASM
PROG 10 E STRING INSERTION
AIM: To write an Assembly Language Program for inserting one string into the other.
RESOURCES REQUIERED:
Personal Computer
MASM/TASM Software Installed
Result:
Thus sting insertion program executed sucessfully using MASM software and results are verfied.
68
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
MASM
PROG 10 F STRING DELETION
AIM: To write an Assembly Language Program for deleting a string in specified index range
RESOURCES REQUIERED:
Personal Computer
MASM/TASM Software Installed
Results :
thus the string deletion program executed successfully using MASM software and results
verified.
69
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
MASM
PROG 10 G DISPLAY THE STRING
RESOURCES REQUIERED:
Personal Computer
MASM/TASM Software Installed
REGISTERS USED: AX, DS, DX
Result:
Thus the program to display the given string executed successfully using MASM & results
verified.
70
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
8086
PROG 1 GENERATION OF POSITIVE RAMP SIGNAL Interfacing
AIM: To write an assembly language program to generate a Positive ramp signal using 8086
microprocessor.
71
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
8086
PROG 2 GENERATION OF NEGATIVE RAMP SIGNAL Interfacing
AIM: To write an assembly language program to generate a negative ramp signal using 8086
trainer kit.
72
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
8086
PROG 3 SQUARE WAVE GENERATION Interfacing
AIM: To write an assembly language program to generate a Square wave using 8086 trainer kit.
73
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
8086
PROG 4 GENERATION OF TRIANGULAR WAVE Interfacing
AIM: To write an assembly language program to generate a triangular wave using 8086 trainer kit.
74
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
8086
PROG 5 GENERATION OF SINE WAVE Interfacing
AIM: To write an assembly language program to generate a sine wave using 8086 trainer kit.
RESOURCES REQUIERED: 8086 Microprocessor trainer kit,
Dual DAC kit,
CRO.
FORMULA USED
128+128 SIN X Where X=0 T0 360 with Step 5
LOOK UP TABLE
4000 80 4013 FF
4001 8B 4014 FF
4002 96 4015 FE
4003 A1 4016 FB
4004 AB 4017 F8
4005 B6 4018 F4
4006 C0 4019 EF
4007 C9 401A E8
4008 D2 401B E2
4009 DA 401C DA
400A E2 401D D2
400B E8 401E C9
400C EF 401F C0
400D F4 4020 B6
400E F8 4021 AB
400F FB 4022 A1
4010 FE 4023 96
4011 FF 4024 8B
4012 FF 4025 80
4026 74 4038 00
4027 6A 4039 02
4028 5F 403A 04
4029 54 403B 08
402A 4A 403C 0C
402B 40 403D 11
402C 36 403E 17
402D 2E 403F 1E
402E 25 4040 25
402F 1E 4041 2E
4030 17 4042 36
4031 11 4043 40
4032 0C 4044 4A
4033 08 4045 54
4034 04 4046 5F
4035 02 4047 6A
4036 00 4048 74
4037 00 4049 80
75
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
76
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
8086
PROG 6 STEPPER MOTOR CONTROL Interfacing
AIM: To Interface Stepper Motor to 8086 using 8255 and write Assembly Language Program to
rotate Stepper Motor in Anticlockwise direction in full stepping.
RESULT: Stepper motor is interfaced with 8086 using 8255 and operation is verified.
77
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
8086
PROG 7 TRAFFIC LIGHT CONTROL Interfacing
DEC BX
JNZ D1
INT #03H
78
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
79
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
8051
PROG 1 READING AND WRITING ON A PARALLEL PORT OF 8051 Microcontrollers
AIM:
To write an assembly language program to perform the operations like reading and writing
the data on a parallel port of 8051 microcontroller.
RESULT: Thus the operations like reading and writing the data on a parallel port performed using
8051 microcontroller.
80
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
8051
PROG 2 8051 TIMERS
Microcontrollers
81
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
8051
PROG 3 BIT AND BYTE OPERATIONS BY USING 8051 Microcontrollers
AIM: To write an assembly language program to perform the BIT and BYTE operations like set,
reset and swap by using 8051 microcontroller.
82
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
8051
PROG 4 Understanding three memory areas of 00-FF
Microcontrollers
ORG 9000H
SETB 00H
SETB 01H
SETB 02H
JB 50H, DIS_B5
MOV R6,#00H
LJMP END2
DIS_BS : MOV R6.#B5H
END2 : LCALL 003
83
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
8051
PROG 5 2S COMPLIMENT
Microcontrollers
84
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
AIM: To perform subtraction of two 8-bit numbers stored at some location. Store the result in next
location and in next location store 00H or 01H for positive and negative numbers respectively
RESULT:
8-bit subtraction is done by 8051 kit
85
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
8051
PROG 7 8-BIT DIVISION
Microcontrollers
AIM: To perform the division operation of two 8-bit numbers using 8051 microcontroller
RESULT: Division of two 8-bit numbers is done by using 8051 microcontroller kit
86
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
8051
PROG 8 BINARY TO BCD CONVERSION Microcontrollers
AIM: To convert a Binary number into a BCD number using 8051 micro controller
87
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
RESULT:
Sum of first four natural numbers is done with 8051 kit.
88
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
AIM: To perform an operation of finding smallest number among given data by using 8051 micro
controller
RESULT: Among the given data smallest number found using 8051 kit
89
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
RESULT: Among the given data biggest number found using 8051 kit
90
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
AIM: To convert BCD number into ASCII by using 8051 micro controller
RESULT:
The given number is converted into ASCII using 8051 microcontroller kit.
91
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
8051
PROG 13 GENERATION OF 00 TO 0F NUMBERS Microcontrollers
AIM: To generate a series of numbers from 00h to 0Fh by using 8051 micro controller
92
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
DSP PROCESSORS
EXP :1 ARCHITECTURE OF C6713 DSP PROCESSOR
EQUIPMENTS:
PC with 6713 CC studio 3.0 software
DSP C6713 Kit.
USB connecting cable.
Power Cord.
Theory:
A signal can be defined as a function that conveys information, generally about the state
or behavior of a physical system. There are two basic types of signals viz Analog (continuous
time signals which are defined along a continuum of times) and Digital (discrete-time).
Remarkably, under reasonable constraints, a continuous time signal can be adequately
represented by samples, obtaining discrete time signals. Thus digital signal processing is an
ideal choice for anyone who needs the performance advantage of digital manipulation along
with todays analog reality.
Hence a processor which is designed to perform the special operations(digital
manipulations) on the digital signal within very less time can be called as a Digital signal
processor. The difference between a DSP processor, conventional microprocessor and a
microcontroller are listed below.
Microprocessor or General Purpose Processor such as Intel xx86 or Motorola 680xx family
Contains - only CPU
-No RAM
-No ROM
-No I/O ports
-No Timer
Microcontroller such as 8051 family
Contains - CPU
- RAM
- ROM
-I/O ports
- Timer &
- Interrupt circuitry
Some Micro Controllers also contain A/D, D/A and Flash Memory
93
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
94
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
Bus Structure
-bit buses (four program/data buses
and four address buses):
_ The program bus (PB) carries the instruction code and immediate operands from program
memory.
_ Three data buses (CB, DB, and EB) interconnect to various elements, such as the CPU, data
address generation logic, program address generation logic, on-chip peripherals, and data
memory.
_ The CB and DB carry the operands that are read from data memory.
_ The EB carries the data to be written to memory.
_ Four address buses (PAB, CAB, DAB, and EAB) carry the addresses needed for instruction
execution.
The C67xx DSP can generate up to two data-memory addresses per cycle using the two
auxiliary register arithmetic units (ARAU0 and ARAU1). The PB can carry data operands
stored in program space (for instance, a coefficient table) to the multiplier and adder for
95
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
96
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
Instructions are provided for storing the guard bits, for storing the high- and the low-order
accumulator words in data memory, and for transferring 32-bit accumulator words in or out of
data memory. Also, either of the accumulators can be used as temporary storage for the other.
Barrel Shifter
The C67x DSP barrel shifter has a 40-bit input connected to the accumulators or to data memory
(using CB or DB), and a 40-bit output connected to the ALU or to data memory (using EB). The
barrel shifter can produce a left shift of 0 to 31 bits and a right shift of 0 to 16 bits on the input
data. The shift requirements are defined in the shift count field of the instruction, the shift count
field (ASM) of status register ST1, or in temporary register T (when it is designated as a shift
count register).The barrel shifter and the exponent encoder normalize the values in an
accumulator in a single cycle. The LSBs of the output are filled with 0s, and the MSBs can be
either zero filled or sign extended, depending on the state of the sign-extension mode bit (SXM)
in ST1. Additional shift capabilities enable the processor to perform numerical scaling, bit
extraction, extended arithmetic, and overflow prevention operations.
Multiplier/Adder Unit
The multiplier/adder unit performs 17 _ 17-bit 2s-complement multiplication with a 40-bit
addition in a single instruction cycle. The multiplier/adder block consists of several elements: a
multiplier, an adder, signed/unsigned input control logic, fractional control logic, a zero
detector, a rounder (2s complement), overflow/saturation logic, and a 16-bit temporary storage
register (T). The multiplier has two inputs: one input is selected from T, a data-memory
operand, or accumulator A; the other is selected from program memory, data memory,
accumulator A, or an immediate value. The fast, on-chip multiplier allows the C54x DSP to
perform operations efficiently such as convolution, correlation, and filtering. In addition, the
multiplier and ALU together execute multiply/accumulate (MAC) computations and ALU
operations in parallel in a single instruction cycle. This function is used in determining the
Euclidian distance and in implementing symmetrical and LMS filters, which are required for
complex DSP algorithms.
97
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
98
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
EQUIPMENTS:
PC with 6713 CC studio 3.0 software
DSP C6713 Kit.
USB connecting cable.
Power Cord.
THEORY
Convolution is a formal mathematical operation, just as
multiplication, addition, and integration. Addition takes two numbers and
produces a third number, while convolution takes two signals and produces a
third signal. Convolution is used in the mathematics of many fields, such as
probability and statistics. In linear systems, convolution is used to
describe the relationship between three signals of interest: the input
signal, the impulse response, and the output signal.
In this equation, x1(k), x2 (n-k) and y(n) represent the input to and output
from the system at time n. Here we could see that one of the input is shifted
in time by a value everytime it is multiplied with the other input signal.
Linear Convolution is quite often used as a method of implementing filters of
various types.
PROCEDURE:
1. Open Code Composer Studio and make sure DSP kit is Switched ON
2. Start a new Project using new project from project menu icon
and save it.
3. Write a program for generating sinewave in c language and save
it with .c extension.
4. Add runtime support library file rts6700.lib to the library
icon of the project
5. Add linear command file Hello.cmd to the source icon of the
project.
6. Compile the program using icon in task bar and make corrections
if any errors occur.
7. Build in and Build on the project; using icons in the task bar.
8. Go to debug and double click on connect option.
9. Go to the file and click on load program and then open the file
we find extension .out project file.
10. Go to debug and run the program.
11. To view graphically, select view graph time/frequency.
99
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
ALGORITHM
Step 1 Declare three buffers namely Input buffer, Temporary Buffer, Output Buffer.
Step 2 Get the input from the CODEC, store it in Input buffer and transfer it to the first location
of the Temporary buffer.
Step 3 Make the Temporary buffer to point to the last location.
Step 4 Multiply the temporary buffer with the coefficients in the data memory and accumulate it
with the previous output.
Step 5 Store the output in the output buffer.
Step 6 Repeat the steps from 2 to 5.
Result:
enter value for m4
enter value for n4
Enter values for i/p
1234
Enter Values for n
1234
100
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
EQUIPMENTS:
PC with 6713 CC studio 3.0 software
DSP C6713 Kit.
USB connecting cable.
Power Cord.
THEORY
Circular convolution is another way of finding the convolution sum
of two input signals. It resembles the linear convolution, except that
the sample values of one of the input signals is folded and right
shifted before the convolution sum is found. Also note that circular
convolution could also be found by taking the DFT of the two input
signals and finding the product of the two frequency domain signals.
The Inverse DFT of the product would give the output of the signal in
the time domain which is the circular convolution output. The two input
signals could have been of varying sample lengths. But we take the DFT
of higher point, which ever signals levels to. For eg. If one of the
signal is of length 256 and the other spans 51 samples, then we could
only take 256 point DFT. So the output of IDFT would be containing 256
samples instead of 306 samples, which follows N1+N2 1 where N1 & N2
are the lengths 256 and 51 respectively of the two inputs. Thus the
output which should have been 306 samples long is fitted into 256
samples. The 256 points end up being a distorted version of the correct
signal. This process is called circular convolution.
PROCEDURE:
1. Open Code Composer Studio and make sure DSP kit is Switched ON
2. Start a new Project using new project from project menu icon
and save it.
3. Write a program for generating sinewave in c language and save
it with .c extension.
4. Add runtime support library file rts6700.lib to the library
icon of the project
5. Add linear command file Hello.cmd to the source icon of the
project.
6. Compile the program using icon in task bar and make corrections
if any errors occur.
7. Build in and Build on the project; using icons in the task bar.
8. Go to debug and double click on connect option.
9. Go to the file and click on load program and then open the file
we find extension .out project file.
10. Go to debug and run the program.
11. To view graphically, select view graph time/frequency.
101
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
OUTPUT:-
Enter the first sequence
5
6
7
Enter the second sequence
7
8
5
4
OUTPUT ;- the circular convolution is
102
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
EQUIPMENTS:
PC with 6713 CC studio 3.0 software
DSP C6713 Kit.
USB connecting cable.
Power Cord.
THEORY:
The Fast Fourier Transform is useful to map the time-domain sequence
into a continuous function of a frequency variable. The FFT of a
sequence {x(n)} of length N is given by a complex-valued sequence X(k).
M nk
j 2
X ( k ) x ( n) e n
;0 k N 1
k 0
The above equation is the mathematical representation of the DFT. As
the number of computations involved in transforming a N point time
domain signal into its corresponding frequency domain signal was found
to be N2 complex multiplications, an alternative algorithm involving
lesser number of computations is opted.
When the sequence x(n) is divided into 2 sequences and the DFT
performed separately, the resulting number of computations would be
N2/2
(i.e.)
N2 N2
21 21
x(k ) x(2n) WN2 nk x(2n 1) WN( 2 n1) k
n 0 n 0
Consider x(2n) be the even sample sequences and x(2n+1) be the odd
sample sequence derived form x(n).
N2
21
x ( 2n)
n 0
WN2 nk
would result
N2
21
(N/2)2multiplications x(2n 1)
n 0
WN( 2 n1) k
103
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
N2 N2 N2
= Computations
4 4 2
N2 N
21 21 k
x ( k ) x ( 2n) W 2 nk
N x(2n 1) W ( 2 nk )
N W (9)
N
n 0 n 0
N N
21 k 21
x ( 2 n) W 2 nk
N W x(2n 1) WN( 2 nk ) (10)
N
n 0 n 0
Dividing the sequence x (2n) into further 2 odd and even sequences would reduce the
computations.
WN is the twiddle factor
j 2
e n
j 2
nk
W nk
N e n
N N
K K
W
N
2
WN W
N
2
(11)
j 2 j 2 n
k n 2
e n
e
j 2
k
W k
N e n
104
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
N
K
W
N
2
WNk (1)
N
K
W
N
2
WNk (12)
N2 N
21 21
x(k ) x(2n) WN2 nk x(2n 1) WN( 2 nk ) (13)
n 0 n 0
N
K N
N 21
x(k ) x(2n) WN W x(2n 1) 21 WN( 2 nk ) (14)
2 nk
2 n 0 N
The time burden created by this large number of computations limits the usefulness of DFT
in many applications. Tremendous efforts devoted to develop more efficient ways of
computing DFT resulted in the above explained Fast Fourier Transform algorithm. This
mathematical shortcut reduces the number of calculations the DFT requires drastically. The
above mentioned radix-2 decimation in time FFT is employed for domain transformation.
Dividing the DFT into smaller DFTs is the basis of the FFT. A radix-2 FFT divides the DFT
into two smaller DFTs, each of which is divided into smaller DFTs and so on, resulting in a
combination of two-point DFTs. The Decimation -In-Time (DIT) FFT divides the input
(time) sequence into two groups, one of even samples and the other of odd samples. N/2
point DFT are performed on the these sub-sequences and their outputs are combined to form
the N point DFT.
FIG. 3A.1
The above shown mathematical representation forms the basis of N point FFT and is called the
Butterfly Structure.
105
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
STAGE - II
STAGE I
106
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
STAGE III
ALGORITHM
Step 1 sample the input (N) of any desired frequency. Convert it to fixed-point format
and scale the input to avoid overflow during manipulation.
Step 2 Declare four buffers namely real input, real exponent, imaginary exponent and
imaginary input.
Step 3 Declare three counters for stage, group and butterfly.
Step 4 Implement the Fast Fourier Transform for the input signal.
Step 5 Store the output (Real and Imaginary) in the output buffer.
Step 6 Decrement the counter of butterfly. Repeat from the Step 4 until the counter
reaches zero.
Step 7 If the butterfly counter is zero, modify the exponent value.
Step 8 Repeat from the Step 4 until the group counter reaches zero.
Step 9 If the group counter is zero, multiply the butterfly value by two and divide the
group value by two.
Step 10 Repeat from the Step 4 until the stage counter reaches zero.
Step 11 Transmit the FFT output through line out port.
107
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
PROCEDURE:
1. Open Code Composer Studio and make sure DSP kit is Switched ON
2. Start a new Project using new project from project menu icon
and save it.
3. Write a program for generating sinewave in c language and save
it with .c extension.
4. Add runtime support library file rts6700.lib to the library
icon of the project
5. Add linear command file Hello.cmd to the source icon of the
project.
6. Compile the program using icon in task bar and make corrections
if any errors occur.
7. Build in and Build on the project; using icons in the task bar.
8. Go to debug and double click on connect option.
9. Go to the file and click on load program and then open the file
we find extension .out project file.
10. Go to debug and run the program.
11. To view graphically, select view graph time/frequency.
OUTPUT:
108
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
EQUIPMENTS:
PC with Matlab Software
RESULT:
Matlab program for finding the frequency response of analog LPF using
ellip type is written.
Waveforms:
109
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
EQUIPMENTS:
PC with Matlab Software
RESULT:
Matlab program for finding the frequency response of analog LPF using
ellip type is written.
Waveforms:
110
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
EQUIPMENTS:
PC with Matlab Software
RESULT:
Waveforms:
111
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
EQUIPMENTS:
PC with Matlab Software
RESULT:
Matlab program for finding the frequency response of analog BPF using
cheby-1 type is written.
Waveforms:
112
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
EQUIPMENTS:
PC with Matlab Software
RESULT:
Matlab program for finding the frequency response of analog BSF
using cheby-2 type is written.
Waveforms:
113
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
EQUIPMENTS:
PC with Matlab Software
RESULT:
By using matlab programme, power density spectrum is found.
Waveforms:
Absolute value of FFT of Zdouble & Zsingle Vs Frequency:
114
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
115
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
AIM
To verify FIR filters.
EQUIPMENTS:
Operating System Windows XP
Constructor - Simulator
Software - CCStudio 3 & MATLAB 7.5
THEORY:
A Finite Impulse Response (FIR) filter is a discrete linear time-invariant system
whose output is based on the weighted summation of a finite number of past inputs.
The coefficients are generated by using FDS (Filter Design Software or Digital filter design package).
FIR filter is a finite impulse response filter. Order of the filter should be specified.
Infinite response is truncated to get finite impulse response. placing a window of
finite length does this. Types of windows available are Rectangular, Barlett,
Hamming, Hanning, Blackmann window etc. This FIR filter is an all zero filter.
116
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
RESULTS:
117
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
RESULTS:
118
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
AIM
To design and implement IIR (LPF/HPF)filters.
EQUIPMENTS:
Operating System Windows XP
Constructor - Simulator
Software - CCStudio 3 & MATLAB 7.5
THEORY:
The IIR filter can realize both the poles and zeroes of a system because it has a
rational transfer function, described by polynomials in z in both the numerator and
the denominator
These filter coefficients are generated using FDS
(Filter Design software or Digital Filter design package).
IIR filters can be expanded as infinite impulse response filters. In designing IIR
filters, cutoff frequencies of the filters should be mentioned. The order of the filter
can be estimated using butter worth polynomial. Thats why the filters are named as
butter worth filters. Filter coefficients can be found and the response can be plotted.
119
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
RESULTS:
120
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
RESULTS:
121
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
122
www.jntuworld.com