Skip to main content
Q. A seven segment display is connected to output port 30H for an Intel 8085 based system.
Write a program to convert the content of memory location C000H to seven segment
display. Assume that the memory location contains any number from 0 to 9. If the
number is greater than 9 all the LEDs of the display should be off. ( Hint: store the bit
pattern for numbers from 0 to 9 in memory locations D000H-D009H(say) and then the
program should find the pattern according to the number in C000H and display that to
output port 30H)



soln
The table below shows the seven segment display requirement for numbers 0 to 9


LXI H, D000H ; store the bit pattern of the numbers from 0 to 9
MVI M, 3FH
INX H
MVI M, 06H
INX H
MVI M, 5BH
INX H
MVI M, 4FH
INX H
MVI M, 66H
INX H
MVI M, 6DH
INX H
MVI M, 7DH
INX H
MVI M, 07H
INX H
MVI M, 7FH
INX H
MVI M, 6FH
MVI H, D0H
LDA C000H
CPI 0AH ; check for number > 9
JC LABEL1
MOV L, A
MOV A, M
JMP LABEL2
LABEL1: MVI A, 00H
LABEL2: OUT 30H
HLT

Comments

Popular posts from this blog

IOT based Weather monitoring system

  IOT based Weather monitoring system  Introduction In today's world, the importance of accurate and real-time weather monitoring cannot be overstated. Weather conditions significantly impact various aspects of life, from agriculture and transportation to disaster management and daily activities. With the advancement of technology, it is now possible to develop sophisticated yet affordable weather monitoring systems that can provide real-time data and alerts. One such innovative approach involves using the NodeMCU microcontroller and the DHT11 sensor. This project aims to design and implement a weather monitoring system that leverages these technologies to measure and report environmental parameters such as temperature and humidity. Objectives The primary objectives of this project are as follows: Design and Implementation: To design and implement a reliable weather monitoring system using the NodeMCU microcontroller and the DHT11 sensor. Real-time Data Acquisition: To acquire...

2017//2(b)//Engineering Eco//KU

A loan of $10,000 is to be repaid over a period of eight years. During the first four years, exactly half of the loan principal is to be repaid (along with accumulated compound interest) by a uniform series of payments of A1 dollar per year. The other half of the loan principal is to be repaid over four years, with accumulated interest, by a uniform series of payments of A2 dollar per year, If i=9% per year, what are A1 and A2?

2018//2(b)//Engineering Eco//KU

A large lithium-ion phosphate battery pack for an industrial application is expected to save $20,000 in annual energy expenses over its 6-year life. For a 3-year simple payback period, the permissible capital investment is $60,000. What is the internal rate of return on this $60,000 battery pack if it has a residual value of $10,000 at the end of 6 years? The MARR is 18% per year.