Has anyone tried DF player mini (Actually my module is (MP3-TF-16P) to play some sound tracks.I tried with a PIC micro but its not working.I searched examples on the internet & they all have arduino examples
When a button presses the 1st sound track play & after 5 seconds it will pause. Here is what I did, but its not working.
When a button presses the 1st sound track play & after 5 seconds it will pause. Here is what I did, but its not working.
Code:
Set_TF_Card movlw 7Eh
call TX_RS232
movlw 0FFh
call TX_RS232
movlw 06h
call TX_RS232
movlw 09h
call TX_RS232
movlw 00h
call TX_RS232
movlw 00h
call TX_RS232
movlw 02h
call TX_RS232
movlw 0FFh
call TX_RS232
movlw 0F0h
call TX_RS232
movlw 0EFh
call TX_RS232
;
call Del_1S
;-------------------------------------------------------------------------
;7E FF 06 03 00 00 01 FE F7 EF
;-------------------------------------------------------------------------
Wait_Press btfsc PORTB,4 ;when button pressed play the 1st track
goto Wait_Press
bsf PORTA,1
Play_Track movlw 7Eh
call TX_RS232
movlw 0FFh
call TX_RS232
movlw 06h
call TX_RS232
movlw 03h
call TX_RS232
movlw 00h
call TX_RS232
movlw 00h
call TX_RS232
movlw 01h
call TX_RS232
movlw 0FEh
call TX_RS232
movlw 0F7h
call TX_RS232
movlw 0EFh
call TX_RS232
;
movlw .50
movwf ISR_Count
movlw .5 ; count 5 seconds
movwf Seconds
Count_Play call Del_X20mS
decfsz ISR_Count,F
goto $-2
movlw .50
movwf ISR_Count
decfsz Seconds,F
goto Count_Play
;
Stop_Track movlw 7Eh ; after 5 seconds pause track
call TX_RS232
movlw 0FFh
call TX_RS232
movlw 06h
call TX_RS232
movlw 0Eh
call TX_RS232
movlw 00h
call TX_RS232
movlw 00h
call TX_RS232
movlw 00h
call TX_RS232
movlw 0FEh
call TX_RS232
movlw 067h
call TX_RS232
movlw 0EFh
call TX_RS232
;
btfss PORTB,4
goto $-1
bcf PORTA,1
goto Wait_Press