On 21/06/2010 21:27, Isaac Marino Bavaresco wrote: > I was getting really weird behavior from a PIC16F648A: > > The serial data out was available at both RX (RB1) and TX (RB2) pins. > At first I suspected that both pins could be shorted together outside of > the chip, then I noticed that the RX pin signal was inverted. > Very odd, because I don't have any inverter on the board, not even a > transistor. > > After too much fuss (even cutting tracks and removing components), I > found that I had the RX and TX pin directions reverted (TRISB register). > Then I corrected the pin directions and everything worked OK. It is > worthy noticing that bit CREN at RCSTA was turned off also. I would be interested to know what values you ended up with for TRISB1 = and TRISB2. The following comment is taken straight from the datasheet, = page 80: "TRISB<1> and TRISB<2> should both be set to =911=92 to configure the RB1/RX/DT and RB2/TX/CK pins as inputs. Output drive, when required, is controlled by the peripheral circuitry." I noticed this for the first time yesterday when setting up USART on an = 18F, but it appears to be the same for the 16F648A too. Perhaps this is related to the problem you are having and maybe = following that advice would be the best. David -- = http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist