Morse code is a method of transmitting textual information as a series of on-off tones, lights or clicks that can be directly understood by a trained listener without using any special equipment. The International Morse Code encodes alphabets, numerals and a small set of punctuation and procedural signals as standardised sequences of short and long signals called ‘dots’ and ‘dashes,’ respectively.
Each character (letter or numeral) is represented by a unique sequence of dots and dashes. The duration of a dash is three-times the duration of a dot. Each dot or dash is followed by a short silence, equal to the dot-duration. The dot-duration is the basic unit of time measurement in code transmission. Morse code speed is measured in words per minute (wpm). Characters have differing lengths as these contain differing numbers of dots and dashes. Consequently, words also have different lengths depending on the total number of dots and dashes, even if these contain the same number of characters.
The Morse code encoder presented here converts texts, numbers and special characters into Morse code as audible output on a piezobuzzer (PZ1). The encoder along with any Morse code transmitter can be used for transmission of Morse code.
Fig. 1 shows the block diagram of the Morse code encoder. The Morse code message is entered through a keypad made of tactile switches S2 through S9 (Fig. 2). The message appears on the LCD for visual checking. LEDs indicate the applied command. The transmitted Morse code message is played on a piezobuzzer and indicated by the glowing of LED4.
Fig. 2 shows the circuit of the microcontroller-based Morse code encoder. It comprises microcontroller AT89C51 (IC1), regulator 7805 (IC2), and LCD display and a few discrete components. Microcontoller AT89C51 is the heart of the circuit. It is an 8-bit microcontroller with 4kB Flash programmable and erasable read-only memory (PEROM), 128 bytes of RAM, 32 input/output lines, two 16-bit timers/counters, a five-vector two-level interrupt architecture, a full-duplex serial port, on-chip oscillator and clock circuitry.
Port pins P1.0 through P1.7 of the microcontroller are connected to switches S2 through S9 that are used for inputting the various commands. These port pins are pulled up with 10-kilo-ohm resistor network RNW1. Data pins D0 through D7 of the LCD are connected to port pins P2.0 through P2.7 of the microcontroller. The control pins—register select (RS), read /write (R/W) and enable E—are connected to port pins P0.0, P0.1 and P0.2, respectively. Preset VR1 is connected to pin 3 of the LCD for contrast control.
LED2 through LED5 are connected to pins P0.3 though P0.6 to provide the visual indication for ‘EDIT,’ ‘TRANSMIT,’ ‘MORSE OPTICAL’ and ‘DONE’ mode, respectively. Port pin P0.7 of the microcontroller drives the piezobuzzer with the help of transistor T1.