unsigned char volatile xdata CH375_CMD_PORT _at_ 0xBDF1; /* CH375命令端口的I/O地址 */ unsigned char volatile xdata CH375_DAT_PORT _at_ 0xBCF0; /* CH375數(shù)據(jù)端口的I/O地址 */ 這是貴公司的提供的代碼,我所用的是cygnal 的c8051f124,由于端口資源豐富,在自己的板子上沒有使用38譯碼器,我想問一下:對ch375的端口是否可以直接按照ds上提供的時序進行操作??!以下是我的代碼: void CH375_WR_CMD_PORT(unsigned char cmd) //寫命令端口 { SFRPAGE=0x0f; P7MDOUT =0xff; P4MDOUT|=0xd2; ch375cs=0; ch375rd=1; ch375wr=0; ch375a0=1; P7=cmd; delay2us(); ch375cs=1; }
void CH375_WR_DAT_PORT(unsigned char dat) //寫數(shù)據(jù)端口 { SFRPAGE=0x0f; P7MDOUT =0xff; P4MDOUT|=0xd2; ch375cs=0; ch375rd=1; ch375wr=0; ch375a0=0; P7=dat; delay2us(); ch375cs=1; } 這樣操作是否可行?盼望您的回復?。?!