#include #include #include #include #include #include "lib\8000e.h" #include "lib\8073.h" long cyc,errorcount; unsigned char testdata[515],readdata[515]; void ShowErrorCount(long err) { Show5DigitLed(5,err%10); err/=10; Show5DigitLed(4,err%10); err/=10; Show5DigitLed(3,err%10); err/=10; Show5DigitLed(2,err%10); err/=10; Show5DigitLed(1,err%10); } void main() { unsigned char kk,kin1; unsigned long jj; long bn,ms; int mode; float AD; float f; unsigned int sts,mm,tt,slot,mmcflag=0; Print ("Input slot of 8073 :"); kin1=Getch(); slot = ascii_to_hex(kin1); Print ("%d\n\r",slot); Puts ("Input A/D calibration mode of 8073 :"); kin1=Getch(); mode = ascii_to_hex(kin1); Print ("%d\n\r",mode); //mode=0; if(Initial8073(slot,&bn,&ms, mode)) { Print("Initialize MMC FAIL!"); } else { Print("Initialize MMC OK\n\r"); Print("Block number = %ld,Memory size = %ld\n\r",bn,ms); Print("Any key to Read/Write TEST \n\r"); mmcflag=1; } cyc=0; Getch(); errorcount=0; for(;;) { for(jj=0;jj