January 09, 2025

Talking about the Application Case of Two External Interrupts of 51 Single Chip Microcomputer

51 single-chip microcomputer P1 mouth is connected to 8 LEDs.

; A pin switch K1 is connected to the external interrupt 0 input pin P3.2.

; A pin switch K2 is connected to the external interrupt 1 input pin P3.3.

When the requirements K1 and K2 are not pressed, the 8 LEDs of the P1 port are shown as a streamer.

; When only K1 (P3.2) is pressed, the left and right 4 LEDs flash alternately.

; When only K2 (P3.3) is pressed, all 8 LEDs of P1 port will flash.

; Both external interrupts have the same priority.

;=============================================

Use PROTSUE simulation interface as follows:

Talking about the Application Case of Two External Interrupts of 51 Single Chip Microcomputer

The following procedures can meet the requirements.

ORG 0000H

SJMP MAIN

ORG 0003H

SJMP X0_INT

ORG 0013H

SJMP X1_INT

;------------------------------------

MAIN:

MOV SP, #60H

MOV IE, #85H

MOV A, #254

M_LOOP:

MOV P1, A

RL A

CALL DL_500MS

SJMP M_LOOP

;------------------------------------

X0_INT:

PUSH PSW

SETB RS1

MOV P1, #0FH

SH_0:

XRL P1, #255

CALL DL_500MS

JNB P3.2, SH_0

POP PSW

RETI

;------------------------------------

X1_INT:

PUSH PSW

SETB RS0

MOV P1, #0

SH_1:

XRL P1, #255

CALL DL_500MS

JNB P3.3, SH_1

POP PSW

RETI

;------------------------------- Delay subroutine

DL_500MS:

MOV R5, #9 ;1T

DL1: MOV R6, #128 ;1T

DL2: MOV R7, #215 ;1T

NOP ;1T

DL3: DJNZ R7, DL3; 2T 2 * 215 = 430 T

DJNZ R6, DL2; 2T [1+1+430+2] * 128 = 55552 T

DJNZ R5, DL1; 2T [1+55552+2] * 9 = 499995 T

RET ;2T 1 + 499995 + 2 = 499998 T

;------------------------------------

END

Motorcycle MP3 player with speaker

5 inch digital car bass tube with FM transmitter

Specifications:


1) With5 inch speaker, which makes music sounds more perspective.


2) Embedded amplifier, shows us a professional amplifier and subwoofer, which makes subwoofer smart, fashionable and perfectly.


3) Support USB, SD card slot and MP3 format ( line in socket), which provides you more music source are supported by our WeiDa subwoofers.


4) With remote control function

5) Previous/next button, bass


6) High power output.


7) FM radio function for option.


8) 12V


9) 6850C


10) Audio output


11) +10/-10 songs


12) Indicator light


13) Volume control


14) Pause playback


15) Remote control


16) Stations memory


17) Auto seek stations


18) Power output: 2x15W


19) USB mobile charger


20) Digital songs selection(by remote control)


21) Last position memory


22) Built in remote receiver


23) Repeat and mute function


24) EQ effect: Pop-rock-classic-jazz


25) Power direct connector, TRE OUT connector


26) USB port, SD-MMC slot, AUX in, compatible mp3 format


Optional voltage: DC12V or 24V, AC220V.


With plastic cover on both ends for option.

Motorcycle MP3 player with speaker,High Quality Motorcycle MP3 player with speaker,Motorcycle MP3 player with speaker Details, CN

Jiangmen soundrace electronics and technology co.,ltd. , https://www.soundracegroup.com