I think something is not clear here.
You say that the following piece of code is requesting from PC,but I see that it is just waiting fo the string of characters to arrive.
After that the next lines are executed, but are you sure you catch the beginning of the transmission? How can you be sure about that?Code:'request from PC, 9600 baud rate standby: SerIn PORTC.7,6,["P",ID_2, ID_1, ID_0]
It is better to wait for the device to send a preample or a start character and the store the array of the 8 bytes.
instead of this:
do something like this:Code:loop: '4800 baud rate, SerIn2 PORTB.7,16572,[B0, B1, B2, B3, B4, B5, B6, B7, B8]
IoannisCode:my_array var byte[8] loop: '4800 baud rate, SerIn2 PORTB.7,16572,[wait("abc"), str my_array\8]





Bookmarks