Radio station identification and voice automatic recognition based on C8051F020 and DTMF unit

Publisher:atech123Latest update time:2011-09-07 Keywords:C8051F020 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

This paper introduces a system based on C8051F single chip microcomputer, which can identify the identity of radio stations by DTMF coding. The system is easy to use. Without changing the original characteristics of the radio station, it can be connected to the expansion port of the radio station to realize the identification of the radio station. Even if the other party cracks the voice signal, the identity of the radio station can still be distinguished by the address code. The system has a certain application prospect in places with high confidentiality requirements.

2 System composition and working principle

Figure 1 is the structure diagram of the radio station identification system. The single chip microcomputer uses C8051F020, the DTMF unit uses MT8880 dual tone multi-frequency, the voice storage and playback module uses ISD4004, and there are also display units, storage units, and keyboards.


Radio stations generally have reserved expansion interfaces: audio input, audio output, PTT transmission control, power supply, and ground. The system is connected to the radio station through these interfaces, as shown in Figure 2.

System working principle: When used as a transmitter, the radio presses the FTT button, PTT changes from high level to low level, and sends the signal to the microcontroller. The interrupt program of the microcontroller sends the address code of the local machine to MT8880 through the data interface, and after being modulated by MT8880, it is sent to the audio input interface of the radio and sent together with the voice signal. When used as a receiver, it needs to be divided into multiple situations, as shown in Figure 3.

How the system works

After receiving the voice signal, it determines whether there is a DTMF signal input. If there is, MT8880 decodes and transmits the decoded data to C8051F020, which then determines whether the address is the pre-defined radio address code. If so, the address code is displayed on the LCD, otherwise it displays ERROR; if there is no DTMF signal but only a voice signal, it means that the signal is not a signal within the network, and the operator replies with some pre-recorded voice signals through the play button to confuse the other party.

3 System Hardware Design

The whole system can be divided into two parts according to the function: DTMF encoding/decoding and voice storage and playback. It is controlled by the main control unit. Since the system is powered by the radio's battery, low-power devices are selected. The main control unit here uses C8051F020. It is a fully integrated mixed-signal system-on-chip (SoC) with a high-speed CIP-51 core compatible with 8051 and fully compatible with the MCS-51 instruction set. The clock frequency of C8051F020 can reach 25 MHz, and it contains 64 KB on-chip Flash program memory, 4 352 B of RAM, 8 I/O ports, and 64 I/O lines.

3.1 DTMF Encoding/Decoding

The DTMF encoder/decoder uses MT8880. MT8880C is a single-chip DTMF signal transceiver with a call processing filter. The device adopts low-power, high-stability ISO-CMOS technology, built-in a high-performance receiver with an internal amplifier with variable gain, a transmitter with a pulse counter, and a standard microprocessor interface that can access the internal registers of MT8880. Its internal registers include 1 status register, 2 data registers and 2 control registers. Its circuit is shown in Figure 4.

The system uses a single-ended input mode, IN- is the op amp input, R1 and R2 adjust the input signal gain. TDNE is the audio output, used to send DTMF signals. OSCl is the clock/oscillator input, OSC2 is the clock output, and MT8880 uses a 3.579 5 MHz working clock. IRQ/CA is the interrupt request signal, open-drain output. When a DTMF signal is input, IRQ/CA sends an interrupt request to C8051F020. D0~D3 is the microcomputer data bus, which is compatible with TTL. It outputs the measured DTMF signal and inputs the DTMF signal to be sent, and is connected to the I/O interface of C8051F020. The 12-pin CP2 terminal is the system clock input, which cooperates with the read/write control terminal R/W to complete the read and write operations of MT8880. The RS0 pin is the register selection, which is compatible with TTL level. The address code can be composed of 0~9 and A~D. Due to the particularity of the application field of this system, the address code is encrypted. When the terminal is used as a transmitter, the DTMF encoding/decoding part encrypts the terminal's address code through a certain algorithm, modulates it into a DTMF signal, and then sends it to the radio station for easy recognition by other radio stations in the network. When the terminal is used as a receiver, the DTMF encoding/decoding part demodulates the received DTMF signal into a digital code, and then obtains the address code through a decryption algorithm. Considering that the impedance of the system may not match the impedance of the radio audio I/O interface, an audio transformer should be added between the two.

Since the standard microcomputer interface provided by MT8880 is compatible with the 6800 series, if other single-chip microcomputers are used for control, its working timing must be simulated by hardware or software. In the process of using MT8880, the author found that the key is to provide the interface clock signal CP2 for MT8880. The typical value of its clock cycle tCYC is 250 ns. In fact, tCYC is between 0.167 and 10 s (6 MHz to 100 kHz), and MT8880 can still work normally. Therefore, the range of tCYC is relatively wide, as shown in Figure 5. Therefore, the generation of CP2 is more flexible.

Value range

In this system, the pin P1.0 of C8051F020 is connected to the pin CP of MT8880 to simulate the working timing required by MT8880.

3.2 Voice storage and playback

The voice storage and playback module uses ISD4004 from ISD. This voice device uses the patented multi-level direct analog storage (Chip Corder) technology. The sound does not need to be converted and compressed by A/D. Each sample value is directly stored in the flash memory on the chip, thus avoiding the quantization noise and metallic sound caused by the quantization and compression of general solid recording circuits. Figure 6 shows the voice playback principle circuit. The voice input is directly connected to the differential drive input of the ISD4004 pins IN+ and IN- through the microphone (MIC). The voice output end is connected to the voice output end of the radio after being amplified by LM386. The system adopts the key-controlled segmented recording and playback mode. 10 different voices can be recorded through the recording key. Each recording corresponds to a key on the keyboard. According to the received voice signal, different voices can be played through 10 keys. It is convenient and flexible to use.

4 System Software Design

The system program is written in assembly language, and all DTMF receiving/sending work is completed by the interrupt service program. The main program is only responsible for the initialization program and keyboard scanning. Figure 7 is the main program flow. Figure 8 is the receiving interrupt handler flow. Figure 9 is the sending interrupt handler flow.

Main program flow

Send interrupt handler flow

5 Conclusion

In the development of a certain * project, the above system was successfully used to realize the radio station identity recognition and automatic voice playback functions. Actual use has proved that the system interface is simple, reliable and has achieved satisfactory results.

Keywords:C8051F020 Reference address:Radio station identification and voice automatic recognition based on C8051F020 and DTMF unit

Previous article:Interface circuit for reading LCD display data into single chip microcomputer
Next article:Application of voice circuit reading circuit based on single chip microcomputer 89C52 in fire control system

Recommended ReadingLatest update time:2024-11-17 00:20

Design based on C8051F020 seawater desalination pretreatment system
During the actual use of the seawater desalination device, it was found that the actual working parameters of the device are generally different from the designed working parameters, making the device unable to exert the process characteristics of the original designed system and performing poorly; this situation is b
[Microcontroller]
Design based on C8051F020 seawater desalination pretreatment system
Distributed detection method of vibration signal based on C8051F020 and MXA2500GL sensor
         Introduction           Due to the distance limit of the connecting cable of the acceleration sensor and the charge amplifier, it is difficult to implement a centralized data acquisition and processing system in a space with a long distance, and its reliability and anti-interference problems are difficult to s
[Microcontroller]
Distributed detection method of vibration signal based on C8051F020 and MXA2500GL sensor
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号