ICDC 0301 Microprocessors and Embedded Systems
Assignment 1
1. Explain the need to demultiplex the bus AD7-AD0. How is it done?
2. In the peripheral-mapped I/O, can an input port and an output port have the same port address?
3. What are the control signals necessary in the memory-mapped I/O?
4. Calculate the address lines required for an 8K-byte memory chip.
5. Calculate the number of memory chips needed to design 8K-byte memory if the memory chip size
is 1024x1.
6. What is the function of the Program Counter and Stack Pointer registers?
7. Write an assembly language program to add a block of ten data bytes available in memory starting
at 2050H and display the sum at the output port 01H if the sum does not generate a carry. If a carry
is generated during addition, stop the addition and display FFH at the output port 01H.
8. Write an assembly language program to find the highest reading in a set of ten data bytes and store
it in memory location with an address 2070H.
9. A set of ten data bytes is stored in memory starting at 2080H. Write an assembly language program
to check each byte, and save the bytes that are higher than 5010 and lower than 10010 in memory
locations starting at 2090H.
10. Design an up-down counter to count from 0 to 9 and 9 to 0 continuously with a 1-second delay
between each count, and display the count at the output port 05H. Assume T=0.5µs.
11. Write an assembly language program to generate a rectangular wave with time period 600µs and
duty cycle 60%. Let system frequency be 1MHz.
12. A set of ten packed BCD numbers is stored in the memory locations starting at 2060H. Write an
assembly language program with a subroutine to add these numbers in BCD. If a carry is generated,
save it in register B, and adjust it for BCD. The final sum will be less than 9999BCD. Write a second
subroutine to unpack the BCD sum stored in registers A and B, and store them in memory starting
at 2080H.
13. A set of data is stored as unpacked BCD numbers in memory from 2050H to 205FH. Write a
program to look up the common-cathode-LED code for each reading and store the code from 2070H
onwards.
14. A set of ASCII Hex digits is stored in memory starting at 2055H. Write a program to convert these
in to its binary equivalent and store in memory starting at 2080H.