你好,請問一下,ch374 初始化0x81錯誤,用以下程序測試的時候,發(fā)現(xiàn)得出下面結果,請問對不對 測試用程序:
printf("Read 0x04 Register is %02x.\n",CH374_READ_REGISTER(0x04)); delay_nms( 100 ); CH374_WRITE_REGISTER(0x40,0x48); delay_nms( 100 ); CH374_WRITE_REGISTER(0x41,0x49); delay_nms( 100 ); CH374_WRITE_REGISTER(0x42,0x50); delay_nms( 100 ); CH374_WRITE_REGISTER(0x43,0x51); delay_nms( 100 ); printf("Read 0x05 Register is %02x.\n",CH374_READ_REGISTER(0x05)); delay_nms( 100 ); printf("Read 0x06 Register is %02x.\n",CH374_READ_REGISTER(0x06)); delay_nms( 100 ); printf("Read 0x07 Register is %02x.\n",CH374_READ_REGISTER(0x07)); delay_nms( 100 ); printf("Read 0x08 Register is %02x.\n",CH374_READ_REGISTER(0x08)); delay_nms( 100 ); printf("\n"); printf("Read 0x40 Register is %02x.\n",CH374_READ_REGISTER(0x40)); delay_nms( 100 ); printf("Read 0x41 Register is %02x.\n",CH374_READ_REGISTER(0x41)); delay_nms( 100 ); printf("Read 0x42 Register is %02x.\n",CH374_READ_REGISTER(0x42)); delay_nms( 100 ); printf("Read 0x43 Register is %02x.\n",CH374_READ_REGISTER(0x43));
測試結果:
Start Read 0x04 Register is 59fa. Read 0x05 Register is fa. Read 0x06 Register is fa. Read 0x07 Register is f0fa. Read 0x08 Register is fa.
Read 0x40 Register is 48fa. Read 0x41 Register is 49fa. Read 0x42 Register is 50fa. Read 0x43 Register is 51fa. Error: 81