Dear PICBasic members,
I have a master pic which is written in CCS C that send an array through RS232 protocol at 38400 bauds , the array is 24 bytes long.
The array («packet structure»):
byte 0 is the delimiter (used to delimit one array to another) constant value 0xC8
byte 1 is the function to be executed
byte 2 to 23 is the pwm value applied to each channel ( 22 channels in total)
The array is sent 100 times a seconds.
How to grab the rs232 rx data, trim , split data into 1 byte and 1 array ?
ex:
byte 0 would be discarded , it only separate array data
byte 1 would be stored in a BYTE
byte 2 to 23 would be stored in a array of 22 bytes
Sorry for such question if it's an easy one.
Many thanks!
Best Regards,
Laurent
Bookmarks