Forum >dfplayer Serial command
General

dfplayer Serial command

userHead naruhodo792170 2016-03-05 04:16:23 7885 Views3 Replies
i want to use 89s51 to control dfplayer.
But dfplayer have no response.
please tell me where is wrong.
Code: Select all
#include <REG51.H>
char code play[]={0x7E,0xFF,0x06,0x03,0X00,0X01,0XFF,0XE6,0XEF};
int i;
main()
{
SCON=0x50; /mode1
TMOD|=0x20; /timer set
PCON&=0x7F; /smod=0
TH1=TL1=0xFD; /baud rate =9600 (use 11.0592MHz xtal.)
TR1=1; /timer start
for(i=0;i<10;i++)
{
SBUF=play[i];
while(TI==0);
TI=0;
}

while(1);
}
2016-03-15 02:30:18 Cool 8-) , could you share part of your code? userHeadPic Leff
2016-03-15 00:17:10 Ok then ,I was successful.
It's a problem of checksum
Thank you :p
userHeadPic naruhodo792170
2016-03-10 18:57:33 Sorry, never tried it on 51 IC. :?

I think as long as the baud rate and the command are right, then it should work, I think you must know it better than me...sorry can not help much.
userHeadPic Leff