New York, NY IMG HI 58° LO 56° Home About Contact
IMG-LOGO
Home Electrical and Electronics Microprocessor & Interfacing Write an assembly language program to interfacing temperature measurement card with 8086 and program to display the temperature on LCD.
Microprocessor & Interfacing Lab Experiments

Write an assembly language program to interfacing temperature measurement card with 8086 and program to display the temperature on LCD.



Aim

Write an assembly language program to interfacing temperature measurement card with 8086 and program to display the temperature on LCD.

Theory:A thermocouple is an electrical device consisting of two dissimilar electrical conductors forming electrical junctions at differing temperatures. A thermocouple produces a temperature-dependent voltage as a result of the thermoelectric effect, and this voltage can be interpreted to measure temperature.

ApparatusDyna 8086 microprocessor kit and thermocouple controller card.

Address Opcode Mnemonics Operand Comments
5313 B2 01 MOV DL,1 Move 1 to DL
5315 BB E0 4B MOV BX,4BE0H Move 4BE0H to BX
5318 E8 86 FF CALL DISP 1 Call subroutine display
531B B0 91 MOV AL,91H Move 91H to AL
531D E6 67 OUT CNTL_PORT,AL Out the content of AL to port CNTL_PORT
531F B0 80 MOV AL,80H
5321 E6 65 OUT PORT_C,AL Out the content of AL to port PORT_C
5323 B0 00 START : MOV AL,00H Clear the accumulator
5325 B1 05 MOV CL,05H Load the counter with value 05
5327 D2 C0 ROL AL,CL Rotate the accumulator value left by CL
5329 24 E0 AND AL,E0H Perform logical AND of AL with E0H
532B 0C 16 OR AL,16H Perform logical OR of AL with 16H
532D 8A E0 MOV AH,AL Move content of AL to AH
532F E6 63 OUT PORT-B,AL
5331 B9 FF FF MOV CX,FFFFH Mask the CX register
5334 E8 86 00 CALL DELAY Call the subroutine delay
5337 8A C4 MOV AL,AH Move Content of AH to AL
5339 0C 01 OR AL,01H Perform logical OR of AL with 01H
533B 8A F0 MOV AH,AL
533D E6 63 OUT PORT_B,AL Out the content of AL to PORT_B
533F B9 FF 0F MOV CX,0FFFH Move 0FFFH to CX
5342 E8 78 00 CALL DELAY Call delay subroutine
5345 8A C4 MOV AL,AH
5347 24 FE AND AL,FEH Perform logical AND of AL with FEH
5349 8A E0 MOV AH,AL
534B E6 63 OUT PORT_B,AL Out the content of AL to PORT_B
534D B9 FF 00 MOV CX,00FFH Move 00FFH to CX
5350 E8 6A 00 CALL DELAY Call delay subroutine
5353 E4 65 UP : IN AL,PORT_C Get the input from Port C
5355 24 01 AND AL,01H
5357 3C 01 CMP AL,01H Compare the content of AL with 01H
5359 75 F8 JNZ UP If the result is not zero , then jump to UP label
535B 8A C4 MOV AL,AH Move the content of AH into AL
535D 24 FD AND AL,FDH
535F 8A E0 MOV AH,AL
5361 E6 63 OUT PORT_B,AL Output the content of AL to PORT_B
5363 B9 FF 0F MOV CX,0FFFH Move 0FFFH to CX
5366 E8 54 00 CALL DELAY Call delay subroutine
5369 E4 61 IN AL, PORT-A
536B 8A C8 MOV CL,AL Perform logical AND of AL with FEH
536D E8 55 00 CALL CHK_SETPT
5370 B5 00 MOV CH,00H Out the content of AL to PORT_B
5372 BB 00 00 MOV BX,0000H Move 00FFH to CX
5375 87 CB XCHG CX,BX Call delay subroutine
5377 BA 00 00 MOV DX,0000H Get the input from Port C
537A 8A C7 UP 1 : MOV AL,BH
537C 0A C3 OR AL,BL Compare the content of AL with 01H
537E 74 17 JZ DOWN If Zero flag is set then start the execution from DOWN
5380 4B DEC BX Decrement the content of register pair BC
5381 32 C0 XOR AL,DL EXOR of AL and DL
5383 8A C2 MOV AL,DL Move DL into AL
5385 FE C0 INC AL Increase the AL by 1
5387 27 DAA Decimal adjust the value of A
5388 8A D0 MOV DL,AL
538A 73 EE JNC UP 1 Out the content of AL to PORT_B
538C 32 C0 XOR AL,AL Move 00FFH to CX
538E 8A C6 MOV AL,DH Call delay subroutine
5390 FE C0 INC AL Get the input from Port C
5392 27 DAA
5393 8A F0 MOV DH,AL Compare the content of AL with 01H
5395 73 E3 JNC UP 1 If Zero flag is set then start the execution from DOWN
5397 E8 1B 00 DOWN : CALL DIS Decrement the content of register pair BC
539A E8 2A FF CALL KEYCHK 1 EXOR of AL and DL
539D 3C FF CMP AL,FFH Move DL into AL
539F 74 04 JZ DOWN 1 Increase the AL by 1
53A1 3C 0F CMP AL,0FH Decimal adjust the value of A
53A3 77 0D JA DOWN 2 Move 0FFFH to CX
53A5 B9 FF FF DOWN 1 : MOV CX,FFFFH Call delay subroutine
53A8 90 UP 2: NOP
53A9 90 NOP Perform logical AND of AL with FEH
53AA 90 NOP
53AB 90 NOP Out the content of AL to PORT_B
53AC 90 NOP Move 00FFH to CX
53AD E2 F9 LOOP UP 2 Call delay subroutine
53AF E9 71 FF JMP START Get the input from Port C
53B2 E9 1C F9 DOWN 2: JMP MAIN_MENU

Result:Measured Temperature will be display on LCD












Subscribe

Get all latest content delivered to your email a few times a month.