The first thing to do would be to save several (like 20+) complete frames of data on the PC side.
Then do a hex dump of the files, like this
Code:
$ hd foo.c | head
00000000 23 69 6e 63 6c 75 64 65 20 3c 73 74 64 69 6f 2e |#include <stdio.|
00000010 68 3e 0a 23 69 6e 63 6c 75 64 65 20 3c 73 74 64 |h>.#include <std|
00000020 6c 69 62 2e 68 3e 0a 23 69 6e 63 6c 75 64 65 20 |lib.h>.#include |
00000030 3c 73 74 72 69 6e 67 2e 68 3e 0a 23 69 6e 63 6c |<string.h>.#incl|
00000040 75 64 65 20 3c 63 74 79 70 65 2e 68 3e 0a 23 70 |ude <ctype.h>.#p|
00000050 72 61 67 6d 61 20 77 61 72 6e 69 6e 67 28 64 69 |ragma warning(di|
00000060 73 61 62 6c 65 20 3a 20 34 39 39 36 29 0a 0a 73 |sable : 4996)..s|
00000070 74 72 75 63 74 20 4d 65 6d 62 65 72 20 7b 0a 20 |truct Member {. |
00000080 20 63 68 61 72 20 6d 65 6d 62 65 72 49 64 5b 36 | char memberId[6|
00000090 5d 2c 20 6e 61 6d 65 5b 34 30 5d 2c 20 67 65 6e |], name[40], gen|
You should be able to see this at the start of each file.
Code:
header.platform = 0xA6843;
header.magicWord[0] = 0x0102;
header.magicWord[1] = 0x0304;
header.magicWord[2] = 0x0506;
header.magicWord[3] = 0x0708;
Next, you see how well it might compress. In the case of text files, the result is usually pretty good.
Code:
$ wc -c foo.c
4568 foo.c
$ bzip2 -z -c foo.c | wc -c
1267
If your transmitted messages also compress well, then compressing the data may be an option.
zlib Home Site is an example of a well regarded compression / decompression library.
> The microcontroller is used to handle calculations and data transfer for a radar device.
Another thing to look at is comparing the differences between adjacent frames of data.
In the same way that adjacent frames of a movie are very similar, adjacent frames of radar are going to be similar.
Perhaps you can only send the difference each time, rather than the whole thing.
But this may require too much memory to allow you to compare adjacent messages.