Robert Gehring

56F8013 writing to SCI QuickStart

Discussion created by Robert Gehring on Feb 18, 2008
Latest reply on Feb 29, 2008 by Giacomo Petrini
I am using CW8.0 with the 56F8013Demo board.  And I am using Quick Start codes.  I have everything setup correctly, based off the sample applications.  I can send data with
"    write(SCI_0, BUFFERED, buff, sizeof(buff)-1);   "
code as long as buff is a const char definted above main as
" char buff[] = "Hello World";    "
But when I try to send ADC data out to through the SCI like:
volatile UWord16 w1;
w1 = ioctl( ADC, ADC_READ_SAMPLE, 1);
write(SCI_0, BUFFERED, w1, sizeof(w1)-1);
But it errors out complaining "illegal implicit conversion from 'volatile unsigned short' to 'const char *'
I don't know how to make w1 to a const char.  I have tried using sprintf to a char variable, but that didn't work.  Anyone know of any other ideas?

Thank you,