Skip to main content
Q. A digital IC tester is designed using Intel 8085 to check Quad-NAND gates. Write a program to
test the IC and turn on the green LED if the IC is working properly else turn on the red LED. The
pin diagram of a NAND gate (7400) is shown below. The input pins (1A, 1B, 2A, 2B, 3A, 3B,
4A and 4B) of the gate are connected to output port 40H and the output pins (1Y, 2Y, 3Y and 4Y)
are connected to input port 30H. Also the green and red LEDs are connected to port 41H as
shown below.


soln
As per the 4 NAND gate input and output connections, the combination of inputs and their
desired output for the 4 gates would be as follows:



The outputs at port 41H are: 01H to turn on the green LED
02H to turn on the red LED
LXI H, D000H ; assign memory location for input data
MVI M, 00H ; store inputs 00H, 55H, AAH and FFH
INX H
MVI M, 55H
INX H
MVI M, AAH
INX
MVI M, FFH
INX H ; assign memory location for output data
MVI M, 0FH ; store outputs 0FH, 0FH, 0FH and 00H
INX H
MVI M, 0FH
INX H
MVI M, 0FH
INX H
MVI M, 00H
LXI B, D000H ; assign BC to store the address of inputs
LXI H, D004H ; assign HL to store the address of outputs
MVI D, 04H ; assign D to store the count for four data
LABEL: LDAX B ; get the input data from memory
OUT 40H ; send the input to the NAND gate
IN 30H ; get the output of NAND gate
ANI 0FH ; mask the higher nibble, (because higher nibble is not used)
CMP M ; check if the NAND gate gave desired output
JNZ END ; if no jump to end and turn on the red LED
INX H ; if yes check for next data, increase HL for next input data
INX B ; increase DE for new output data
DCR D ; decrement the count
JNZ LABEL ; if the count is not zero repeat
MVI A, 01H ; after all desired outputs are obtained for the input combinations
OUT 41H ; turn ON the green LED (the NAND gate is working properly)
HLT ; stop
END: MVI A, 02H ; if any of the input combination gives undesired output
OUT 41H ; turn on the red LED (NAND gate is not working properly)
HLT ; stop

Comments

Popular posts from this blog

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?

Testing servo motor with arduino

  Testing servo motor with arduino  Components Needed: Arduino board (e.g., Arduino Uno) Servo motor Jumper wires Steps for Connection: Servo Motor Pins: Ground (GND): Usually the brown or black wire of the servo motor. Power (VCC): Usually the red wire of the servo motor. Control Signal (PWM): Usually the yellow, orange, or white wire of the servo motor. Connecting to Arduino: Ground (GND): Connect the ground wire of the servo motor to one of the GND pins on the Arduino. Power (VCC): Connect the power wire of the servo motor to the 5V pin on the Arduino. Control Signal (PWM): Connect the control signal wire of the servo motor to digital pin 9 on the Arduino, as specified in the code by myservo.attach(9); Connection Arduino  Servo motor  VCC/ 5V Red wire  GND Black Wire  9  Yellow wire Explanation: Ground (GND): This connection ensures that the servo motor and the Arduino share a common ground, which is necessary for proper operation. Power (VCC): The servo motor needs a power supply t

CanSat

  CanSat is a type of small satellite that is designed to fit inside a soda can. These miniature satellites are used for a variety of purposes, including educational projects, scientific research, and commercial applications. The CanSat concept was first developed in 1998 by Bob Twiggs, a professor at Stanford University, and Jordi Puig-Suari, a professor at California Polytechnic State University. They wanted to create a low-cost, hands-on way for students to learn about satellite technology and space science. Since then, CanSats have become a popular platform for educational projects around the world. They are often used in STEM (Science, Technology, Engineering, and Mathematics) education programs, where students are tasked with designing, building, and launching their own CanSats. A typical CanSat consists of a soda can-sized container that houses a variety of sensors, such as temperature, humidity, pressure, and acceleration sensors. It also includes a small computer, a radio tran