ORG 0000H
AJMP MAIN
:
:
;********************
;* 8880 Initialization *
;********************
MAIN: MOV A, #90H
MOV P0, A ; write 8880CRA
MOV P0, A ; write 8880CRA
MOV A, #98H
MOV P0, A ; write 8880CRA
MOV A, #90H
MOV P0, A ; write 8880CRB
MOV A, #94H
MOV P0, A ; write 8880CRA, 8880 mode 1 is DTMF, IRQ
:
:
;****************
;* Receiving program *
;****************
MOV R1, #0
MOV R0, #10H
LOOP1: MOV A, #0FFH
MOV P0, A
SETB P0.7
SETB P0.4
CLR P0.5
SETB P0.6
MOV A, P0 ; Read 8880 status register
JNB A CC .2, LOOP1
CLR P0.4
MOV A, P0 ; Read 8880 receive data register
ANL A, #0FH ; shield the upper four bits
MOV @R0, A
INC R0
INC R1
CJNE R1, #07H, LOOP1
:
:
;****************
;* Code issuing procedure *
;****************
MOV R0, #10H
MOV R1, #7
MOV A, #9DH ; Write 8880CRA
MOV P0, A
MOV A, #90H
MOV P0, A ; write 8880CRB, 8880 mode 2 is TONE, DTMF, IRQ, BURST
LOOP2: MOV A, @R0
ORL A, #0F0H
ANL A, #8FH
MOV P0, A ; send data
MOV A, #0FFH
MOV P0, A
SETB P0.7
SETB P0.4
CLR P0.5
SETB P0.6
LOOP3: MOV A, P0 ; Read 8880 status register
JNB ACC.1, LOOP3
INC R0
DJNZ R1, LOOP2
:
:
Note: The above program has not been debugged, please pay attention to the CS status. For information on MT8880, please refer to
MT8880 transceiver program (8051 series)
Note: P0.0-P0.3 of the MCU are connected to D0-D3 of 8880 respectively; P0.4-P0.7 of the MCU are connected to RS0\ CS \R/ W \Ø2 of 8880 respectively. (Ø2 is controlled by the clock and P0.7)
ORG 0000H
AJMP MAIN
:
:
;********************
;* 8880 Initialization *
;********************
MAIN: MOV A, #90H
MOV P0, A ; write 8880CRA
MOV P0, A ; write 8880CRA
MOV A, #98H
MOV P0, A ; write 8880CRA
MOV A, #90H
MOV P0, A ; write 8880CRB
MOV A, #94H
MOV P0, A ; write 8880CRA, 8880 mode 1 is DTMF, IRQ
:
:
;****************
;* Receiving program *
;****************
MOV R1, #0
MOV R0, #10H
LOOP1: MOV A, #0FFH
MOV P0, A
SETB P0.7
SETB P0.4
CLR P0.5
SETB P0.6
MOV A, P0 ; Read 8880 status register
JNB ACC.2, LOOP1
CLR P0.4
MOV A, P0 ; Read 8880 receive data register
ANL A, #0FH ; shield the upper four bits
MOV @R0, A
INC R0
INC R1
CJNE R1, #07H, LOOP1
:
:
;****************
;* Code issuing procedure *
;****************
MOV R0, #10H
MOV R1, #7
MOV A, #9DH ; Write 8880CRA
MOV P0, A
MOV A, #90H
MOV P0, A ; write 8880CRB, 8880 mode 2 is TONE, DTMF, IRQ, BURST
LOOP2: MOV A, @R0
ORL A, #0F0H
ANL A, #8FH
MOV P0, A ; send data
MOV A, #0FFH
MOV P0, A
SETB P0.7
SETB P0.4
CLR P0.5
SETB P0.6
LOOP3: MOV A, P0 ; Read 8880 status register
JNB ACC.1, LOOP3
INC R0
DJNZ R1, LOOP2
:
:
Note: The above program has not been debugged, please pay attention to the CS status
Previous article:ds1302 clock chip source code
Next article:Communication program between microcontroller and PC
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- 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
- Sandia Labs develops battery failure early warning technology to detect battery failures faster
- Ranking of installed capacity of smart driving suppliers from January to September 2024: Rise of independent manufacturers and strong growth of LiDAR market
- Industry first! Xiaopeng announces P7 car chip crowdfunding is completed: upgraded to Snapdragon 8295, fluency doubled
- P22-009_Butterfly E3106 Cord Board Solution
- Keysight Technologies Helps Samsung Electronics Successfully Validate FiRa® 2.0 Safe Distance Measurement Test Case
- Innovation is not limited to Meizhi, Welling will appear at the 2024 China Home Appliance Technology Conference
- 【Beetle ESP32-C3】8. OLED clock and weather assistant (Arduino)
- R7F0C003/004 series, using IAR development environment, are there any tutorials?
- PWM wave problem
- Typical uses of voltage followers
- Electric energy measurement solution based on C2000 built-in 12-bit ADC
- How many memory wafers are used in STM32F0 and STM32F1 series?
- The stm32f103c8t6 core board is powered by two USB cables, and the program cannot start automatically
- [NUCLEO-F746ZG Learning] Construction Project-Based on RT-Thread
- Occupation and age
- I need help from a master who can use ADS software to make filters