Hello,
I am currently writing code to convert 12 and 14 bit integers to characters using the CC430. I am currently doing this by:
output[2] = '0'+((var/1000)%10);
output[3] = '0'+((var/100)%10);
output[4] = '0'+((var/10)%10);
output[5] = '0'+((var/1)%10);
where the array output is just a char array. I then ship this data off to MATLAB, where it is reconverted to integers. The problem I am having is that it seems the modulo operand is taking too many clock cycles. Is there a more efficient way of doing this, or does anyone know of a good MATLAB function that can handle integers instead of chars coming into the serial port? I am trying to fread function but to no avail at this point.
Regards,
-Eric