• No results found

APPENDIX ‘A’: 8085 ASSEMBLY LANGUAGE PROGRAM LISTING

In document PROJETOS ELETRONICOS (Page 46-51)

Operating procedure

APPENDIX ‘A’: 8085 ASSEMBLY LANGUAGE PROGRAM LISTING

0077 3A5017 LDA 175OH The following CNTL

007A B7 ORAA key functions are only for

which is stored in stack

0081 FE92 CPI92H Checking CNTL+<—key

0083 C28900 JNZ 0089H

0086 2B DCXH Shifting the characters

0087 2B DCXH right by one place

0088 C9 RET

0089 FE90 CPI90H Checking CNTL+ßkey

008B C8 RZ Shifting the characters by

one place

008C FE80 CPI80H Checking CNTL+TABR key

008E C29600 JNZ 0096H

0091 110500 LXID.0005H Shifting the characters left by six places

0094 19 DAD D

0095 C9 RET

0096 FE82 CPI 82H Checking CNTL+TABL key

0098 C2A000 JNZ 00A0H

009B 11F9FF LXI D.,FFF9H Shifting the characters right by six places

00A5 FE96 CPI 96H Checking CNTL+DEL key

00A7 C2BA00 JNZ 00BAH

00AA E5 PUSH H

00AB 46 MOV B,M Delete one character in the left most position of the display

00AC 2B DCX H

00D1 FE7F CPI7FH Checking whether key data

is valid character

00D3 D2CF00 JNC 00CFH

00D6 07 RLC Updating mode and position

data

0011 211D00 LXI H.001DH

0014 225117 SHLD 1751H

0017 21246C LXIH.6C24H Fixing

default setup

001A 227017 SHLD 1770H

001D 11DC03 LXI D.03DCH

0020 CDE000 CALL DISPLAY Display ‘SELECt’

0023 FB El

0037 FE8A CPI8AH Checking CNTL+ RECEIVE

key

0039 CA0002 JZ RECEIVE

003C FE8C CPI8CH Checking CNTL+

TRANSMIT key

003E CA8001 JZ KEYBOARD

0041 FE84 CPI 84H Checking CNTL+PLAY key

0043 CAD001 JZ PLAY

0046 FE86 CPI 86H Checking CNTL+

CONTINUE key

0048 CAD501 JZ 01D5H

004B FE98 CPI98H

Checking CNTL+ CLEAR kev

004D C26000 JNZ 0060H

0050 210010 LXIH.1000H Clearing the RAM

0053 36C8 MVI M.C8H

0055 23 INXH

0056 7C MOV A, H

0057 FE17 CPI 17H

0059 DA5300 JC 0053H

005C 2A5117 LHLD 1751H Return to mode from

005F E9 PCHL where clearing action is

called

0060 FE8E CPI8EH Checking CNTL+ SETUP

key

0062 C27700 JNZ 0077H

0065 3E0E MVIA.0EH Activating RST5.5

0067 30 SIM

0068 11F403 LXI D.03F4H

006B CDE000 CALL DISPLAY Display the message ‘SEtUP’

006E FB El

006F 76 HLT

0070 3E0D MV1A.0DH Activating RST6.5

0072 30 SIM

0073 2A5117 LHLD 1751H

0076 E9 PCHL Return to mode from where

setup action is called

Addr. Opcode Label Mnemonics Comments

Addr. Opcode Label Mnemonics Comments Addr. Opcode Label Mnemonics Comments

00E7 C2E200 JNZ 00E2H

00EA CDCOO1 CALL DELAY2 Wait for some time

00ED CDC001 CALL DELAY2

00FC 327017 STA 1770H Storing clot value

00FF 47 MOV B,A

0110 31FF17 TRANSMIT: LXI SP.17FFH

0113 7C MOVA.H

0114 FE17 CPI17H Checking end of mem.

0116 D2B301 JNC 01B3H

0119 1603 MVID.03H

011B 5E MOVE.M

0121 0EO4 MV1C.04H Morse code generation

0123 13 INXD

0124 1A LDAX D

0125 F5 PUSHPSW

0126 217017 LXIH.1770H

0129 E603 ANI 03H

0142 C21001 JNZ0110H

0145 C3B301 JMP01B3H

0148 3ECD MVIA,CDH Setting SOD line

014A 30 SIM

014B 46 MOVB.M

014C CD7001 CALLDELAY1 Waiting

014F 05 DCRB

0150 C24C01 JNZ 014CH

0153 3E4D MVIA.4DH Resetting SOD line

0155 30 SIM

0156 217017 LXI H.1770H

0159 46 MOVB.M

015A CD7001 CALL DELAY1 Waiting

015D 05 DCRB

015E C25A01 JNZ015AH

0161 Fl POPPSW

0162 0F RRC

0163 0F RRC

0164 0D DCRC

0165 C22501 JNZ 0125H

0168 C32101 JMP 0121H

DELAY1 SUBROUTINE:

0181 325017 STA 1750H

0184 218001 LXIH.0180H

0187 225117 SHLD 1751H

018A 11E203 LXI D.03E2H Displaying message 018D CDE000 CALL DISPLAY ‘trAnSf for indicating the

TRANSMIT mode

0190 31FF17 LXI SP.17FFH

0193 210610 LXIH.1006H Entering keyboard data to the RAM

