On Tue, 15 Feb 2005, Hulatt, Jon wrote: > However, even without it, my code doesn't work right. > > while( *data++ ) > { > // Transmit a byte > while(BusyUSART()); > putcUSART(*data); > } > > What the Microchip compiler is doing for that is basically while > (*(data++)) , so the first char is always missed. My bad. Or is it? I'm > going to check the text books today to see what the ANSI operator > precedence should be. I thought that would work. The problem has nothing to do with operator precedence. When you first enter your while loop while( *data++ ) ...you test *data, then increment data. When you get to putcUSART(*data), data has already been incremented, and references the second byte of the string. I would suggest: unsigned char ch; while ((ch = *data++) != 0) { while(BusyUSART()) ; putcUSART(ch); } This avoids the code size cost of dereferencing the pointer twice. -- John W. Temples, III -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist