你好,请问一下,ch374 初始化0x81错误,用以下程序测试的时候,发现得出下面结果,请问对不对 测试用程序:
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