• No results found

MORSE PROCESSOR

In document PROJETOS ELETRONICOS (Page 42-45)

Junomon AbrAhAm

Mo

rse code, introduced by Samuel Morse, is still used universally even though better modes of communication are now available Follow-ing are the main reasons for its preference over other means of communication.

1. It enables communication with distant stations, using low-power trans-mitters.

2. It avoids the problem of regional accents and pronunciation.

3. It has the ability to override noise as it occupies only a fraction of the b a n d w i d t h required for a radio te-lephony sig-nal.The cir-cuit presented here converts text into the correspond-i n g M o r s e code, and vice versa. The high light of this circuit is that is can in-terpret Morse signals avail-able in the form of sound f r o m h a m radio or any other source.

It is very use-ful for not only learning but also for transmission and reception of Morse code. It can find application in ham radio, telegraphy, etc.

Hardware

The circuit is configured around the basic 8085 microprocessor. For simplify-ing the overall design, a programmable keyboard/display interface 8279 chip has

been used, which relieves the micro-processor from scanning the keyboard and display. Here, 25 keys, includ-ing SHIFT and CTRL keys, and six 7-segment common cathode character displays are used. Though 7-segment displays are not suitable for alpha-numeric characters, these have been used here with some compromise for reducing the overall cost. (Note: The use of dot-matrix LCD display avoids the difficulty in displaying characters in 7-segment format. One can go for a microcontroller design, if needed.) The

7-segment display pattern employed for different characters is shown in Table I.

Two hardware interrupts, RST5.5 and RST6.5, are used for reading the key entries. These are driven by the IRQ line from the keyboard/display interface IC 8279.

A buffer (IC8) is connected at the display output of 8279 to drive the 7-segment displays. The encoded scan lines (SL2-SL0) are decoded by an octal decoder 74LS138 (IC9), whose outputs drive the common cathode of displays via transistor switches. The keys are wired in such a way that those can be represented by the seven higher order rate of the keyboard data.

Morse signals in the form of sound are converted to microprocessor-compatible signals. The arrangement comprises con-denser microphone, preamplifier, and retriggerable monostable multivibrator TABLE II

Address Distribution

Device Address

EPROM 0000 to 03FF

RAM 1000 to 17FF

8279:

Command Port 21

Data Port 20

74LS123 (IC7). The code drives a piezo buzzer via a transistor connected at the SOD line of 8085 microprocessor. Intensity of the sound can be con-trolled by potentiometer VR1. the keyboard entries 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 monosta-ble multivibrator

IC8 - 74LS244 octal bus driver IC10 - 7805 +5 volt regulator T1 - BC548 npn transistor T2 - BC549 npn transistor T3-T8 - BC558 pnp transistor Dl - 1N4148 switching diode LED1 - LED

DIS1-DIS6- LTS543 common-cath-display ode

Resistors (all ¼ watt, ±5% carbon, unless stated otherwise)

VR1 - 2.2-kilo-ohm preset VR2 - 100-ohm preset Capacitors:

C1 - 2.2uF, 16V electrolytic C2, C4, C6 - 0.luF ceramic disc C3 - 10uF, 16V electrolytic C5 - 0.001uF ceramic disc C7 - 10pF ceramic disc Miscellaneous:

PZ1 - Piezo buzzer

MIC - Condenser microphone S1-S26 - Tactile switches for keyboard

XTAL - 6.144 MHz crystal

and also acts as a stack. One can en-ter/store a maximum of approximately 1,750 characters in the RAM. This is adequate for normal applications.

In case one needs to store lengthy text, one should use a larger capac-ity 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 de-coded by IC6 to generate chip select (CS) signals to various ICs. The address 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. Basically, the following functions are performed by the software program:

1. Initialisation of the peripherals.

2. Reading the depressed key data and its storage in RAM.

3. Writing data into the display RAM in 8279.

4. Generation of Morse code.

5. Recognition of Morse code from its sound.

6. Giving proper messages at appropri-ate time.

Since Morse code is a time-dependent code, the program contains many jump instructions. The program has been make interactive and user-friendly. The

firmware is divided into the following modules: (a) booting, (b) keyboard, (c) transmit, (d) receive, (e) play, and (f) lookup table.

The logic of the program can be gener-ally understood from the Assembly lan-guage listing given in Appendix A. A brief description of each module is, however given below:

(a) Booting: The section initializes stack pointer 8279 and the interrupts. It also fixes defaults 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 7-segment display. (Table III has been included by EFY for ready reference by the readers to know the hex data gen-erated by 8279 when any key is either pressed alone or in combination with SHIFT or CTRL key.)

(c) Transmit. This module converts each character in the RAM to its corre-sponding Morse code signals which are output through the SOD line. The speed of transmission or words per minute de-pends on the value entered in the setup menu.

(d) Receive. The acquisition of Morse code is done by checking the presence of sound with time. The module continuously monitors the SID pin of 8085 microprocessor, where the Table IV

Lookup Table

Chr/word Address Hexcode Chr/word Address Hexcode Chr/word Address Hexcode

0 0300 3FAA0E00 J 034C IE A9 03 00 . 03B4 80 99 39 00

sound-converted logic level (depending on whether the sound is present or not) is available. It compares this logic level with a prefixed time value and accord-ingly decides whether the sound was due to dot or dash. Moreover, it displays characters corresponding to the entered Morse code.

(e) Display. This module displays characters in the moving display format as per the entered message. The speed of movement is fixed to approximately three characters per second.

(f) Lookup table (Table IV). This is a block of data, which contains the 7-segment data for every character and the data needed for Morse code generation or reception. Each character takes four EPROM locations. The first location indicates the 7-segment data, while the second and third locations hold the Morse data code. The fourth location is unused. (EFY Note. We have included Table IV showing the hex data generated by depression of any key alone or in combination with SHIFT or CTRL keys, for ready refer-ence by the readers.)

In document PROJETOS ELETRONICOS (Page 42-45)