Google

Nov 30, 2008

Interfacing a real time clock using 58167 IC

Initializing data segment. Next address the port A009 TO SI Register. To specify hours, minutes, seconds initialize the AH register to Two. By INT A2 make spacesbetween horus, minutes and seconds. Next decrement SI for minutes. But secodns to be incremented. So loop to be contiued. Hence the program to be executed successfully.

CODE:

MOV AX,CS; LOAD ITS CONTENTS INTO AX
MOV DS,AX; LAOD ACCUMLATOR CONENTS INTO DS
INT AC; INTERRUPT SERVICE ROUTINE TO CLEAR THE SCREEN
A1 MOV SI, A009; LOAD A009 TO SI
MOV CX,0003
A2 MOV DX,SI
IN AL,DX
MOV DL,AL ; MOVE CONTENTS OF DL TO AL
MOV AL,02
INT AE
MOV DL,20
MOV AH,02
INT A2
DEC SI
DEC SI
LOOP A2 : IF CX IS NOT EQUAL TO ZERO THEN LOOP UP
INT AB
JMP A1 : JUMP TO DOWN LABEL

-----
To change the RTC
A009-horus
A007- minutes
A005- seconds

Nov 28, 2008

Assembly program for a real time clock

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

Nov 24, 2008

Assembly program to inerface a switch using 8255 IC

PA, PB, PC -- OO If switche closes
In this initially all the ports are initialized as inputs at 1100 and 1110 locations using DB command " switch open" and switch close are defined. INT AC command is used to clear the screen. In this case if the switch is off then it gives outputs else it gives outputs as all is. Here all the ports A, B,C are short circuited. So the output at port c is loaded into AL and then it is compared with FF, if the switch is ON the AL contains FF and BX is made to point to location 1100 and display " switch open" if switch location is off then AL contains 00 and BX is made to point location 1110 and display SWITCH CLOSE. Here INT AB is used for carriage return purpose i.e. to return the cursor to the start position.

Assembly program to inerface a switch using 8255 IC

MOV DX, 8807 : DX IS LOADED WITH CWR
MOV AL,9B
OUT DX,AL
MOV DX,8805
INT AC
AGAIN: INT AL,DX : INPUT THE DATA INTO AL
CMP AL,FF
JZ: DOWN(0109)
INT AF
INT AB
JMP: AGAIN(100B)
DOWN: MOV BX,1100 : MEMORY LOCATION (1100) WITH MESSAGE
JMP 1013: JUMP TO DISPLAY MESSAGE PRESENT IN BX

1100: DB " SWITCH OPEN" OD, 0A, 03
1110 : DB " SWITCH CLOSE" 0D,0A,03

You might also be interested in:

:: How to add two binary numbers without carry
::How to choose a MicroController

Nov 21, 2008

2 cool videos on microprocessors

Following are two really cool videos on processors one talks about the histroy of Intel CPU's and the other is about the Fastest microprocessor ever built. These are something really teche! for geeks!






:: common intreview questions on 8086
:: Assembly Language Source Codes
:: why there are two ground pins in 8086

Nov 17, 2008

How its made - Microprocessors

Here is an intruiguing video footage from youtube on how stuff like lenses, microprocessors are made. This video is from a documentray on Discovery channel.


This footage portrays an industrial demonstration of manufacturing such material.
For more such " How its made " do refer to this channel on Youtube.

You might be also interested in:


:: Program to display ASCII characters on the display unit
:: 8051 based project for electrical students
:: free and open source 8086 Microprocessor Emulator
:: Invoke function