Delbert Martin IV <[email protected]> wrote:
I was wondering if anyone could clue me into getting multiple byte
values out the uart
Ive tried a couple of different things:
int i = 0x4508
char *a= &i;
U0TXBUF = a[0];
U0TXBUF = a[1];
What's the problem? Either of those will do, as will other ways, e.g.
union { int i; char c[2] } thingy;
thingy.i = i;
...
U0TXBUF = thingy.c[0];
...
U0TXBUF = thingy.c[1];
But however you do it don't forget to check for the buffer empty before
sending the value...
Paul Burke