View previous topic :: View next topic |
Author |
Message |
sabertbk
Joined: 11 Jun 2013 Posts: 5 Location: tunisia
|
configuration PIC-xbee |
Posted: Tue Jun 11, 2013 5:10 am |
|
|
How i can transmit information from pic 18F4550 to Xbee?
Can someone help me to create code c for communication between pic and xbee?
thx before _________________ im studient in electronic professional master |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9246 Location: Greensville,Ontario
|
|
Posted: Tue Jun 11, 2013 5:29 am |
|
|
I have a little time with Xbee for a remote greenhouse project.
Xbee modules are very complex and powerful so will take a good deal of time to learn.
Rule number 1. They are 3 volt devices! Be sure to either use a 3 volt PIC or a proper interface to convert the voltages!!
The simplest(easiest) way to connect PICs to Xbee is using the UART-Transparent mode.It's simpler than the UART-API method but not as flexible.
For simple 'peer-to-peer' or 'master/slave' projects(2 Xbees), use the transparent mode.Commands are sent/received via the PIC UART with simple delays to allow Xbee to execute the commands.
Rule number 2. read the datasheets. I found out too late that I can't use the Xbee the way I thought I could. While super powerful for networking,it was a simple thing it wouldn't do in transparent mode, forcing me to use API.A LOT of time was spent on that 'issue'....way too uch time.
Rule number 3. search this forum and google. Millions of xbee users out there,spend the time and see how they use them.
hth
jay |
|
|
sabertbk
Joined: 11 Jun 2013 Posts: 5 Location: tunisia
|
|
Posted: Tue Jun 11, 2013 6:27 am |
|
|
i was search alot of time and i know this rules , but i want found example of program for tansmission betwen pic and Xbee : because after that i want to put EEG signal in pic and send it to Xbee : but first i want help for digital filtering which i must use it input and after can transmit the result to Xbee _________________ im studient in electronic professional master |
|
|
sabertbk
Joined: 11 Jun 2013 Posts: 5 Location: tunisia
|
|
Posted: Tue Jun 11, 2013 3:56 pm |
|
|
I NEED XBee-pc communication scheme using a MAX232
who can help me plz
and i want program on c who can do this transmision
thx before _________________ im studient in electronic professional master |
|
|
rnielsen
Joined: 23 Sep 2003 Posts: 852 Location: Utah
|
|
Posted: Wed Jun 12, 2013 11:02 am |
|
|
XBEE's are 3.3V animals. If your PIC is running at 5V you will need to convert your levels so they can communicate. There are various ways to do this.
Two XBEE's, in default mode(out of the box), will act like a wire cable. No extra configuration, of the XBEE, will be necessary.
If you want the XBEE to talk to a PC then you will need a MAX232 to convert the voltage levels. Again, the XBEE is a 3.3V device so you'll need to convert from 3.3V(XBEE) to 5V(MAX232 input) to +/- 10V(PC levels). Likewise, you'll need to convert the signals coming From the PC down to the 3.3V levels that the XBEE can handle.
Ronald |
|
|
sabertbk
Joined: 11 Jun 2013 Posts: 5 Location: tunisia
|
|
Posted: Wed Jun 12, 2013 4:02 pm |
|
|
Ronald,
can you send me the program which can do all what you was say plz ??
saber _________________ im studient in electronic professional master |
|
|
ezflyr
Joined: 25 Oct 2010 Posts: 1019 Location: Tewksbury, MA
|
|
Posted: Thu Jun 13, 2013 8:17 am |
|
|
Hi sabertbk,
Ronald is describing the hardware interface between the PIC and the XBEE module. There is no "program" that will do all that he describes....
Can I assume that you are a "newbie" to PIC's, without a lot of hardware and programming experience? You can really make your life easier by
operating your PIC and XBEE at the same voltage. The 18F4550 is a 5V device, and the XBEE is a 3.3V device, so they can't be connected
directly together. As already mentioned, there are a lot of ways to resolve this issue, but by far the easiest way is to obtain a
18LF4550 (note the 'LF', not the 'F'), which is a 3.3V device and then you can connect the PIC and the XBEE directly together.
The XBEE sends and receives commands/data via a UART serial port. If you use the 18LF4550, powered at 3.3V, you can directly connect the
UART on the PIC to the UART on the XBEE. Again, both the PIC and the XBEE must be powered at 3.3V to do this!
The connections would be:
PIC UART Tx ----------------> XBEE UART Rx
PIC UART RX <--------------- XBEE UART Tx
My advice would be to get a new chip, the 18LF4550, and get it wired up on a PCB or prototyping board. Then take a first step by getting a
'blinking LED' program to work. After that, wire a MAX232 device to the '4550, and figure out how to send data to the serial port of your PC. The
ability to send data to the PC will be a tremendous aid in troubleshooting the last phase of your project, which is communicating with the XBEE.
There are a lot of resources here on the forum to help you, and a lot of knowledge available from forum members, but you have to do the 'heavy
lifting' on your project, not us. I hope I've given you a 'road map' to get you started with your project!
John |
|
|
sabertbk
Joined: 11 Jun 2013 Posts: 5 Location: tunisia
|
|
Posted: Thu Jun 13, 2013 3:46 pm |
|
|
John
thx alot for your help _________________ im studient in electronic professional master |
|
|
|