microcontroller - CAN message read error -
I am using the problem if
occurs on line with the statement 'uudspeed' of motor The speed is what I am getting from the external tax bus. When the code reaches this line, it does not turn on P10_6 and P10_7. How can I fix this problem?
Zero is read () {stCAN_SWObj SW_obj1; Ubyte i; ADC0_vStartSeq0ReqChNum (0,0,0,0); Uwbesch = ADC0_uwGetResultData (RESULT_REG_0); // Read gasolineCAN_vReleaseObj (1); CAN_vGetMsgObj (1, and SW_obj1); Uwspeed1 = SW_obj1.ubData [0]; // High Byte Uddspeed 2 = SW_obj1.ubData Receiving [1]; // Getting low byte IO_vSetPin (IO_P10_8); // The initial motor chain is connected to the 10.8 pin if ((uwspeed1 & lt; 0x0b & IO_P10_8 == 1)) // If the speed is less than 0x0b and the chain connected to IO_vResetPin (IO_P10_8); // disconnect series IO_vSetPin (IO_P10_6); // Here the pin is 10.6 IO_vSetPin (IO_P10_7); // Here the pin is 10.7 CAN_MODATA3LL = 0x00; // Send 0 torque for hybrid kit CAN_vTransmit (3); }
Comments
Post a Comment