8086 Programs

May 29, 2018 | Author: Rakesh Kumar D | Category: Assembly Language, Analog To Digital Converter, Central Processing Unit, Instruction Set, Byte
Report this link


Description

Following is the Assembly language program for a real time clock Code: LCALL 061D AGAIN MOV DPTR, #2845 REPEAT DEC82 ; Decrement DPL MOVX A,@DPTR MOV R3,A MOV R5,#02 LCALL 059E MOV A,20 LCALL 2006 MOVA,82 CJNE A,#42; REPEAT (ED) MOVA,#OD ; OD = ASCII FOR ENTER LCALL 2006 LJMP; AGAIN ( 6003 ) To change the RTC 2844-hrs 2843-minutes 2842-seconds 0 comments Labels: 8086, Assembly Language, c program, real time clock OCT 21, 2008 Program to interface DAC using 8255 and generate square waveform Program to interface DAC using 8255 and generate square waveform The following is the assembly language using DAC to interface with 8255 and generate a square wave on CRO. Here in the code, we use two delay elements one for the rising part of the wave and the other delay element to reach zero i.e decrement. Certain value chosen is delayed or sustained for a time period to form the square wave. The two loops used in the program are iterated to repeat cycles of a square wave. Code: MOV DX,8807 : DX is loaded with control word register address of 8255 MOV AL,80 OUT DX,AL : Contents of AL are transferred to portA of 8255 MOV DX,8801 : DX is loaded with Port A address of 8255 Begin MOV AL,00 OUT DX,AL ; Contents of AL are transferred to portA of 8255 MOV CX,00FF Delay1 Loop Delay1 MOV AL,FF OUT DX,AL : Contents of AL are transferred to portA of 8255 MOV CX,00FF : CX is loaded with 00FFH Delay2 Loop Delay2 : Repeat until CX=0 JMP Begin ; Repeat the same The expected square wave can be observed as in the figure shown. Thus we programed in assembly language to interface DAC using 8255 to generate a square waveform. Related links Ebooks for micro processors and micro controllers 0 comments Labels: 8086, 8255, Assembly Language, generate square waveform, square wave Assembly language program to find square root of 8-bit number Following is the assembly language program to find square root of 8-bit number. In this program we initially load the index registers with specified values. We load the value of the number into SI Register. Then using a few logical steps as mentioned in the code i.e JMP insctructions we find the square root of a 8-bit number. Code: MOV SI,2000 MOV DI,4000 MOV CX,0001 MOV BX,0000 MOV AL,[SI] ; Load AL with the value given as at SI UP SUB AL,CL JL down ; jump to down label INC BL ADD CL,02 ; add 2 to contents of CL register JMP UP ; jump to up label DOWN MOV[DI],BL INT A5 Thus by implementing the above code we can find the square root of 8-bit number Related posts square root of hexa decimal number Ebooks You might be also interested in: :: Find Square Root of a hexadecimal number in assembly language :: common intreview questions on 8086 :: Assembly Language Source Codes 1 comments Labels: 8086, Assembly Language, square root The purpose of this is to observe and control the stepping action of the motor using assembly language code.1 : Rotate left by 1 JMP Again : Unconditional jump to label again Following is the practical illsutration of the output for the above given code. 2008 Program to interface stepper motor with 8086 and rotate with anti clock wise direction in full stepping The following program is to interface stepper motor with 8086 and rotate with anti clock wise direction in full stepping.33: Load value 33 into AL Again OUT DX. The code is also practically illustrated with two live demonstrations on how speed of the motor varies if one of the instruction codes is changed to a new value. Following is the video demonstration of how the speed varies if the value is changed in the above instruction Thus by changing the instruction the speed of the stepper motor can be varied according with interfacing it to an 8086 microprocessor for full stepping .0100: set counter to delay Loop Again ROL AL.AL: Contents of AL are loaded into control word register of 8255 MOV CX.8801: Load PortA address of 8255 into DX MOV AL. So. for instance lets say MOV CX.7000.0100 can be changed to a new value in order to vary the speed.80 : load control word 80 into AL OUT DX.8807 : Load DX with control word register address of 8255 MOV AL.OCT 15. Code: MOV DX.AL: Contents of AL are loaded into control word register of 8255 MOV DX. The instruction MOV CX. 2008 . Assembly Language.Related posts: Interfacing a stepper motor with an AVR Microprocessor Interfacing a stepper motor with pic micro controller Interfacing a stepper motor to 8086 using 8255 0 comments Labels: 8086. interface stepper motor SEP 28. CX . AX . Jump if not zero MOV [DI]. 2000 MOV DI. Halt the program You might be also interested in: :: Troubleshooting a simple 8086 microprocessor based microcomputer :: centigrade (celsius) to fahrenheit calculation for 8086 Assembly Language :: Data transfer instructions of 8086 microprocessor 0 comments Labels: 8086. UP .program to find factorial of given numbers following is the assembly language program to find factorial of given numbers MOV SI . 2008 .[SI] MOV AX. Assembly Language.2002 MOV CX. factorial SEP 26. Decrement CX UP: MUL CX DEC CX . Decrement CX JNZ. Move contents of CX to contents of AX register DEC CX . Load the values of AX into location given by DI INT A5. 2000 MOV DI. ADD AL with the value given by that at SI and store in AL LOOP AI ( 1011) .CL A1: INC SI . Divide AX With the value given by BL MOV [DI].[SI] .[SI] MOV DL. Load the value in AX into as location at DI INT A5 . sample input: 0000:2000 array size 0000:20001 array elements from 2001 location Output 0000:2050 Result You might be also interested in: ::Interfacing pic microcontroller with LCD :: Serial Port interfacing with atmega :: TCP/IP on PIC 18 series 0 comments . clear carry flag MOV SI . Increment SI contents ADD AL.AX . Repeat until CX=0 DIV BL.Program to find arithmetic mean of n numbers Program to find arithmetic mean of n numbers CLC .0000 MOV CL. HALT Thus with the above code the arithmetic mean of n numbers can found accordingly. 2050 MOV CX. Load CX register with the value given by 0000 MOV AX. 0000 . A OF A2 ADD SI 0004 AGAIN: MOV AL[SI] MOV [DI]AL . 2008 . AL IS MOVED INTO DI DEC SI INC DI LOOP AGAIN INT 3 . INTERRUPT END Using the above code if an Input for instance ' ad-cole': 0006 is given then the output will be shown as DS: 0011: 16 10A0: 0010 : 65. string SEP 23. AX IS INITIALIZED WITH DATA MOV DS AX . Assembly Language. CX IS INITIALIZED TO 5 LEA SI A1 . 61 05 e d c b a You might be also interested in: :: Find Square Root of a hexadecimal number in assembly language :: common intreview questions on 8086 :: Assembly Language Source Codes 0 comments Labels: 8086. AX IS MOVED INTO DS MOV CX 0005H . 63 . DI IS HAVING LEAD E. SI IS HAVING LEAD E. MOV AX @ DATA .A OF A1 LEA DI A2. 62 .assembly language program to reverse a given string Following is the assembly language program to reverse a given string. 64 . reverse. 1234h. demo again code ends This program establishes the stack at 0100h and puts some random numbers in registers AX . BX and CX are stored in similar manner with the attendant decrement of SP bt 2 for each push.1000h initialize SP to point to stack mov ax.5678h mov cx. . code segment main: mov sp.1234h mov bx.0210h pop [bx] pop[0212h] imp main . BX . The contents of the stack are then popped from the stack. CX.9abcdh push ax push cx pop ax pop ax pop bx pop cx mov bx. AX is pushed on the stack that stores it at SS:OFFFh(MSB) and SS:0FFEh{LSB}.stack program for push and pop following is the assembly language program for push and pop operations in a stack.0200h mov w[bxx]. in reverse order. address 0200 holds 1234 push [0200h] push[bx] mov bx. num2 .8086 program to find GCD of two 2 numbers Euclid (a Greek mathematicians and philosopher of about 300 BC) describes this algorithm in Propositions 1 and 2 of Book 7 of The Elements.4000h mov ds.ah mov ah.cl next: mov bl.num1 .00h jmp next down mov result.cl div cl cmp ah.cl mov cl.bl .loc.result is the mem.0000h mov al. .00h cmp al.where gcd is to be stored hlt You might be also interested in: :: options available for int 21h instruction . If we try it with an two numbers. although it was probably known to the Babylonian and Egyptian mathematicians of 3000-4000 BC also.00h je down mov al.cl ja next xchg al. the final non-zero remainder is the greatest number that is an exact divisor of both our original numbers (the greatest common divisor) Here is the program mov ax.num1 is first no. mov cl. mov ah.num2 is second no.ax mov si. Assembly Language.:: Answers of Microprocessor(8085) & Electronics FAQ :: The 8085 Microprocessor Architecture Microprocessors & Interfacing 0 comments Labels: 8086. 2008 . Program JUL 6. Assembly Language.decimal addition program for 8086 This program will add two decimal numbers LXI H.M INX H ADD M DAA STA 2300H HLT DAA will convert HEX to valid BCD number now the program can be easily understood You might be also interested in: :: 8051 or PIC microcontroller which is better :: Effective addresses :: Floating Point Initializations 0 comments Labels: 8086.2200H MOV A. 2008 . Program APR 3. POP copy word form top of stack to specified location PUSHA copy all registers to stack POPA copy words from stack to all registers. These are I/O port transfer instructions IN copy a byte or word from specific port to accumulator OUT copy a byte or word from accumulator to specific port Special address transfer Instructions LEA . XCHG Exchange bytes or exchange words XLAT translate a byte in AL using a table in memory.Data transfer instructions of 8086 microprocessor General purpose byte or word transfer instructions MOV copy byte or word from specified source to specified destination PUSH copy specified word to top of stack. load effective address of operand into specified register LDS load DS register and other specified register from memory LES load ES register and other specified register from memory Flag transfer instructions LAHF load AH with the low byte of flag register SAHF store AH register to low byte of flag register PUSHF copy flag register to top of stack POPF copy word to top of stack to flag register You might be also interested in: :: Assembly Language Programs to compute an expression :: Interfacing Analog-to-Digital converter to 8086 using 8255 :: Interfacing Digital-To-Analog converter to 8086 using 8255 0 comments Labels: 8086. Assembly Language MAR 29. 2008 . 5 idiv cl add al. this program prints out the result in binary code. al mov bl. start: . to this formula: f = c * 9 / 5 + 32 mov cl. result2 db ? . tf . to this formula: c = (f . convert celsius to fahrenheit according . result1 db ? . . t fahrenheit. name "celsi" org 100h jmp start tc db 10 . result in celsius. convert fahrenheit to celsius according . 32 mov result1.32) * 5 / 9 mov cl. to see result in hexadecimal or decimal form click vars. result in fahrenheit. result1 call print . 9 imul cl mov cl. tc mov al. t celsius. tf db 0 .centigrade (celsius) to fahrenheit calculation for 8086 Assembly Language . print bl . result2 call print . wait for any key press. mov ah. test first bit.sub cl. '1' zero: int 21h shl bl. 8 p1: mov ah. 'b' int 21h . procedure prints the binary value of bl print proc near pusha . 2 . 0 int 16h ret . 10000000b .. print bl . print result in binary: mov cx. '0' test bl. print function. return to the operating system. . 5 imul cl mov cl. jz zero mov dl. mov dl. 32 mov al. 9 idiv cl mov result2. 1 loop p1 . print binary suffix: mov dl. al mov bl.. centigrade. 2008 . 0Dh int 21h mov dl.. 0Ah int 21h popa ret . celsius. return to the main program. Assembly Language. print endp 0 comments Labels: 8086. temperature MAR 26. print carrige return and new line: mov dl. fahrenheit. Check the power supply determine the power supply voltages for the manual and check the supply voltages directly on the appropriate pins of some IC's to make sure the voltage is actually getting there. ome meter check to verify your suspicions. if there is no activity on these buses then the common problem is that the CPU is stuck on hold wait halt or reset condition or by afilure od some TTL devices. check to see that all ic are firmly seated in there sockets and that IC's have no bent pins. if the problem is a bad IC this can help point you towards the one that is bad. Make a careful visual and tactile inspection check for the components that have been extensively hot. Troubleshoot soldered in IC's . check for broken wires and loose connections or a thin film of dust etc.they to find wether the proble is with the system or the it is with how the person is use the machine. Systematically substitute socketed IC's the easiest case of substitution is that where you have two identical microprocessor one that works and one that doesn't and the IC's of both units are in the sockets for this case you can use the working system to test the IC's from the non working system. perform check on the RAM and ROM and port decoders.Troubleshooting a simple 8086 microprocessor based microcomputer This post will teach you how to troubleshoot a simple microcomputer system such as an SDK-86 board Identify the Symptoms make the list of symptoms that you find. check if CPU is putting out control signals such as RD WR and ALE. Do a signal Rool Call make a quick check of some key signals around the CPU of the microprocessor. check the bus line to see if there is any activity on the buses. check if clock signals is present with the oscilloscope. Equipment for troubleshooting Microcomputers Logical Analyzers a logical analyzer is very powerfully troubleshooting tool but to use it effectively you need some detailed knowledge ans d program listing for the system that you are trying to troubleshoot. Troubleshooting MAR 15. 2008 . This post is based on that the steps given in that book You might be also interested in: :: Assembly Language Programs to compute an expression :: Interfacing Analog-to-Digital converter to 8086 using 8255 :: Interfacing Digital-To-Analog converter to 8086 using 8255 1 comments Labels: 8086. for detailed steps for the trouble shooting you can refer the book microprocessor and interfacing by DOUGLAS V HALL . All POSIX (Linux/BSD/UNIX-like OSes) Linux this software is downloaded more than 4500 time from sourceforge. PIC.free and open source 8086 Microprocessor Emulator i8086emu this is a free and open source Intel 8086 based microprocessor cross-platform emulator. i8086emu comes with an ncurses and an GTK-2 gui here is the screen short of the emulator this can work major operating systems likeAll 32bit MS Windows (95/98/NT/2000/XP). buttons and leds. 8-segment-displays.net dowload it here download microprocessor emulator You might be also interested in: :: Find Square Root of a hexadecimal number in assembly language . It has support for dynamically loadable device plugins and some peripherals like a PIT. 2008 .:: common intreview questions on 8086 :: Assembly Language Source Codes 1 comments Labels: 8086. microprocessor. emulator. software MAR 8. model small . end of the program You might be also interested in: :: Interfacing Stepper Motor to 8086 using 8255 :: MASM 611 SOFTWARE :: bit reversal and sorting programs 0 comments Labels: 8086. program starting main proc mov dl. 2008 . Program MAR 2.data . 02h int 21h inc dl jnz lop mov ax. 00h lop: mov ah.code .4c00h int 21h main endp end main .Program to display ASCII characters on the display unit this is the program to display ascii characters on the screen it is written in assembly language and can work of 8086 microprocessors . microprocessor.stack . Assembly Language. . the sinking capacities of normal ttl devices are far less compared to the current sourced by a 8086 up. second one : several pins of 8086 are multiplexed (means they have different functions in different situations). say the output of a logic circuit is low. ground pin FEB 27. if both pin r grounded it means single procesor mode.. You might be also interested in: 0 comments Labels: 8086.. third one : there are two pins to support max mode and min mode. last one : consider a circuit where ur 8086 has to be activated only when certain condition is met.why there are two ground pins in 8086 here are the different answers first one : 1 for analog n other for digital ground as i ve heard. the output pin of this device is connected to the gnd pin of 8086. when ever the out put pin is low there is a voltage diff between vcc and gnd pins of 8086 and 8086 is activated. the functions of those pins are controlled by these ground pins. 2008 . so the logic device output pin acts a current sink.. the two functions of processor is grouped in two groups namely 'min mode operation' and 'max mode operation'.e. hence 2 gnd pins to split current from 8086 and ensure the current at gnd pin of 8086 does not exceed the sinking capacities of the peripherals. in ithis mode u can connect two or more multiprocessors to work in cooperation..the diff b/w analog n digital ground is digital ground doesnt have transient currents sumthin like that i heard dont knw in detail.one of the mode is multiprocessor mode i... keybrd.easy! This example shows how to add huge unpacked BCD numbers Calculate the sum of elements in V1 array. calculates the sum of these numbers. and prints it out. Supported input from 0 to 8 inclusive! Call a procedure from another segment or interrupt.com/dr/asm2html/assembler_source_code/ it contains list of programs like                   Input 8 bit binary number and print out its decimal equivalent. Learn how to set and get file attributes.Custom_Interrupt. This is an example of AAS instruction. This sample gets two numbers from the user.Assembly Language Source Codes Here is the list of programs in assembly language with complete source code is provided Assembler Source Code for emu8086 microprocessor emulator and compatible assemblers (16 bit) simply copy these codes and past them on your editor http://www. Make your own interrupts .asm . it is used to subtract huge BCD numbers. Keyboard example . Your own Operating System that runs from floppy drive . This is a very basic example of a tiny OS. in other words how to make file Read Only or Hidden. See how to operate with Octal. Binary and Decimal values. This sample shows how to use CMPSW instruction to compare strings. This program calculates linear equation: ax + b = 0 The result is printed with floating point. and calculates factorial for it. This example converts 2 digit Hex value into numeric value and decimal string representation (so that it can be easily printed if required).asm Encryption in Assembly Language This sample gets the number from the user. How CMP instruction sets the flags. This example prints out The easiest and the fastest way to print "Hello World!" using DOS INT 21h (still works under Windows XP in Dos prompt).emu8086. store result in V2. Assembly Language FEB 19. You might be also interested in: :: Temperature Control system using 8086 :: Traffic light control system using 8086 :: Assembly Language Program to serve NMI 0 comments Labels: 8086.   A very handy code that can be assembled into a very tiny utility to make floppy boot records and tiny operating systems. 2008 . This sample shows the use of input and output string functions of emu8086.inc This sample shows how to use SCASW instruction to find a WORD (2 bytes). The control is then transferred to Interrupt Service Routine for serving the interrupting device. The CPU first completes the execution of current instruction. NON MASKABLE INTERRUPT (NMI) NMI is an edge triggered input pin which causes Type-2 interrupt.Assembly Language Program to be executed when NMI is generated Assembly Language Program to be executed when NMI is generated AIM:To write Assembly Language Program to be executed when NMI is generated APPARATUS:Microprocessor trainer kit & power supply. A transition from low to high initiates the interrupt response at the end of the current instruction. The contents of PSW. At the end of ISR the last instruction should be IRET.0FFFFH 0000:4006 ADD AX. When an external device interrupts the CPU at the interrupt pin NMI and the CPU is executing an instruction of a program. After an interrupt is acknowledged. The CPU then acknowledges the requesting device on its INTA pin immediately for NMI. the CPU computes the vector address from the type of the interrupt that may be passed to interrupt structure of the CPU internally or externally (for NMI vector address is 00008 H).BX 0000:4008 HLT 0000:4009 WRITE THIS PROGRAM AT 0000:4100 H MEMORY LOCATION AND EXECUTE IT . This input is internally synchronized. CS & IP are next pushed on stack. The NMI is not mask able internally by software. The contents of IP & CS now points to the address of the next instruction in main program from which the execution is to be continued after executing the ISR. When CPU executes IRET instruction the IP. WRITE THIS PROGRAM AT 0000:4000 H MEMORY LOCATION AND EXECUTE IT 0000:4000 MOV AX. The execution of ISR starts. The new address is found out from the interrupt vector table (for NMI [00009:00008] = ISR IP & [0000B:0000A] = ISR CS.0FFFFH 0000:4003 MOV BX. CS & PSW is popped back from the stack and the execution continued from address received by IP & CS. The IP is then incremented by one to point next instruction. AL 0000:4119 HLT 0000:411A NOW PRESS NMI BUTTON ON 8086 MICROPROCESSOR KIT You might be also interested in: :: MASM 611 SOFTWARE :: bit reversal and sorting programs :: Find Square Root of a hexadecimal number in assembly language :: common intreview questions on 8086 1 comments Labels: 8086. Program FEB 9.0000H 0000:4103 MOV DS.AL 0000:410A MOV AL.AX 0000:4105 MOV AL. NMI.AL 0000:410F MOV AL. 8255. 2008 . Experiment.00H 0000:4111 MOV [000A].00H 0000:4107 MOV [0008].0000:4100 MOV AX.40H 0000:410C MOV [0009].AL 0000:4114 MOV AL. microprocessor.00H 0000:4116 MOV [000B]. A total of 16 LED’s (2 Red & 2 Green at each road) are provided for pedestrian crossing. L10. power supply. Combinations of red. and all other LED‘s are switched OFF. South(S). Each road is named North (N). strait and right turn for the vehicles on road S. Amber LED is switched ON before switching over to proceed state from . S. L24-L26 & L33-L35 (Red) when on alarms the pedestrians to wait. L7-L9. Wait and Go signals for vehicles. & E respectively. WORKING:8255 is interfaced with 8086 in I/O mapped I/O and all ports are output ports. L11. similarly L12-L13L14. A typical junction is represented on the PCB with comprehensive legend printing.Traffic light control system using 8086 AIM:To develop Traffic light Control system using 8086 APPARATUS:Microprocessor trainer kit. The enclosed program assumes no entry of vehicles from North to West. L3. L23-L22-L21 & L32-L31-L30 simulates same function for the roads E. LED’s L1. W respectively. W. data cable etc THEORY:Traffic light controller interface module is designed to simulate the function of four way traffic light controller. from road East to South. To minimize the hardware pedestrian’s indicator LED’s (both red and green are connected to same port lines (PC4 to PC7) with red inverted. L25-L27 & L34-L36 (Green) when on allows pedestrians to cross and L6-L8.L16-L18. amber and 3 green) are arranged in the form of a T-section to control the traffic of that road. & E respectively. L19 & L28 (Red) are for the stop signal for the vehicles on the road N. Red LED’s L10 & L28 are connected to port lines PC2 & PC3 while L1 & L19 are connected to lines PC0 & PC1 after inversion. All other LED’s (amber and green) are connected to port A & B. L4 & L5 (Green) are for left. At the left corner of each road. At the beginning of the program all red LED’s are switch ON. The basic operation of the interface is explained with the help of the enclosed program. N. S. Combination of red and green LED’s are provided for pedestrian crossing. L15-L17. East (E) and West (W). Traffic light controller kit. L20 & L29 (Amber) indicates wait state for vehicles on the road N. a group of five LED’s (red. W. amber and green LED’s are provided to indicate Halt. L2. 36 LED’s are arranged in the form of an intersection. DATA CWR EQU 0FFC6 H PORTA EQU 0FFC0 H PORTB EQU 0FFC2 H PORTC EQU 0FFC4 H .STACK 100 . a) From road north to East From road east to north From road south to west From road west to south From road west to north b) From road north to East From road south to west From road south to north From road south to east c) From road north to south From road south to north Pedestrian crossing at roads west & east d) From road east to west From road west to east Pedestrian crossing at roads north & south ASSEMBLY LANGUAGE PROGRAMS:MODEL SMALL . The sequence of traffic followed in the program is given below.Halt state. PORTB OUT DX.02H CALL DELAY MOV AL.PORTA OUT DX.EEH MOV DX.AX MOV AL.AL MOV AL.03H CALL DELAY TOP: MOV AL.PORTB OUT DX.CWR OUT DX.PORTA OUT DX.57H MOV DX.AL MOV CL.PORTA OUT DX.EEH MOV DX.80H MOV DX.AL MOV AL.AL MOV AL.PORTC OUT DX.AL MOV AL.7DH MOV DX.FFH MOV DX.FCH MOV DX.@DATA MOV DS.AL MOV CL.AL MOV AL..PORTC OUT DX.F3H MOV DX.CODE START: MOV AX.FFH MOV DX.PORTB .AL MOV AL. PORTA OUT DX.PORTC OUT DX.AL MOV AL.AL MOV CL.F1H MOV DX.AL MOV CL.PORTB OUT DX.PORTB OUT DX.PORTA OUT DX.FBH MOV DX.FDH MOV DX.AL MOV AL.15H CALL DELAY MOV AL.PORTB OUT DX.50H MOV DX.PORTA OUT DX.AL MOV AL.PORTC .15H CALL DELAY MOV AL.E7H MOV DX.AL MOV CL.AL MOV AL.AL MOV AL.02H CALL DELAY MOV AL.AL MOV AL.FBH MOV DX.F0H MOV DX.EDH MOV DX.F7H MOV DX.OUT DX.PORTA OUT DX. 03H CALL DELAY MOV AL.AL MOV AL.15H CALL DELAY .AL MOV CL.FEH MOV DX.AFH MOV DX.15H CALL DELAY MOV AL.PORTA OUT DX.AL MOV AL.PORTA OUT DX.AL MOV CL.PORTB OUT DX.BFH MOV DX.PORTA OUT DX.FFH MOV DX.PORTA OUT DX.EEH MOV DX.BFH MOV DX.02H CALL DELAY MOV AL.EEH MOV DX.PORTB OUT DX.OUT DX.AL MOV CL.AL MOV AL.AL MOV AL.FEH MOV DX.AL MOV CL.AL MOV AL.PORTC OUT DX.PORTB OUT DX. Connect power supply 5V & GND to both microprocessor trainer kit & Traffic light controller interfacing kit. 3. Traffic light control system JAN 28. Experiment. Execute the program by typing GO E000:0B80 ENTER. 2.JMP TOP DELAY: MOV BX. Observe the LED’s on traffic light controller PCB. Enter the program to control Traffic light.10H D1: MOV CX. Program. microprocessor. You might be also interested in: :: MASM 611 SOFTWARE :: bit reversal and sorting programs :: Find Square Root of a hexadecimal number in assembly language :: common intreview questions on 8086 10 comments Labels: 8086. Connect data bus between microprocessor trainer kit & Traffic light controller interfacing kit. 5. 2008 .0FFFFH D2: LOOP D2 DEC BX JNZ D1 INT 03H END START PROCEDURE:1. 4. PB0. This O/p is buffered through an OPAMP having a gain of 10. and velocity are few examples of physical quantities that we seal with every day. temperature. It generates a current O/P of 1µA/K above absolute zero temperature that is -2730C. This system uses semiconductor sensor AD590 to monitor the temperature of water bath. WORKING:8255 is interfaced with 8086 in I/O mapped I/O. pressure. A number of devices and schemes have been used over the years. PB1. data cable etc THEORY:Temperature control system involved interfacing successive approximation ADC and typical method of measuring and controlling the temperature using microprocessor. Typical sensors include devices like thermocouples. power supply. ADC is among the most widely used devices for data acquisition. To enable easy equivalence between the transducers O/P in volts and the measured temperature a calibration procedure needs to be done. Temperature measurement is of great importance in industry as most of the processes are temperature dependent. Thus at 00C the current O/P will be 273µA and 250 if will be 298µA and 373mV at 1000. . PB2 lines of port B for channel selection. PC2 connected to Start of conversion (SOC) and PC3 to O/P enable. Channel 1 of ADC is used to input analog signal. thermostats. for the measurement of temperature. humidity. Channel 0 of ADC for temperature controller. A digital computer uses binary values. but in physical world everything is analog.Temperature Control system using 8086 AIM:To develop Temperature Control system using 8086 APPARATUS:Microprocessor trainer kit. RTD’s and semiconductor sensor. port A (PA0-PA7) as input port is connect to data lines of ADC. Temperature controller kit. The AD590 is basically a PTAT (proportional to absolute temperature) current regulator. And the counts for indication of temperature are taken as 2.5 (256/100) per degree C.0aH. .0dH.STACK . .14H.DATA START: PORTA PORTB PORTC CTL CTL_BYTE CLEAR_DISPLAY DWAD DBDTA DEC_TEMP SET_TEMP ADC_VAL COUNT PRE_TEMP . So 5V/100 i.05H. AC supply to the external heating element is controlled through the onboard Relay. Input will vary from 0 to 5V (0 to 100 degree C) and the ADC O/P varies from 00-FFH.0fH.CODE ADC EQU EQU DB DB DB DB DB EQU EQU EQU EQU EQU FFC6H 98H FFC0H FFC2H FFC4H . 5000mvs/100 gives 50mvs/0C. MODEL .16H .11H.e. based on the set value. AD590 output is analog which is converted to digital by ADC) is less than the set value (reference value) heating element will be switched ON and when temperature crosses the set temperature AC supply is turned OFF. Control 8255 PORTA PORTB PORTC port control SMALL 100 address address address address reg.03H. F800:4BB1H F800:4BB1H F800:4F1F 0 0 0 0 0 TABLE: DB 00H.ADC will give binary equivalent of the I/P voltage. When the temperature of the heating element (which is sensed by AD590. EQU . .08H. aDH.74H.bfH.CTL AL.00 SI.3fH.cfH.70H.56H.c1H.c6H.e5H.ccH.ebH.3cH.CTL DX.42H.dcH.AX DWAD DX.afH. PORTC .5bH.f9H.64H.a8H.d5H.4aH.CTL_BYTE .2cH.02 DX.AL CX.70 .f4H.6dH.67H DB 6aH.fcH.61H.a2H.AL AL.AL AL.1eH.27H.52H.00 DX.82H DB a0H.48H. .2aH.ffH START: MOV MOV OUT MOV CALL MOV MOV MOV MOV CALL MOV MOV OUT MOV OUT MOV L0: FAR DX.f1H.daH.DEC_TEMP DEC_HEX SET_TEMP.36H.eeH.e2H.d0H DB d2H.bcH.32H DB 34H.2eH.b6H DB b9H.e0H.24H.DB 19H.d7H.4cH DB 4eH.7aH.54H.50H.72H.b0H.77H.45H.39H.7dH.58H.AL AL.e7H DB e9H.21H.7fH.c4H.DEC_TEMP AH.dfH.1cH.a5H. (lower) PORTA as as 8255 output input AL.f6H.c9H.aaH.b3H. AX DBDTA AL.0 SI.AL DL.ADC_VAL ADC_TABLE AL.FFFFH .COUNT AL.SET_TEMP TURN_ON_RELAY DX.COUNT HEX_DEC AH.OFFSET L0 COUNT.LOOP BACK: MOV CALL CALL CALL JMP DISP_TEMP: MOV MOV AGAIN: CMP JC JE INC INC JMP FOUND: MOV CALL MOV MOV CALL RET TEMP_CONTL: MOV CMP JC RELAY_OFF: MOV MOV OUT MOV HERE1: MOV HERE: FAR SI.[SI] FOUND FOUND SI COUNT AGAIN AL.20H CX.0 ADC DISP_TEMP TEMP_CONTL BACK AL.PORTB AL.0FFH DX. AL DX.PORTC AL.80H L1 DX.0AH CL .CTL AL.FFFFH L22 DX.00 DX.00H CL.80H AL.AL CX.DX ADC_VAL.01 DX.AL CX.LOOP DEC JNZ RET TURN_ON_RELAY: MOV MOV OUT CONTINUE: MOV L22: LOOP RET ADC: MOV MOV OUT MOV L10: LOOP MOV OUT L1: MOV IN AND CMP JNZ MOV IN MOV RET HEX_DEC: MOV MOV DIV HERE DL HERE1 DX.DX AL.PORTB AL.AL AH.70 L10 AL.PORTA AL.00H DX. MOV ROL AND OR RET DEC_HEX: MOV AND AND MOV ROR MOV MUL ADD RET END START CL.F0H CL. when temperature of water bath exceeds reference value then power supply to water bath is switched OFF.AL BL.04 AL.AH BL. <!--[endif]-->Execute the program by typing GO 0000:4000 enter. <!--[if !supportLists]-->3. <!--[if !supportLists]-->4. <!--[endif]-->Connect power supply 5V & GND to both microprocessor trainer kit & temperature controller interfacing kit.CL CL. . <!--[if !supportLists]-->5. <!--[endif]-->Enter the program to read temperature of the water bath from ADC at 0000:4000.CL AL.F0H AL. <!--[if !supportLists]-->2. <!--[endif]-->Enter the reference temperature value.BL PROCEDURE:<!--[if !supportLists]-->1.0AH CL AL.0FH AL. <!--[endif]-->Connect data bus between microprocessor trainer kit & temperature controller interfacing kit.04H AL. You might be also interested in: :: Traffic light control system using 8086 :: Assembly Language Program to serve NMI :: Interfacing Stepper Motor to 8086 using 8255 .


Comments

Copyright © 2024 UPDOCS Inc.