Hello,
I have a product where we need to send a string to a slow serial peripheral (9600 baud) and the messages can be about 100 bytes at a time. I currently have this working tx function:
unsigned int i, len;
len = strlen(_ptr);
for(i=0 ; i<len ; i++)
{
while(!(UCA2IFG&UCTXIFG));
UCA2TXBUF = (unsigned char) _ptr[i];
}
while(UCA2STAT&UCBUSY);
However, since the baud rate is slow, this causes the CPU to spend a lot of time waiting. What is the best way to change this to an interrupt driven routine, or something to unburden the CPU?
Thanks,
Derek