Encoders and Decoders

Before going into details about Encoders and Decoders, let us have a brief idea about Multiplexing. Often we come across applications where it is needed to feed several input signals to a single load, each at a time. This process of selecting one of the input signals to be fed to the load is known as Multiplexing. The reverse of this operation, i.e. the process of feeding several loads from one common signal source is known as Demultiplexing.


Similarly in the digital domain, for ease of transmission of data, the data is often encrypted or placed within codes and then this secured code is transmitted. At the receiver, the coded data is decrypted or gathered from the code and is processed to be displayed or given to the load accordingly.

This task of encrypting the data and decrypting the data is done by Encoders and Decoders. So let’s now understand what are Encoders and Decoders.

What are Encoders?

Encoders are digital ICs used for encoding. By encoding, we mean generating a digital binary code for every input. An Encoder IC generally consists of an Enable pin which is usually set high to indicate the working. It consists of 2^n input lines and n output lines with each input line being represented by a code of zeros and ones which are reflected at the output lines.

In RF communication, the Encoder can also be used for converting parallel data to serial data.

Two Popular Encoder ICS

1. H12E

A popular example of an Encoder is the Holtek Encoder H12E used for parallel to serial conversion.

It is a type of CMOS IC with 8 address pins and 12 data pins. It is an 18 pin IC.  It is used in RF communication where it converts the 12 bit parallel data to serial form. It consists of an Enable pin which is an active low pin and when set low, the transmission is enabled. The H12E encoder sends 4 words at a time. In other words, till the!TE pin is set low, the encoder transmits several cycles of each 4 words and stops the transmission once the!TE pin is set high.

Features of H12E

  • Works with a supply voltage of 2.4 to 12 V.
  • It is paired with H12 series of Decoders
  • Consists of built-in oscillators
  • It is based on high noise immunity CMOS technology.
  • It is used for remote-controlled operations.

 2. HC148

 Another popular example of Encoder IC used as a priority Encoder is HC148 which is an 8 to 3 Line Priority Encoder. By Priority Encoder we refer to Encoders where a certain priority is given to each input and based on the level of priority the output code is generated. It also has an Enable pin which is an active low pin and when set low, it enables the encoder operation. It works within the operating voltage range of 2 V to 6V.

What are Decoders?

Decoders are digital ICs which are used for decoding. In other words, the decoders decrypt or obtain the actual data from the received code, i.e. convert the binary input at its input to a form, which is reflected at its output. It consists of n input lines and 2^n output lines.  A decoder can be used to obtain the required data from the code or can also be used for obtaining the parallel data from the serial data received.

Three Popular Decoders

1. MT8870C/MT8870C-1 DTMF Decoder:

The MT8870C/MT8870C-1 is a DTMF decoder IC to integrating the band split filter and digital decoder operations. The filter section uses switched capacitor techniques for high and low group filters; the decoder uses digital counting techniques to detect and decode each of the 16 DTMF tone pairs into a 4-bit code. Dual-tone multi-frequency is the audible sound we hear when we press keys on our phone. DTMF decoder is used for remote control applications.

MT8870C MT8870C Circuit

DTMF is a strategy for sending and receiving control of qualified information over a communications channel. The viewer is likely generally acquainted with DTMF tones as heard on a modern push-button telephone. Each number on the keypad is generated the corresponding DTMF tone. When a number is pressed on the keypad then it encoded and transmitted over a medium. The receiver receives it and decodes the DTMF tone back into its two particular frequencies and after that, the processing circuit will act appropriately.

Working of DTMF DECODER MT8870:

From the application circuit, it uses a DTMF decoder MT8870 that uses a crystal of 3.57 MHz for generating appropriate frequency for comparing the input audio tones at its pin2 to generate 4 bit BCD code at its output from pin 11 to 14. This BCD data is passed through HEX CMOS inverters the output of which are duly pulled up and connected to port-3 pin 10 to 14 as a buffer between the DTMF IC and the microcontroller. While tone commands arrive from a telephone line after a call is established, it first reaches the DTMF decoder IC MT8870. For example, if button 1 is pressed the output develops 0001 at pin 11-14 which are inverted and fed to the microcontroller input ports. For digit 2 the output developed accordingly provides 0010 and so on for the rest of the digits. The microcontroller program while executed develops specific output for each number.

Working of DTMF DECODER MT88702. HT9170B DTMF Decoder IC:

The HT9170B is a Dual Tone Multi-Frequency (DTMF) receiver integrating a digital decoder. The HT9170 series all use the digital counting techniques to detect and decode all DTMF input into a 4-bit code output. The high precise filters are designed to separate tone signals into low and high-level frequency signals. It is an 18 pin IC.

The input arrangement is at pin no 2 with an RC circuit connection. The system oscillator comprises an inverter, a bias resistor and a fundamental load capacitor on IC. A standard 3.579545MHz crystal oscillator is connected with X1 and X2 terminals to execute the oscillator function. D0, D1, D2, D3 are the data outputs terminals. In this, we used a keypad of any telephone or cell phone, normally a matrix 4×3 keypad. When we press the one on the keypad it gives a binary output of 0001, similarly for 2-0010, 3-0011, 4-0101, 5-0101, 6-0110, 7-0111, 8-1000 and 9-1001. When the decoder receives an effective tone signal, the DV pin goes high and the tone code signal is transformed to its internal circuitry for decoding. After that the OE pin goes high, the DTMF decoder will appear on output pins D0-D3.

Video on working of DTMF Decoder IC 9170B

 

3. H12D Decoder

Like the H12 Series of Encoders, the H12D is also a CMOS IC that is used in RF communication. It is paired with the H12E and receives the serial output from the Encoder.  The serial input data is compared with the locally available addresses and in case of no error, the original data is obtained and the VT pin goes high to indicate a valid transmission.  It consists of a single input pin to receive the serial input and 12 output pins with 8 address pins and 4 data pins.  It also has 2 built-in oscillators and its features are the same as that of H12E encoder IC.

Video on the working of Holtek H12E and H12D ICs

 

An Application involving the use of Encoders and Decoders – Wireless Data Encryption and Decryption

In every wireless communication, data security is the main concern. There are many ways to provide security to wireless information from hackers. This project is mainly designed to provide security for data communication by designing standard encryption and decryption algorithms.

In this project, we use a 4×4 keypad to transmit the data to the microcontroller of AT89C51 by pressing keys on the keypad. Those keys are detected by microcontroller and the detected data needs to be encrypted. Here we use an encoder of HT640. It converts the data into secrete code for security and sends it to the transmitter of STT-433. The transmitter transmits the encrypted data to the destination through RF communication. The receiver of STR-433 receives it with 433MHz frequency and is decrypted by a decoder of HT649 according to an algorithm and displays decrypted data on 16×2LCD.

Functional diagram of transmitter:

Functional-Diagram-of-Transmitter - 1

Functional diagram of the Receiver:

Functional-Diagram-of-Receiver 2

With emerging technologies, various areas of applications in Electronics are growing. With the increase in such areas of applications, the demand for improved and simpler architecture is required, resulting in faster & efficient operations. This device is very simple & cost-effective as compared to the existing methods. We have to send data more securely at any range.