When I asked customer support a couple of weeks ago: " Dear customer, Basically STDIO printf will ultimately call the write( ) function which you can refer to its source code in your C30 installation directory i.e ...\MPLAB C30\src\pic30\write.c. You can redirect its stdout to other peripherals based on the write.c source code. Or you also can write your own write.c code to direct the stdout to your wanted periphers which will override the original write function since it is defined as 'weak' attribute. " Phil WH Tan wrote: >>Where do I set the destination device (UART1, UART2) for printf? >> >>I can't even find the source for stdio.h >> >> > > >Hi Tom, > >The stdio library will direct its output to a fuction call write() (forget >its prototype, but I believe it's explained in the library manual). If you >can find the source (I'm not sure if it included in the C30 package) you'll >find that it will output to UART1. > > >Best regards, > >WH Tan > > > -- -------------------------------- Long ago when men cursed and beat the ground with sticks, it was called witchcraft.. Today, it's called golf. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist