MT8880 produced by Canada MITEL is a DTMF (dual tone multi-frequency) sending/receiving chip with CPU interface, which can be directly interfaced with 6800 series microprocessors or single-chip microcomputers. However, for users of 51 series single-chip microcomputers who want to use MT8880 chips, they are concerned about how to interface 51 series single-chip microcomputers with MT8880. This article will take the AT89C2051 (2051 for short) single-chip microcomputer with 51 core as an example to introduce the design of the interface circuit between 2051 single-chip microcomputer and MT8880 for reference by relevant users.
1 Interface clock signal
During the use of MT8880, the author found through experimental research that MT8880 does not have very strict requirements on the timing of interface control signals. The key lies in how to provide the interface clock signal CP (pin 12) for MT8880. From the parameters provided in the original device manual of MITEL, it can be seen that the typical value of the CP clock cycle tCYC is 250nS (0.25μS). In fact, when tCYC is between 0.167 and 10μS (6MHz to 100KHz), MT8880 can still work normally, and the range of tCYC is relatively wide. Therefore, the generation of CP is relatively flexible and can be achieved in the following four methods.
⑴ As we all know, the address latch enable signal ALE of the 51 series microcontroller is 6 times the frequency of the crystal oscillator (for example, the crystal oscillator is 12MHz and ALE is 2MHz). Therefore, the address latch enable signal ALE can be used as CP.
⑵ Use the crystal oscillator output signal (3.58MHz) of MT8880 itself as CP, so that the generation of CP does not depend on the microcontroller.
⑶ When the crystal oscillator frequency used by the 51 series microcontroller is below 6MHz, the signal output by the crystal oscillator can be directly used as CP after being driven.
⑷ Use the I/O line to simulate the CP terminal, and cooperate with the SETB and CLR instructions to generate the CP signal required by the chip. It should be noted that some MT8880 chips cannot work properly with this method.
In summary, method ⑴ is the simplest, method ⑵ is the second, and the other methods are slightly cumbersome and have poor effects. That is, methods ⑴ and ⑵ are the best choices for generating CP signals.
2 Interface hardware design
Compared with other 51 series microcontrollers, the 2051 microcontroller mainly lacks a parallel bus for external expansion (no P0, P2 ports and some control lines). Since the 2051 has no ALE control signal, it is best to use the above method (2) to provide the CP signal when interfacing with the MT8880 chip.
The 2051 and MT8880 interface circuit is shown in Figure 1. It can be seen that the clock signal CP is provided from the crystal output terminal OSC2 of the MT8880 through a 30P capacitor. In addition, when interfacing, P1.0~P1.3 of the 2051 are used as data lines, and P1.4 and P1.5 control the R/W and RSO terminals of the MT8880 respectively.
Figure 1 2051 and MT8880 interface circuit
[page]
3 Interface software design
Based on the circuit in Figure 1, when designing the interface software, you only need to simulate the control timing of MT8880, use instructions to read and write the P1 port, and control the CRA, CRB and other registers inside the chip to achieve the send/receive control of MT8880. Here, only the interface program compiled by C51 is given.
3.1 Sending program
After the program is executed, the 7-digit code (5135535) pre-stored in the array W_BUF will be sent in DTMF mode.
#include
#define uc unsigned char
#define ui unsigned int
/* Sub-function (subroutine) description*/
void initialize(void);
void tran_init(void);
void transmit(uc data *p,uc count);
void delay(ui l);
/* Main function (main program) */
void main(void)
{ uc data w_buf[7];
SP=0x5f;
/* Pre-stored digital 5135535 */
w_buf[0]=5;
w_buf[1]=1;
w_buf[2]=3;
w_buf[3]=5;
w_buf[4]=
5; w_buf[5]=3;
w_buf[6]=5;
initialize();
tran_init();
transmit(w_buf,7);
initialize();
for(;;);}
/* MT8880 initialization sub-function*/
void initialize(void)
{ P1=0x3f; /* Read SR */
P1=0x20; /* CRA=0000 *
/
P1=0x20;
/* CRA=0000 */
P1=0x28; /* CRA=1000 */
P1=0x20; } /* CRB=0000 */
/* Send initialization sub-function*/
void tran_init(void)
{ P1=0x29; /* CRA=1001 */
P1=0x21; } /* CRB=0001 */
/* Send operation sub-function*/
void transmit(uc data *p,uc count)
{ uc i;
for (i=0;i
r_buf[i++]=P1&0x0f; } /* save */
4 Conclusion
In the research of a fund project, the author successfully used the above interface circuit to realize long-distance digital communication. The actual use proved that the interface is simple and reliable, and achieved satisfactory results.
References:
[1] MICROELECTRONICS ANALOG COMMUNICATIONS HANDBOOK. MITEL, 1991
[2] Ma Zhongmei. C language application design for single chip microcomputer. Beijing: University of Aeronautics and Astronautics Press, 1997
Previous article:Realization of Serial Communication between AT89C52 Single Chip Microcomputer and VB
Next article:Design of Single Chip Microcomputer Development System Based on KEIL 51
Recommended ReadingLatest update time:2024-11-16 22:01
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- IAR opens CC1310 SDK and reports an error
- 【CH549 Review】Part 2 Programming Tool Review
- Pre-registration for the live broadcast with prizes | High-speed bus PCIe5.0 technology development and testing sharing
- Don’t use your phone or tablet while it’s charging
- Can UART1 and SPI of C8051F340 work at the same time?
- The water pump stops accidentally
- [Project source code] FPGA-based cmos_init OV5640 camera I2C interface controller
- Can the outputs of several LDO chips be connected in parallel?
- 《Arduino+Android Interactive Smart Work: Getting Started with the Internet of Things》
- [ESK32-360 Review] Hetai and Blood Pressure Algorithm Transplantation (2)