The following from Microchip seems clear... >From DS30292B-page 33 (the '873 datasheet section 3.3 PORTC and TRISC Registers): When enabling peripheral functions, care should be taken in defining TRIS bits for each PORTC pin. Some peripherals override the TRIS bit to make a pin an output, while other peripherals override the TRIS bit to make a pin an input. Since the TRIS bit override is in effect while the peripheral is enabled, read-modify-write instructions (BSF, BCF, XORWF) with TRISC as destination should be avoided. The user should refer to the corresponding peripheral section for the correct TRIS bit settings. ----- >From DS30292B-page 95 (the '873 datasheet section 10.0n on USART): Bit SPEN (RCSTA<7>) and bits TRISC<7:6> have to be set in order to configure pins RC6/TX/CK and RC7/RX/DT as the Universal Synchronous Asynchro-nous Receiver Transmitter. ---------- end of cuts from '873 datasheet ---------- In Microchip lingo "set" means make the bit a 1. The bottom line, don't do read-modify-write operations on a TRIS register that is controlling pins with another active peripheral, such as the TRISC register when using the UART or CCP. --- James Newton (PICList Admin #3) mailto:jamesnewton@piclist.com 1-619-652-0593 PIC/PICList FAQ: http://www.piclist.com or .org -----Original Message----- From: pic microcontroller discussion list [mailto:PICLIST@MITVMA.MIT.EDU]On Behalf Of Tom Handley Sent: Saturday, May 13, 2000 00:28 To: PICLIST@MITVMA.MIT.EDU Subject: Re: 16F873 Uart transmission problem Walt, I just took a look at the Mid-Range Reference Manual (DS31018A) to see if there was any additional info. On page 18-2 they also mention setting the related TRIS Bits though they are a bit obscure compared to the data books I've used. Since this comes up fairly often, it would be nice to hear what Microchip has to say on this. - Tom At 08:31 AM 5/12/00 -0700, Walter Quitt wrote: >I've dug out my Midrange Referenace manual so >I can figure our what 2Tad (ADC stuff) is and >will look at the serial comms references. I am almost >sure the ANs associated with serial comms also >set RC7/RC6 to Input/Output. But I'm gonna look. >This is beginning to bug (pun intended) me. :-) >-W > >-----Original Message----- >From: Tom Handley [mailto:thandley@TELEPORT.COM] > > Walter, apparently most folks don't have problems setting RC6 >to output but a few have. In anycase, All the data books for All >the midrange PICs with on-board USARTs say to set Both RC6 and RC7 >to inputs so why not do it? I've been doing that with a variety of >devices for 5+ years with no problems... > > - Tom ------------------------------------------------------------------------ Tom Handley New Age Communications Since '75 before "New Age" and no one around here is waiting for UFOs ;-)