Discussion in "8051 Discussion Forum" started by    say2paul    Jul 9, 2008.
Thu Jul 10 2008, 01:35 PM
Have you read this Paul
Thu Jul 10 2008, 01:41 PM
It is really a nice theory to understand basic concepts of Serial communication, thanks Colin.

But I am looking for some real world example/circuit that can help me to achieve IR serial communication between PC-8051 or 8051-805.
Thu Jul 10 2008, 02:56 PM
simply connect the output pin of TSOP with rx pin of 8051, there is nothing special to be done at the receiver side.

For transmitter i think discussion already going on in other thread.

PS: Please do not create multiple thread for similar problems
 say2paul like this.
Thu Jul 10 2008, 03:32 PM
Thanks for the support!
Fri Jul 11 2008, 02:41 AM
Hi Paul...
Would be better if you try and implement the receiver in software( what is called bit banging) rather than use the 8051's hardware uart.Ultimately for SIR communication with the 8051 you'll have to use a software approach.The 8051's hardware uart won't work with the SIR protocol.
You can refer to this page for a s/w uart implementation... http://www.8051projects.net/serial-communication/software-uart-8051.php

Another point of concern is,using a tsop would call for using a 36 or 38k modulated signal. Simply transmitting some data from the mobile and expecting the tsop to decode it and send it to the 8051 won't work.The sir frame has to 'carried' by a 38kHz carrier.
I had explained about this in one of your other threads(and that's why we always request to keep a single thread) but it seems you've overlooked it.
Fri Jul 11 2008, 05:02 AM
Thanks Sashi,

The link you mentioned above is good but not for me, as I don't understand assembly language. I think you are right that I need to implement this in software instead of 8051 hardware UART.

I tried decreasing the baud rate to 2400 (TH1=0xf4) and send the data from mobile phone using IrSIR at "2400 bps, 8 data bits and 1 stop bit". When I send data from mobile phone to the TSOP 1738 directly connected to RX pin of 8051, I received garbage characters (monitoring on hyper terminal connected to 8051).

FYI: I am not using any capacitor/resistance as discussed in the datasheet of TSOP 1738, rather I directly connected GND to ground, Vs to 5V and data pin to the RX pin of 8051.

P.S. you are right I should stick to 1 thread. But if you noticed for past few days, I am sticking to this thread. So I would request you to ignore other threads and please provide me support for IR in this thread.
Fri Jul 11 2008, 07:49 AM
Hi Paul...
The Rx pin of the 8051 is meant for uart data.Sending SIR data to the Rx pin will not work as both the protocols are different(even if you use a low baudrate,stop and data bits similar to a uart).
What you have to do at the micro is first forget about the Rx pin,receive the tsop data at regular io pin (you must poll the pin at regular intervals according to the timing of the irsir protocol and store the polled bits in an array or buffer).
Then you must parse this buffer stripping off any start/stop bits and arriving at the actual data.

Like I already pointed out,the irsir signal coming from your mobile is, in all probability, not modulated at 36/38kHz.Thus the tsop will not be able to demodulate and send the actual frame to the micro's pin.All you may receive could be junk.

So you'll have to send a modulated signal from your mobile for the tsop to work.
 say2paul like this.
Fri Jul 11 2008, 08:13 AM
Thanks Sashi, but the link you pointed is in Assembly language. Also the pin mentioned in the link are the same RX/TX pin of 8051. Should I change those from pin 3.0/3.1 to some other pins?
Fri Jul 11 2008, 09:36 AM
Hi say2paul,

i think its your lucky day !

from yesterday night i have been working on your project (micro 2 micro Ir link) and finally got success,

here are my project pics:

project description:

every time a button is pressed on the Tx micro, numbers from 0 - 9 are transmitted serial thru UART at 1200bps baudrate and Rx micro decodes the ascii numbers and rips off the ascii component and displays the numbers on 7 seg led display.

getting a stable 38Khz carrier from 555 was tough and my method of modulating is different from what is mentioned in the forum and works perfectly

here's the video too :



[ Edited Fri Jul 11 2008, 09:39 AM ]
 say2paul like this.
Tags IR communicationTSOP1738 IR communication38khz IR communication8051 IR communication
Fri Jul 11 2008, 09:59 AM

You rock buddy...

Great, this will surely help me a lot. I watched the video as well, can you please share the circuit diagram and the C code so that I can immediately start working on it.

Thanks so much!

Get Social


Powered by e107 Forum System


Thu Jun 11 2020, 06:27 AM
sir could please send the code for I2C and wifi interfacing with 8051
Tue May 19 2020, 10:29 PM
Does anyone have microcontroller programming software for STC15F104W (core 8051, 4 k, 128 byte, 6 I/O pin, UART ... DIL8), that works?
Sat May 02 2020, 07:38 PM
Tamu Gurung
Hi I am looking for a assembly language program for a digital decimal counter. Time counts max limit of 2 mins starting from 2.00 mins and ending at 0.00. time is to be displayed on 4 7-segment LED displays. Edsim51 simulator to be used. Thanks
Wed Mar 25 2020, 01:39 PM
Sir kindly send the code file i2c for 8051
Fri Mar 13 2020, 10:36 PM
@ Rohitnani,ABEBE..which project ?
Fri Mar 13 2020, 12:55 PM
how can get hadwere of this project
Sat Mar 07 2020, 05:11 PM
Sir, Could you please send me the zip file input password....
Wed Feb 26 2020, 04:58 PM
Peter Parker
Is it possible to send multiple messages using only 1 GSM module?
Sat Feb 01 2020, 10:12 AM
Pearl Olin
Wed Jan 22 2020, 06:16 PM
I m getting errors while simulation process during interfacing socket output and lcd... Can i get the report of ur project which is same as us.



Thu Jun 25 2020, 03:46 PM
Mon Jun 22 2020, 03:03 PM
Tue Jun 16 2020, 05:10 PM
Sat Jun 13 2020, 09:43 PM
Thu May 21 2020, 12:44 PM
Thu May 21 2020, 01:28 AM
Wed May 20 2020, 07:05 PM
Wed May 20 2020, 11:52 AM


Guests: 121, Members: 0 ...

most ever online: 182184
(Members: , Guests: 182184) on 06 Aug 2010: 05:37 AM

Members: 38215
Newest member: Mirza123