I need to transmit a string of message between two Radio frequency transmitter. The message will be stored a microcontroller (e.g. 8051). How to go about writing a program for it and how to interface between the micrcontroller and the transmitters. I am still an amauteur when comes to embeded programming. Any source code or info on this ?
Alan, it's really quite easy to solve your problem. Let me give you a few pointers. Most of the 8051 family microcontrollers are equipped with a serial port. The micro itself has two pins named TxD and RxD (Transmit and Receive). If you connect these two pins to the transmitter and receiver, you're halfway done! Now you have to set up the serial port, and write out whatever you want. This is done by printf() eg. printf("Hello") writes the string "Hello" to the transmitter. This is just a quick overview. If you're interested, let me know what Baud rate you want to use, and I'll send you a sample program.
Thanks for your reply. The buad rate is not an issue as I just need to send maybe five to six digits of numbers over on the transmitter side. On the receiving end , there will be a look-up table to compare the message it received. If the message matches the codes in the look-up table, some action will be taken (e.g announcement). I would appreciate if you could send me a sample program to give me a headstart to my project. Pls send to fowler10@singnet.com.sg. Thank You.
You can find sample serial IO code in the Support section of this site, and in the Examples folder in your C51 installation. The fact that there is an RF portion in the serial link is of no consequence whatsoever. (in fact, for debugging, you should start with a direct-connected link, before introducing the vagaries of RF...)
Christo, Can you send me a sample source for 8051 microcontroller interface with an RF transmitter Regards, T Shivakumaar
Hi there, I'll send you some code, could you give some more details on the following : 1.) Is it for bidirectional communication? (Transmit and Receive) 2.) How much data is involved? 3.) What microcontroller are you using? 4.) Which pins of the micro are involved? Kind regards Christo
Are you sure that built-it serial port is correct issue for this task? I dont know the part number of RF-chip used; you know, many ones do not use simple RX/TX interface but I2C-like or even third-party signaling... BTW, similar problem is 8051 <-> IR-transivers communication: most ones use 1/6 duty signal cycle and so standard UART (duty 1:1) cannot be used directly :(
OK, I don't know if we're talking about the same thing here. I'm talking about a Radio Frequency transceiver interfaced to a 8051 type microcontroller, not infra-red transceiver. The protocols of these two differ a lot. If you're using RF transceivers, it's by far the most reliable, and easiest to use the microcontroller's UART. You simply use asynchronous serial data transmission, and the transmitter converts it to RF signals. The inverse of this is done at the other end, and the data received at the other end is the same as that which is transmitted. I KNOW this because I did it like this several times, and it worked. If you look at the big picture, this is a datacomms setup (only difference in OSI physical layer) , and the medium is just a pair of RF transceivers, instead of twisted pair. Infrared is something different, but if you have a serial to IRDA converter, you can use infrared in the same way.
Hi, I want to exchange data bit between pc and microcontroller for a project .I am not familiar with 8051 much. I want to know how much baud rate is to be choosen so that i can succesfully transfer data bits.The data start with start bit then 8 bits of data. Please help me in writing code. thankyou.
I agree that using the serial port is the easiest way to hop data between microcontrollers using RF. Here are some websites for companies that make simple RF devices that you can hook up directly to your RXD and TXD lines and hope the data. (you dont need a MAX232 or other variant rs232 line drivers on the transmit end, you may need one on your recieve end depending on your setup. If you want to hop data from the micro to your PC, you need to put the RS232 tranceiver between you reciever and the PC) http://www.linxtechnologies.com http://www.maxstream.net http://www.microhardcorp.home Their products range from devices that tramsmit a a few feet for a few dollars to 20 miles for a few thousand. The big questions is how much data, in what format, and how fast. The simple and cheap wireless links rarely go above 9600 Baud without dropping packets. MG
You mentioned you have successfully interfaced a micrcontroller and an RF transmtter. I will be very much appreciated if you can send me the source code for that. Thany You.
heloo i want block diagram and divice
Do you have the setup in circuit diagrams and the source code for the 8051 ?
Hi Christo, I am facing problems with interfacing a 8051 to RF receiver module. Can you give some codes to start with? Thanks
please let me know the solution asap
Albert, sorry I took so long to reply. I've been very busy the past few weeks. OK here's the good news. I sorted the RF link dilemma! At this stage I have written code for VERY EASY interfacing to a RF Transceiver, but I used a PIC in this application(against my personal preference)! I'm in the process of putting this code together and getting it rock-solid and bulletproof so we can use it in Keil. As soon as I'm finished with it, I'll let everyone know. By the way, the Transceiver I used is the XTR-434 from Aurel. I can certainly recommend this module. It's easy to use, small, and doesn't cost you an arm and a leg! Kind regards Christo v.d. Merwe