??? 01/09/08 08:17 Read: times |
#149163 - I don't think that's the problem. Responding to: ???'s previous message |
The code will continually reset 'PtrRx'.
You should put "PtrRx= &CompDataRx[0];" and "SerialInit(9600);" before the while loop. I don't think this is the problem - it looks fairly intentional. The main loop waits for certain conditions in two places: while (PtrRx != &CompDataRx[1]); while (PtrRx != &CompDataRx[16]); PtrRx will only be reset after the two while loops exit. I guess the code is supposed to receive frames of data that start with 0x41 and are 16 bytes long. After a correct frame has been received, PtrRx will be reset to be ready for the next frame. |