01A8 FE17 CPI17H Checking end of mem.

01AA DAB301 JC 01B3H

01AD 11E803 LXI D.03E8H

01B0 CDE000 CALL DISPLAY If mem. is over display

01C0 0E9F DELAY2: MVIC.9FH Wait approximately 400 msec

Addr. Opcode Label Mnemonics Comments Addr. Opcode Label Mnemonics Comments

01D8 FE17 CPI 17H Checking end of mem.

01DA D2EB01 JNC 01EBH

01DD 5E MOVE.M

01DE 1A LDAX D

01DF D320 OUT20H Displaying data in RAM

01E1 CDC001 CALLDELAY2 Wait for some time

01E4 FB El

01E5 7E MOVA.M

01E6 FECC CPICCH Checking end of mem.

symbol’]’

01E8 C2D501 JNZ 01D5H

01EB C3B301 JMP01B3H Go to keyboard module RECEIVE SUBROUTINE:

020E CDE000 CALL DISPLAY Display message ‘rECEIE’

0211 11FA03 LXI D.03FAH

0214 CDE000 CALL DISPLAY Clear the display

0217 FB El

0218 110510 LXI D.1005H Morse code aquisition

021B 13 INXD

021C D5 PUSH D

021D 218117 LXIH.1781H

0220 3600 MVI M.00H Reading the SID pin

0230 07 RLC

0231 DA2B02 JC 022BH

0234 24 INR H 0235 3A7117 LDA 1771H 0238 BC CMPH Checking for the space

between characters

Checking for dot and dash

024B D25702 JNC 0257H

Constructing morse code data Checking end of mem.

02A3 D2D102 JNC 02D1H

displayed character, in the RAM

‘SELECt’ will be displayed. By depressing the appropriate key, you can select any one of the following modes: (a) transmit, (b) receive, (c) setup, (d) play, (e) continue, and (f) clear.

2. Press CTRL+TRANSMIT keys for entering into the transmit mode.

A message ‘trAnSt’ appears for a sec-ond, after which you can enter your message.

3. At the end of the message you have to enter ‘]’ symbol (by pressing SHIFT+]

keys, i.e. 66H) for invoking the micro-processor.

4. By the use of arrow key ( or  or by TAB (TAB R or TAB L) keys, set the location in the message at which the transmission is to start. If you want to transmit the message from beginning depress CTRL+TRANSMIT keys again for getting into the first character.

5. Press CTRL+START keys for get-ting Morse code of the message.

6. You can go to any other mode by selecting the correspond mode before fin-ishing the transmission or later.

7. For entering into the receive mode, press the CTRL+RECEIVE keys.

You will see the ‘rECEIE’ message for one second.

8. Generate Morse code using a buzzer, voice, or some other source (such as ham radio and recorded tape).

9. The acceptance of sound will be indicated by LED1 for duration of

‘Dit’/’Dash’. If LED does not light, adjust the gain of the amplifier using potmeter VR2.10. The converted data can be replayed by pressing the CTRL+PLAY keys.

Note. 1. The clear and setup control keys can be used, at any time, if needed.

Construction

PCB designed particularly for this circuit (as given in Fig. 2, with compo-nent layout shown in Fig. 3) is needed for making this circuit. IC bases are preferred for fixing the ICs. For con-tinuous operation, provide a heat sink for the regulator IC. Since this is based on time comparison, it is neces-sary to use the correct frequency crystal (6.144 MHz).

Fig. 3: Component layout for the PCB Readers’ comments:

Q1. In the software part of this project some steps are missing, due to which the processor is not functioning properly.

Going through the software, we found an error at the address 003CH, after which the processor doesn’t jump to the transmit mode and hangs up. Please correct the

anomalies in the software.

Sidharth M. Modi Mumbai Q2. The project ‘Morse Processor’

pub-lished in March issue correctly outputs in the initial stages but displays the message

‘transt’ on going to the transmit mode.

After this when I press any key, it doesn’t take the input and doesn’t display the same in the 7-segment display. As a corol-lary, it’s also not giving the corresponding Morse code.

Sunil Kumar B.

Through e-mail Q3. How can I interface CRT display with 8085 microprocessor? Also provide me the complete circuit along with the IC numbers.

Anwar Ali, Hyderabad

The author, Junomon Abraham, re-plies:

A1. The firmware is correct and the same was duly tested at EFY. “You need not doubt the code at location 003CH, where it checks for the Ctrl+Transmit key. From here, it goes to the keyboard routine and feeds the message to the RAM. The actual conversion process starts when we press Ctrl+Start key, during which the processor goes to the transmit routine.

A2. Make sure that you have loaded the look-up table (Table IV) in the EPROM and that the entered program

is absolutely correct. If the same condi-tions still persist, the problem is with your hardware.

A3. It is possible to add a CRT control-ler to 8085 by changing the firmware. You can use the easily available 6845 CRT controller. The article based on this IC was published in the book Learn to Use Microprocessors by K. Padmanabhan pub-lished by EFY. The project ‘Video Display Add-On Board for the 8085 Kit’ based on 9364 chip was published as a technical article on page 21 in EFY’s Aug. ’83 issue.

The same is also reproduced in Chapter XI of the above titled book.

In document PROJETOS ELETRONICOS (Page 46-51)