Em 1/3/2010 13:31, Michael Rigby-Jones escreveu: > I would suggest that since you are using the printf library function, > it's probably assuming you are also using the supplied functions to open > the USART which is OpenUSART() IIRC. > > If you want to keep code simple and direct, then using printf is not a > good start, it's probably one of the most complex functions in the > standard C library. > > Regards > > Mike > = It all depends on what part you want to be simple, the source code or the object code. Using 'printf' makes the source code much simpler, easier to read and usually directly portable between platforms. I see people using 'printchar', 'printstring', printnumber', etc functions. Although they may think it makes the code simpler, the source code becomes much less readable, and sometimes even the object code becomes less compact than using 'printf'. Yes, 'printf' is sometimes a behemoth, but I prefer using it because my code gets more 'normal', and I can port it across several platforms. I have products that the same source code runs on a PIC18, on a desktop PC and also on an ARM9. Best regards, Isaac __________________________________________________ Fa=E7a liga=E7=F5es para outros computadores com o novo Yahoo! Messenger = http://br.beta.messenger.yahoo.com/ = -- = http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist