//set SD card select to high
SD_Disable();//
PORTEbits.RE3=1;
//generate 8 pulse
SD_wr_byte(0xff);
//select SD
SD_Enable();//PORTEbits.RE3=0;
PORTEbits.RE3=0;
//send 6 byte command no
for(i=0;i<5;i++){
SD_wr_byte(*cmd++);
}
SD_wr_byte(0xff);
do
{
tmp=SD_wr_byte(0xff);
timeout++;
}
while((tmp== 0xff) && (timeout < 100));
return(tmp);
為什么6個命令之后第7個oxff要隔一段才能發出啊,for()
要占多數的匯編語句啊?
Edited by Ryang on 2008年12月26日 15:07:13