Specifications
CIRCUIT IDEAS
few seconds. The program (software) and
data used for the purpose are given be-
low in mnemonic and machine code forms.
The program is self-explanatory.
The program and data have been en-
tered at specific memory locations. How-
ever, the readers are at liberty to use any
other memory area in their kits, depend-
ing on their convenience. Two monitor
programs (stored in kit’s
ROM
/
EPROM
) at
locations
0347
H
(for clearing the display)
and
05
DOH
(for displaying contents of
memory locations
2050
H
through 2055 in
the address and data fields respectively)
have been used in the program. Please
note that before calling the display rou-
tine, registers
A
and
B
are required to be
initialised with either 00 or 01 to indicate
to the monitor program as to where the
contents of above-mentioned memory lo-
cations are to be displayed (e.g. address
field or data field), and whether a dot
is to be displayed at the end of address
field or not. (Readers should refer to their
kit’s documentation before using the dis-
play routine.) In Vinytics’ kit, if register
A
contents are 00, the address field is
used for display, and if it is 01, the
data field is used for display. Similarly,
if register
B
contains 00 then no dot
is displayed at the end of address field,
else if
B
contents are 01, a dot is
displayed.
When the program is executed on the
microprocessor kit, a bell sound would be
heard for a few seconds. The address and
data fields would initially display :
01 00 00
01 indicates start of first period with 00
as elapsed minutes and 00 seconds in the
data field. The data field (seconds) are
continuously incremented.
Address Op-code Label Mnemonic Comments
20 FC 3E 80 MVI A, 80H Initialise 8255-I as output port
20 FE DE 03 OUT 03 H
2100 31 FF 27 LXI SP, 27FFH Initialise the stack pointer
2103 CD 47 03 CALL 0347H Clears the display
2106 C3 69 21 JMP TT Jump to ring the bell
2109 AF AA XRA A Put A=0
210 A 47 MOV B, A Put B=0
210 B 21 50 20 LXI H, 2050 H Starting address of display
210 E CD D0 05 CALL 05D0H Call output routine to display period
no. & minutes to address field
21 11 3E 01 MVI A, 01H A=01
21 13 06 00 MVI B, 00H B=00
21 15 21 54 20 LXI H, 2054H Current sec.
21 18 CD D0 05 CALL 05D0H Address of LSD of current sec.
21 1B 21 55 20 LXI H, 2055H
21 1E 7E MOV A, M Move the LSD of current sec. to acc.
21 1F C6 01 ADI 01 H Add 01 to acc.
21 21 FE 0A CPI 0AH Compare LSD of sec. with 0AH (10
decimal)
21 23 CA 36 21 JZ RR If LSD completes 09 jump to RR
21 26 77 MOV M, A Move the acc. content to 20 55 H
location
21 27 06 02 DD MVI B, 02H Delay
21 29 11 00 FA YY LXI D, FA00H Sub-
21 2C CD 00 25 CALL 2500H Routine
21 2F 05 DCR B For
21 30 C2 29 21 JNZ YY 1 second
21 33 C3 09 21 JMP AA After delay of 1 sec.
Jump to AA for display the time
21 36 3E 00 RR MVI A, 00H A=0
21 38 77 MOV M, A Store Acc. To memory location
21 39 2B DCX H Decrement HL pair content
21 3A 7E MOV A, M Move the MSD of sec to acc.
21 3B C6 01 ADI 01H Add 01 to Acc.
21 3D FE 06 CPI 06H Compare MSD of sec with 06H
21 3F CA 46 21 JZ UU If sec. complete 59 move to UU
21 42 77 MOV M, A Store acc. content to memory
location
21 43 C3 27 21 JMP DD Jump for delay of 1 sec.
21 46 3E 00 UU MVI A, 00 Put A=00 after completing 59
seconds
21 48 77 MOV M,A
21 49 2B DCX H
21 4A 7E MOV A,M Move current LSD of minutes to acc.
21 4B C6 01 ADI 01H Add 01 to acc.
21 4D FE 0A CPI 0A Compares acc. to 0A H
21 4F CA 56 21 JZ VV Jump to VV if LSD of minutes
completes 09
21 52 77 MOV M,A Move acc. to memory location
21 53 C3 27 21 JMP DD Jump for delay of 1 sec.
21 56 3E 00 VV MVI A,00H
21 58 77 MOV M,A
21 59 2B DCX H Decrement H-L pair content
21 5A 7E MOV A,M Move MSD of minutes to acc.
21 5B C6 01 ADI 01H Add 01 to acc.
21 5D FE 04 CPI 04H Compare acc. content with 04 H
21 5F CA 66 21 JZ SS If minutes 40 then jump to SS
21 62 77 MOV M,A
21 63 C3 27 21 JMP DD Jump for delay of 1 sec
Address Op-code Label Mnemonic Comments
21 66 3E 04 SS MVI A, 04 Put A=4
21 68 77 MOV M, A
21 69 AF TT XRA A A=0
21 6A 47 MOV B,A B=0
21 6B 21 50 20 LXI H, 2050H
21 6E CD D0 05 CALL 05D0H Display the period no. and minutes
in address field
21 71 3E 01 MVI A, 01H A=1
21 73 06 00 MVI B, 00H B=0
21 75 21 54 20 LXI H, 2054 H
21 78 CD D0 05 CALL 05D0 H Display the seconds in data field
21 7B 3E 01 MVI A, 01H
21 7D D3 00 OUT 00H Exite the 8255:1 for engergising the
relay (rings the bell)
21 7F 21 55 20 LXI H, 2055H
21 82 3E 00 MVI A, 00H Stores 00 to memory location
21 84 77 MOV M, A 2055 to
21 85 2B DCX H 2052 H
21 86 77 MOVM, A
21 87 2B DCX H
21 88 77 MOV M, A
21 89 2B DCX H
21 8A 77 MOV M,A
21 8B 2B DCXH
21 8C 7E MOV A, M Brings the LSD current period
no. to acc
21 8D C6 01 ADI 01 Add 1 to it compare with OA
21 8F FE 0A CPI 0A
21 91 CA 98 21 JZ XX If LSD of period no. complete 09 then
jump to XX
21 94 77 MOVM, A Else store it to memory location
21 95 C3 A0 21 JMP XY Jump to XY
21 98 3E 00 XX MVI A, 00H A=0
21 9A 77 MOV M,A Store it to main location
21 9B 2B DCX H
21 9C 7E MOV A, M Store MSD of period no. to acc
21 9D C6 01 ADI 01H Add 1 to it
21 9F 77 XXX MOV M,A Store it memory location
21 A0 06 02 XY MVI B, 02
21 A2 11 00 FA XYZ LXI D, FA 00H Program 1 sec display
21 A5 CD 00 25 CALL 2500 H
21 A8 05 DCR B
21 A9 C2 A2 21 JNZ XYZ
21 AC AF XRA A=0
21 AD 47 MOV B,A B=0
21 AE 21 50 20 LXI H, 2050H
21 B1 CD D0 05 CALL 05D0H
21 B4 3E 01 MVI A, 0IH
21 B6 06 00 MVI B, 00H Program to display
21 B8 21 54 20 LXI H, 2054 H The period no.
21 BB CD D0 05 CALL 05 D0 H Minutes and second
21 BE 21 55 20 LXI H, 2055H
21 C1 7E MOV A, M LSD of stored current second to acc
21 C2 C6 01 ADI 01H Add 1 to it
21 C4 FE 06 CPI 06H Compare with 06
21 C6 C2 9F 21 JNZ XXX If not 06 jump to XXX
21 C9 3E 00 MVIA, 00H A=0
21 CB D3 00 OUT 00H Output to 8255 to de-energise
the relay
22