PIC and USART problem

Status
Not open for further replies.

Cheetos

Member level 3
Joined
May 26, 2011
Messages
57
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Visit site
Activity points
1,700
I was trying to use USART of my PIC. Is it right that i get 3 volts at my Rx pin and 4 volts at my TX pin??
 

output always vcc or 0v....use max232 if u want to to serial port of pc.
 

thank you all for your replies, may i ask what is the problem with my code if this is happening?
this is my code
void main(){
char buff=0; // usart data are char, not float
PORTB = 0x00;
TRISB = 0x00;
TRISC = 0xBF; // only TX pin is made output on port C

Usart_init(9600);

while(1){

if(Usart_Data_Ready()){
buff=Usart_Read();
Usart_Write(buff);


}
}

}

plus this is what my zigbee schematics look like the pin headers are connected to rx and tx of my PIC. Initially without the xbee, the Vcc reading is 3.33 volts. When i attach the xbee module it goes down to 3.0 volts, what can be the problem?


 

waht is your vcc? 5V or 3v3?
Your zigbee module might be loading your pics IOs. You can use series resistor on those lines around 100-220ohms.
By the way RX may need a pull up resistor to VCC.
 

the vout of the regulator is 5V, the resistance values of each resistors are 4.7k. i took the voltage before R2 that gives me 3.3V. another thing, when i disconnect the connection at rx and tx between my pic and zigbee and with my zigbee attached to that circuit, it gives me a reading of 1.8V.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…