下面为测试程序: 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采样内置固件模式,pc接收数据正常,pc无法下传,经测试好像ch375读不正常,不知什么原因,c8051f021采用12Mhz晶振单周期指令,连接usb的所有单片机管脚置为开漏(usb管脚为弱上拉),希望大家帮下忙,谢谢!