Yeah, I got bit by that too....Just posted a few weeks ago.... You need to check the busy flag. My problem was that putcUSART(char) didn't react the same way as putrsUSART(*char). It seemed that putcUSART(char) didn't wait for the previous string to clear through... Once I put a check for busyUSART() into the mix, everything worked alright. Moral of the story.....check the source code in your libs for consistancy.... Just because they come with the compiler doesn't mean that they work EXACTLY as advertised. DD On Sat, 2004-01-10 at 04:12, David Dolheguy wrote: > is a delay really required after sending each charater to TXREG? > > -----Original Message----- > From: "Jason Harper" > Sent: 10/01/04 5:58:01 PM > To: "PICLIST@MITVMA.MIT.EDU" > Subject: [PIC]: UART Help needed to PC > David Dolheguy wrote: > > > static void usartput(unsigned char c) > > { > > while(!TRMT1) > > TXREG1=c; > > } > > This basically says: for as long as there is something in the transmit > buffer already, send the same character anyway... You need a semicolon at > the end of the 'while' line. > > Note that TRMT isn't usually what you want to poll for serial transmission: > it doesn't get set until the character is entirely sent, when you can > actually put another character into TXREG much sooner due to the USART's > internal buffering. Poll the TXIF bit instead. > > Also note that continuously sending the same character is not necessarily > going to result in that character being received at the PC, since there's > no guarantee that it will sync to your start/stop bits. An occasional > pause, of at least one entire character time, will ensure synchronization. > Jason Harper > > -- > http://www.piclist.com#nomail Going offline? Don't AutoReply us! > email listserv@mitvma.mit.edu with SET PICList DIGEST in the body > > -- > http://www.piclist.com#nomail Going offline? Don't AutoReply us! > email listserv@mitvma.mit.edu with SET PICList DIGEST in the body -- Dan Devine "Serving the public since....well, never" dannyboy259@comcast.net -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body