![]() | ![]() | ![]() |
| | |||||||
| General Electronics Chat This forum is for general chat about electronics, eg: Dont know what a part does? Dont know how to read a circuit? Want to get an opinion? |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| Hi, I am interfacing a 433 MHz transmitter receiver pair with PIC 16F73 using the serial port. I have connected the transmitter to another PIC. The transmitter PIC sends data serially, continuously, at baud rate 2400. I can receive the data with the receiver module. I can see the data stream in a scope, whose output is TTL. But when I connect it (the RX output) to the RX pin of PIC, the amplitude drops to 2V and an offset of 1V appears on the scope. I cant receive the data serially. But if I connect the two PICs with wires, the serial port works well and fine. Is it a problem with my RF receiver or do I have to add something else to the circuit?? Thanks!! | |
| |
| | (permalink) |
| probably the RX pin is configured as an output, so you have a conflict on the line. At startup set TRISC (set Bit 7 for RC7 to 1), then set the registers to configure USART properly. | |
| |
| | (permalink) | |
| Quote:
| ||
| |
| | (permalink) |
| You can't send plain RS232 data via RF modules reliably, check my PIC tutorials for a better way of doing it. | |
| |
| | (permalink) |
| Radio data modules should be used with "Manchester data encoding" in order to avoid DC levels as they are capacitively coupled - see http://en.wikipedia.org/wiki/Differe...ester_encoding Nigel has provided a tutorial that covers it: http://www.winpicprog.co.uk/pic_tutorial.htm It does the encoding and serial transmission all in software. The PIC hardware usart cannot do it by itself (Although it is possible to write some code to convert bytes to Manchester encoding then send them via the Usart in similar way). Edit: By the time I finished typing this, Nigel had already replied. Last edited by picasm; 17th January 2008 at 06:34 PM. | |
| |
| | (permalink) | |
| Quote:
If you check the data my tutorials use, you will see that a hardware UART couldn't do it, they are restricted to 7 or 8 bit data. | ||
| |
| | (permalink) |
| Nigel, Thanks for the tutorial. A good one!! But I was receiveing the serial data fairly good with the scope. I have already added headers, and I am sending continuous data.There are no long breaks of any sorts. I get fairly good TTL output with the output unconnected to PIC. for an update, i connected a buffer in between the PIC and the RF module. Now its working, though not reliably. I connected a .1uF tantalum across the power apart from the other discs, now it seems to be a bit ok (though not reliable, i guess.). I still wonder whats really happening.. | |
| |
| | (permalink) |
| Hmm.. Solved. Even though i do not know if it is the right design. The module couldn't drive an input, i guess. Even when i connect it to a 74245, the amplitude went low at times. So what i did was to connect a transistor (BC547) as a switch, and another one(BC 547) to the output to invert it. Now I get a clean signal at the scope even when i connect the PIC. The Manchester coding seems to be interesting, so i guess this will be the last time I use UART with the RF module. Thanks to all for the time. Please correct me if there is anything wrong in connecting two transistors like this. Thanks! | |
| |
| | (permalink) |
| From what I understand, you've inverted the logic of the RS232 (an inverter at either end) - this is mentioned in my tutorial, and provides a crude, less reliable system, which is why Manchester coding (or something similar) is always used. | |
| |
| | (permalink) | |
| Quote:
There was no logic inversion. The transmitter PIC transmitted as usual. The RF module received it, and the output of the RF module was switched by two transistors. I think it was more like a fan out problem of the RF receiver. As I mentioned earlier, the problem is not in receiveing, the problem was RF module could not 'drive' the RX pin of PIC, if it is ok to use the term 'drive' cheers!! | ||
| |
| | (permalink) |
| Considering the PIC input is a CMOS gate, and is VERY!! high impedance, it shouldn't be a problem?. | |
| |
| | (permalink) |
| That was even what I was wondering. But it worked well, really well, with the two transistors rather than a 74245 or a 7404. i tried with RC7 set and RC7 not set. the results were the same. | |
| |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
| | ||||
| Title | Starter | Forum | Replies | Latest |
| Using a PIC microcontroller to interface with a DS1302 real time clock | ssylee | Micro Controllers | 51 | 9th January 2008 09:54 AM |
| pic and mosfet interface | h.d | General Electronics Chat | 16 | 11th December 2007 09:18 PM |
| RF receive using PIC USART | col_implant | Electronic Projects Design/Ideas/Reviews | 11 | 15th November 2007 05:06 PM |
| Rf Pic | flemmard | Electronic Projects Design/Ideas/Reviews | 1 | 9th September 2007 09:34 PM |
| Motor control interface | dreamproject | Micro Controllers | 0 | 31st March 2005 04:48 AM |