Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

16F690 and xbee -> usart problem

Status
Not open for further replies.

raffel0

Newbie level 4
Joined
Aug 10, 2009
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,335
Hi all, I linked a Xbee 802.15.4 (series 1) to a 16F690 PIC as you told me some post ago.

Here is the scheme and the photos of the circuit:

**broken link removed**
**broken link removed**
**broken link removed**
**broken link removed**



The pic's code (mikroC pro) is the following:
Code:
char buff = 0;

void main(){

  ANSEL = 0;
  ANSELH = 0;

UART1_Init(9600); // init USART
Delay_ms(100);


while (1) {                    // Endless loop
   if (UART1_Data_Ready())

   {     // If data is received,
     buff = UART1_Read();     //   read the received data,
     UART1_Write((char)'K');       //   and send data via UART
   }
   
   }
}

With these config bits:
Code:
CONFIG   :$2007 : 0x03F4

alias

Internal Rc no clock
Master Clear Enable External
Brown Out Detect Enabled, SBOREN disabled


Xbee modules are able to communicate perfectly (100% success on loopback test via x-ctu) and the pic is able to communicate perfectly in the test via pickit2 on the USART COM port (it answers with the character 'K' to every byte I send).

But as linked above, xbee cannot communicate with the pic and I get 0% success rate in the x-ctu test (always timeout).

Baud rate is 9600 for both of them.

Someone can help me please?
 

Hi

Check if you didn't mix TX & RX signal ?

All the best

Bobi
 

Problem solved bob, the voltage from the xbee (3.3V) was not enough for the pic to "activate" its port.

I solved with a voltage-shifter circuit :D
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top