Discussion in "8051 Discussion Forum" started by    say2paul    Jul 9, 2008.
Thu Jul 10 2008, 09:35 AM
Have you read this Paul
Thu Jul 10 2008, 09:41 AM
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, 10:56 AM
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, 11:32 AM
Thanks for the support!
Thu Jul 10 2008, 10:41 PM
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, 01: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, 03: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, 04: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, 05: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, 05:39 AM ]
 say2paul like this.
Tags IR communicationTSOP1738 IR communication38khz IR communication8051 IR communication
Fri Jul 11 2008, 05: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


Wed May 20 2020, 03:59 AM
Does anyone have microcontroller programming software for STC15F104W (core 8051, 4 k, 128 byte, 6 I/O pin, UART ... DIL8), that works?
Sun May 03 2020, 01:08 AM
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, 07:09 PM
Sir kindly send the code file i2c for 8051
Sat Mar 14 2020, 04:06 AM
@ Rohitnani,ABEBE..which project ?
Fri Mar 13 2020, 06:25 PM
how can get hadwere of this project
Sat Mar 07 2020, 09:41 PM
Sir, Could you please send me the zip file input password....
Wed Feb 26 2020, 09:28 PM
Peter Parker
Is it possible to send multiple messages using only 1 GSM module?
Sat Feb 01 2020, 02:42 PM
Pearl Olin
Wed Jan 22 2020, 10:46 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.
Tue Jan 14 2020, 11:38 AM
shubham kharade
when i am trying to simulate the program in Proteus 8 professional, I am getting some errors as cannot find module file dhtxx.md can u help me



Thu May 21 2020, 08:44 AM
Wed May 20 2020, 09:28 PM
Wed May 20 2020, 03:05 PM
Wed May 20 2020, 07:52 AM
Wed May 20 2020, 03:15 AM
Tue May 19 2020, 06:08 PM
Tue May 19 2020, 02:22 PM
Mon May 18 2020, 09:50 PM


Guests: 31, Members: 0 ...

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

Members: 38211
Newest member: Davidthils
Forum Activity
xrxx Avatar
Posted By xrxx
Thu Apr 30 2020, 06:59 AM
BCD MULTIPLICATIONAssume that you have to 2 BCD nu...
liqian Avatar
Posted By liqian
Tue Apr 28 2020, 05:26 AM
I happened to see your post and I got many useful ...
ExperimenterUK Avatar
Posted By ExperimenterUK
Tue Apr 28 2020, 04:21 AM
The code is hard to read.Please zip it and attach ...
rogermado Avatar
Posted By rogermado
Sun Apr 26 2020, 01:53 AM
@ExperimenterUK, thanks for your reply. You'll fin...
ExperimenterUK Avatar
Posted By ExperimenterUK
Sat Apr 25 2020, 05:42 PM
Some simulators handle displays better than others...
rogermado Avatar
Posted By rogermado
Sat Apr 25 2020, 03:59 PM
Hello everyone, sorry in advance if i'm not in the...
PHANTOM28 Avatar
Posted By PHANTOM28
Fri Feb 28 2020, 10:25 AM
Hi.I hope you all can help me. I am relatively ne...
ExperimenterUK Avatar
Posted By ExperimenterUK
Fri Feb 21 2020, 05:05 PM
ajay_bhargav Avatar
Posted By ajay_bhargav
Fri Feb 21 2020, 04:45 AM
Yes you can do that.1. Create a channel @Thingspea...
ananyagupta Avatar
Posted By ananyagupta
Thu Feb 20 2020, 03:58 AM
With regards to the particular characters sent to ...