Discussion in "8051 Discussion Forum" started by    say2paul    Jul 9, 2008.
Thu Jul 10 2008, 07:05 pm
#11
Have you read this Paul
http://edsim51.com/8051Notes/8051/serial.html
Thu Jul 10 2008, 07:11 pm
#12
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, 08:26 pm
#13
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, 09:02 pm
#14
Thanks for the support!
Fri Jul 11 2008, 08:11 am
#15
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, 10:32 am
#16
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, 01:19 pm
#17
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, 01:43 pm
#18
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, 03:06 pm
#19
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 :

http://www.youtube.com/watch?v=0sAAqnhv7p4

Arun







[ Edited Fri Jul 11 2008, 03:09 pm ]
 say2paul like this.
Tags IR communicationTSOP1738 IR communication38khz IR communication8051 IR communication
Fri Jul 11 2008, 03:29 pm
#20
WOWWWW!!

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

Information

Powered by e107 Forum System

Downloads

Comments

EdwardFew
Mon Mar 18 2024, 01:14 pm
EmeryPah
Mon Mar 18 2024, 11:51 am
RobertMax
Sun Mar 17 2024, 10:22 pm
DanielJar
Fri Mar 15 2024, 06:52 pm
Tuzaimecor
Fri Mar 15 2024, 02:32 am
PromotionFoode
Thu Mar 14 2024, 08:11 pm
EdwardGeawn
Sun Mar 10 2024, 12:24 pm
ZacharyShado
Sat Mar 09 2024, 10:04 am