Design of Telephone Charge Meter Based on Single Chip Microcomputer

Publisher:cyzceeLatest update time:2011-12-29 Keywords:W78E54B Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
Introduction
Public telephone meters are common in daily life. The current telephone meters cannot adapt to the discount time of the telecommunications system. This meter uses a manual meter to meet the change of the discount time at any time. At the same time, the meter records accurately and can store 200 call fee records; the time, area code, rate, etc. can be reset through the phone, and the half-price and full-price conversion can be realized manually; low power consumption, small size, and low cost.

System Design
The system consists of a W78E54B microcontroller, an off-hook detection circuit, a DTMF decoding circuit, a keyboard, and an LED display. The principle block diagram is shown in Figure 1.

Among them, the W78E54B microcontroller mainly completes the calculation and storage of telephone charges. The off-hook detection circuit completes the detection of the system's off-hook, ringing, talking, hanging up and other states. The DTMF dual-tone multi-frequency circuit uses CMD8870 to decode dual-tone multi-frequency signals. The system realizes the human-machine interface through three keys: query, reset, and billing. The LED display uses two identical 12-bit LED display screens, which are installed on both sides of the meter to display the telephone charges of users and customers. The interface circuit of the microcontroller and DTMF is shown in Figure 2.

When a phone dials, the phase-locked loop composed of LM567 detects and makes the output pin low. The signal is directly sent to the P2.0 port of the microcontroller. The microcontroller enables the CMD8870 chip decoding output through the P0.2 port, and Q1 to Q4 are output to P0.3 to P0.7 of the microcontroller respectively. At the same time, the microcontroller detects the arrival of the next dial through the STD port so that it can be received in time. The decoding output of the CMD8870 chip is shown in Table 1.
The software block diagram of this system is shown in Figure 3.
When the phone is picked up and there is a reverse polarity signal, the microcontroller starts the timer and starts automatic billing by seconds or minutes. If there is no reverse polarity signal, the billing will automatically start in 15 seconds or the automatic billing will start immediately by pressing the billing key.
When any of the meter buttons is pressed for more than 2 seconds, the system enters the setting state. When it is less than 2 seconds, the corresponding key action is entered, and the corresponding actions of each button are as follows.
Reset button: After a call is completed, the meter enters the voice prompt state, the charge is completed, press the reset button, stop the voice, and re-bill.
Query key: When the phone is on-hook, this key can be used to query the recent call records, including serial number, phone number, call time and amount, etc.
When the query and billing keys are pressed at the same time, the full-price and half-price billing conversion is realized. The system starts to bill at the full price, and pressing these two keys at the same time is half-price billing.
When any of the above keys is pressed for more than 2 seconds, the time, area code and rate can be set through the phone buttons.
The setting is mainly for users to set parameters such as call rate and time. When the phone is on-hook, you can set some rates and area codes through the phone buttons. For example, the local long-distance area code setting command format is *1+AAAA+#, where *1 is the command number, AAAA is the local area code, and if the local area code is less than 4 digits, use "*" to complete it, and # is the command end character.
In setting the rate, FFF refers to the set rate. For example, if the rate is 0.60 yuan/minute, FFF refers to the three digits 060. Similarly, other settings are shown in Table 2.

Conclusion
This meter can realize accurate billing and accurate dual-tone multi-frequency signal reception, and can be used for billing of dual-tone multi-frequency telephones in various public telephone stations and other places.

Keywords:W78E54B Reference address:Design of Telephone Charge Meter Based on Single Chip Microcomputer

Previous article:Application of Serial Interface Keyboard Controller in Single Chip Microcomputer System
Next article:Application of single chip microcomputer in power control of electromagnetic cooker

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号