JUNOMON ABRAHAM
TABLE I 7-segment Display
TABLE III
DATA FORMAT IN SCAN KEY BOARD MODE (FOR ANALYSING RETURNED HEX CODE)
m o n - c a t h o d e character dis-plays are used.
Though 7-seg-ment displays are not suitable for alphanu-meric charac-ters, these have been used here with some com-promise for re-ducing the over-all cost. (Note.
The use of dot-matrix LCD dis-play avoids the difficulty in dis-playing charac-ters in 7-seg-ment format.
One can go for a microcont-roller design, if needed.) The 7-segment display pattern em-ployed for dif-ferent charac-ters is shown in Table I.
Two hard-ware inter-rupts, RST5.5 and RST6.5, are used for reading the key entries.
These are driven by the IRQ line from the keyboard/
display inter-face IC 8279.
A buffer (IC8) is con-nected at the display output of 8279 to drive the 7-segment displays. The encoded scan lines (SL2 -SL0) are de-coded by an oc-tal decoder 74LS138 (IC9), whose outputs drive the com-mon cathode of displays via
Fig. 1: Schematic circuit of Morse processor
PARTS LIST Semiconductors:
IC1 - 8085A microprocessor IC2 - 74LS373 octal D-type latches IC3 - 6116 RAM (2 kB)
IC4 - 27C32 EPROM (4 kB) IC5 - 8279 keyboard/display
decoder
IC6, IC9 - 74LS138 3-bit binary decoder IC7 - 74LS123 retriggerable
monostable multivibrator IC8 - 74LS244 octal bus driver IC10 - 7805 +5 volt regulator T1 - BC548 npn transistor T2 - BC549 npn transistor T3-T8 - BC558 pnp transistor D1 - 1N4148 switching diode
LED1 - LED
DIS1-DIS6 - LTS543 common-cathode display
Resistors (all ¼-watt, ±5% carbon, unless stated otherwise):
R1 - 68-kilo-ohm R2 - 3.3-kilo-ohm R3 - 2.2-kilo-ohm R4 - 5.6-kilo-ohm
R5 - 1-mega-ohm
R6 - 15-kilo-ohm R7, R8 - 1-kilo-ohm R9-R16 - 68-ohm R17-R22 - 220-ohm
R23 - 180-ohm
VR1 - 2.2-kilo-ohm preset VR2 - 100-ohm preset Capacitors:
C1 - 2.2µF, 16V electrolytic C2, C4, C6 - 0.1µF ceramic disc C3 - 10µF, 16V electrolytic C5 - 0.001µF ceramic disc C7 - 10pF ceramic disc Miscellaneous:
PZ1 - Piezo buzzer
MIC - Condenser microphone S1-S26 - Tactile switches for keyboard XTAL - 6.144 MHz crystal
Fig. 2: Actual-size, single-sided PCB for the Morse processor
transistor switches. The keys are wired in such a way that these can be repre-sented by the seven higher order bits of the keyboard data.
Morse signals in the form of sound are converted to microprocessor-compat-ible signals. The arrangement comprises condenser microphone, preamplifier, and retriggerable monostable multivibrator 74LS123 (IC7). The out-put of IC7 drives SID pin of 8085 and it is in ‘high’ logic state when a sound is detected by the microphone. The sensi-tivity of the amplifier can be adjusted by preset VR2.
The converted Morse code drives a piezo buzzer via a transistor connected at the SOD line of 8085 microprocessor.
Intensity of the sound can be controlled by potentiometer VR1.
The firmware is stored in 27C32 (4k EPROM— only 1 kB is needed for the
Fig. 3: Component layout for the PCB
program). RAM 6116 stores the key-board entries and also acts as a stack.
One can enter/store a maximum of ap-proximately 1,750 characters in the RAM. This is adequate for normal ap-plications. In case one needs to store lengthy text, one should use a larger-capacity RAM. Battery backup may be used for avoiding loss of data due to power failure. The low-level address/
data lines of 8085 are demultiplexed using an octal transparent latch IC 74LS373.
The address bits A12 and A13 are decoded by IC6 to generate chip select (CS) signals for various ICs. The ad-dress map of devices is indicated in Table II.
Firmware
The software driver routines for the cir-cuit, along with their Assembly language code, are listed in Appendix A. Basi-cally, the following functions are per-formed by the software program:
(a) Initialisation of the peripherals.
(b) Reading the depressed key data and its storage in RAM.
(c) Writing data into the display RAM in 8279.
(d) Generation of Morse code.
(e) Recognition of Morse code from its sound.
(f) Giving proper messages at ap-propriate time.
Since Morse code is a time-depen-dent code, the program contains many jump instructions. The program has been made interactive and user-friendly.
The firmware is divided into the follow-ing modules: (a) bootfollow-ing, (b) keyboard, (c) transmit, (d) receive, (e) play, and (f) lookup table.
The logic of the program can be gen-erally understood from the Assembly language listing given in Appendix A. A brief description of each module is, how-ever, given below:
(a) Booting. This section initialises stack pointer 8279 and the interrupts.
It also fixes default speed for Morse code. It is the first module executed when you switch on the power supply.
(b) Keyboard. When a key is pressed, IRQ pin of 8279 interrupts 8085. The ISR (interrupt service rou-tine) reads the keyboard data and, if needed, does some manipulations. It also displays the entered characters in the
Booting
0000 31FF17 LXI SP,17FFH Initialise stack pointer 0003 3E10 MVI A,10H Initialise 8279
0005 D321 OUT 21H
0007 3E40 MVI A,40H
0009 D321 OUT 21H
000B 3E0D MVI A,0DH
000D 30 SIM Activating RST6.5
000E 325017 STA 1750H Updating mode and
position data
0011 211D00 LXI H,001DH
0014 225117 SHLD 1751H
0017 21246C LXI H,6C24H Fixing default setup
001A 227017 SHLD 1770H
001D 11DC03 LXI D,03DCH
0020 CDE000 CALL DISPLAY Display ‘SELECt’
0023 FB EI
0024 76 HLT Halt
RST 5.5
002C C3F700 JMP 00F7H Go to ISR of RST5.5 RST 6.5
0034 DB20 IN 20H Reading keyboard data
from IC 8279 0036 F5 PUSH PSW Store it in the stack
0037 FE8A CPI 8AH Checking CNTL+
RECEIVE key
0039 CA0002 JZ RECEIVE
003C FE8C CPI 8CH 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 CPI 98H Checking CNTL+
CLEAR key
004D C26000 JNZ 0060H
0050 210010 LXI H,1000H Clearing the RAM
0053 36C8 MVI M,C8H
0055 23 INX H
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 CPI 8EH Checking CNTL+
SETUP key
0062 C27700 JNZ 0077H
0065 3E0E MVI A,0EH Activating RST5.5
0067 30 SIM
0068 11F403 LXI D,03F4H
006B CDE000 CALL DISPLAY Display the message
‘SEtUP’
006E FB EI
006F 76 HLT
0070 3E0D MVI A,0DH Activating RST6.5
0072 30 SIM
0073 2A5117 LHLD 1751H
0076 E9 PCHL Return to mode from
where setup action is called
0077 3A5017 LDA 1750H The following CNTL
007A B7 ORA A key functions are only
for TRANSMIT mode 007B CA8000 JZ 0080H Checking whether we were in the TRANSMIT mode
007E FB EI
007F 76 HLT
0080 F1 POP PSW Getting key closure
data
which is stored in stack