下面為測(cè)試程序: CH375_WR_CMD_PORT(CMD_GET_IC_VER); i=CH375_RD_DAT_PORT(); 讀出值為:0x01正常值為:B7(正常89s52讀的)
CH375_WR_CMD_PORT(CMD_CHECK_EXIST); CH375_WR_DAT_PORT(0X57); i=CH375_RD_DAT_PORT(); 讀出值為:0x00,正常值:0xa8
unsigned char CH375_RD_DAT_PORT( void ) { unsigned char i; unsigned char n=0; n++; n++; usb_cs=0; usb_a0=0; usb_rd=0; n++; i=P2; n++; n++; usb_rd=1; usb_cs=1; n++; n++; return( i );
} ch375采樣內(nèi)置固件模式,pc接收數(shù)據(jù)正常,pc無法下傳,經(jīng)測(cè)試好像ch375讀不正常,不知什么原因,c8051f021采用12Mhz晶振單周期指令,連接usb的所有單片機(jī)管腳置為開漏(usb管腳為弱上拉),希望大家?guī)拖旅?,謝謝!