View previous topic :: View next topic |
Author |
Message |
balaji
Joined: 30 Mar 2010 Posts: 21
|
XBEE with 16F877A |
Posted: Thu Apr 15, 2010 2:26 am |
|
|
Hai ,
I am constructing a project based on XBEE series 1 module. The problem is my MCU PIC 16F877A and dsPIC30F3010 is working on 5V and XBEE on 3.3V. Shall i directly connect RX/TX (TTL level signals) to XBEE(3.3V) or any level shifter is must.
Pls help. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19544
|
|
Posted: Thu Apr 15, 2010 4:46 am |
|
|
Multiple parts to the answer.
For the PIC's TX line, add a resistive divider. Not doing so, risks drawing excess current from the PIC, and damaging the 3.3v input.
For the RX line, it depends on whether you are using the hardware UART input (a 'must' really, if you want to do other things, and don't want to miss data). If so, then, 'yes', a level translator is a must. The UART input, on the PIC running at 5v, requires the signal to go up to 4v. Using a 'software' UART instead, depending on the pin chosen, you _may_ be able to operate without a transceiver, but at the cost of potentially losing data, not being able to do other things while receiving, etc. etc..
Best Wishes |
|
|
balaji
Joined: 30 Mar 2010 Posts: 21
|
need much information |
Posted: Thu Apr 15, 2010 5:43 am |
|
|
Thanks for your reply. I really need both Tx/RX pin to be connected becoz my project requires Full duplex comm. Hence kindly suggest me the level convertor chip |
|
|
asmallri
Joined: 12 Aug 2004 Posts: 1635 Location: Perth, Australia
|
Re: need much information |
Posted: Thu Apr 15, 2010 6:26 am |
|
|
balaji wrote: | Thanks for your reply. I really need both Tx/RX pin to be connected becoz my project requires Full duplex comm. Hence kindly suggest me the level convertor chip |
I don't think you will need one. I suggest dropping the PIC +5V to +4.5 - this is enough to let the PIC run happily and bring the supply voltages closer together. Then connect a 2.2K resistor between Tx out of the XBee and Rx of the PIC. Connect a 1.1K resistor from the PIC Tx pin to the XBee Rx pin and connect a 2.2K resistor from the XBee Rx PIN and ground. _________________ Regards, Andrew
http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!! |
|
|
rnielsen
Joined: 23 Sep 2003 Posts: 852 Location: Utah
|
|
Posted: Thu Apr 15, 2010 9:52 am |
|
|
Quote: | I don't think you will need one. I suggest dropping the PIC +5V to +4.5 - this is enough to let the PIC run happily and bring the supply voltages closer together |
This will not work. The spec sheet states that the RX pin is a Schmitt Trigger input and the VIH (minimum input level to register a High) is 0.8 * VCC. If VCC is lowered to 4.5V then the minimum level, to register a high, would be 3.6V. Since the XBEE runs at 3.3V, this will not be high enough.
I have used MAX3371 level converter in several of my project that use XBEE's and it works flawlessly. If you only need to send data to the XBEE then a voltage divider will work fine. Otherwise, if you need to send data out you will need a level converter.
Ronald |
|
|
balaji
Joined: 30 Mar 2010 Posts: 21
|
|
Posted: Thu Apr 15, 2010 11:33 pm |
|
|
MAX3371 is single channel level shifter. Can you suggest any chip that has dual channels? Or shall I use 74LVC4245 buffer? |
|
|
rnielsen
Joined: 23 Sep 2003 Posts: 852 Location: Utah
|
|
Posted: Fri Apr 16, 2010 8:29 am |
|
|
I've never used that part but, after looking at the spec. sheet, it might work. You'll need to be the one that determines the differences between real-estate and cost of each part. For using both TX and RX signals, I've just used two max3371 parts. You could go to Maxim's site and see if they might have something you would like. They have several option available.
Ronald |
|
|
asmallri
Joined: 12 Aug 2004 Posts: 1635 Location: Perth, Australia
|
|
Posted: Fri Apr 16, 2010 10:13 am |
|
|
rnielsen wrote: | I've never used that part but, after looking at the spec. sheet, it might work. You'll need to be the one that determines the differences between real-estate and cost of each part. For using both TX and RX signals, I've just used two max3371 parts. You could go to Maxim's site and see if they might have something you would like. They have several option available.
Ronald |
I would use resistors from the PIC Tx to the XBee RX - its not as though you are concerned with loading at high speed as the XBee supports a maximum of 250K bps and I have used dividers without problem at 10Mbps _________________ Regards, Andrew
http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!! |
|
|
balaji
Joined: 30 Mar 2010 Posts: 21
|
74HCT125 |
Posted: Mon Apr 19, 2010 6:46 am |
|
|
Thanks for all your support.
I planned to put 74HCT125 buffer between the MCU and XBEE and zener of 3.3V before RX pin of XBEE. I think it must work.
Any comments??
pls include your resistor value |
|
|
balaji
Joined: 30 Mar 2010 Posts: 21
|
It works |
Posted: Wed Apr 28, 2010 9:28 pm |
|
|
hai all,
I tried the circuit with 74HCT125 and 3.3V zener. It works.
Thanks all |
|
|
|