51 control MT8880 dual audio transceiver assembly program

Publisher:温馨小筑Latest update time:2018-01-16 Source: eefocus Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

        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 


Reference address:51 control MT8880 dual audio transceiver assembly program

Previous article:ds1302 clock chip source code
Next article:Communication program between microcontroller and PC

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号