Discussion in "8051 Discussion Forum" started by    say2paul    Jun 20, 2008.
Wed Jul 02 2008, 10:53 am
#21
why you want to use MAX3100? also you need an 8051 with SPI peripheral onchip.
Wed Jul 02 2008, 03:08 pm
#22
I do not want to use MAX3100, sashijoseph suggest me that.

I want to use IrSIR instead of IRDA, I think that will be easy to implement.

The problem with IrSIR is that hoe will I watch the IrSIR at 8051's end? I can modify your IR Switch project where you are controlling 8 relays using an IR remote control.

I want to do something simlar to that i.e. controlling 8 relays from a mobile phone using IR but not from an IR remote control.

Now the problem is that what frequency should I use to send signal to your IR Switch project? Or can I change your code in such a way so that I can add my own set of frequencies in that?
Thu Jul 03 2008, 01:43 pm
#23
Sorry for the late reply....been real busy.
Since you're not keen on irda,max3100 is out of the picture.

Using SIR would call for bypassing the irda stack in the mobile.You would have to directly use the ir port.Do you know the exact api's which would allow you to do so?
Which mobile and Symbian version are you using?

Supposing you can talk to the IR port,then using SIR you would have to generate a 36-38kHz frequency.This is the fundamental modulation frequency used by most of the TV-remote protocols.
If you are able to generate that frequency then the rest is simple.You can either use your own protocol or else a standard one like RC5.

RC5 uses a series of 14 bits which apart from 2 start bits includes a toggle bit,5 address bits and 6 command bits.You can embed your data in the command and/or address bits.
Further, RC5 uses Manchester encoding in which each bit is composed of 2 half bits.Thus for a 1,the first half bit has to be 0 and the 2nd half bit 1.
For 0 the 1st half bit has to be 1 followed by 0 for the 2nd half bit.

Thus if you have to send a '1' using RC5 protocol,your mobile,for the 1st half bit should output 0 Hz and for the next half bit should output 36kHz.This is the modulation part.Similarly all the 14 bits have to be modulated.At the 8051 the TSOP will demodulate this series of pulses,effectively removing the 36kHz carrier and leaving you with a string of 14 ttl level bits.

So the main thing is generating a frequency.In a normal uart you could do this by sending a series of bytes which would generate the reqd. frequency.
For eg. if the baud rate is 76800 bps (only for demonstration) and the data format is 8N1(8 data bits,1 start,1 stop,no parity) then you could send a series of 0x55 bytes to generate the frequency.......
0x55 = 01010101b .To this is attached a start bit(0) and a stop bit(1).So the output on the line would look like this...
0101010101 (start bit followed by lsb of data byte,the remaining data bits and finally stop bit).
A sequence of 3 bytes would look like this
010101010101010101010101010101

Now each bit is ~13us (1/76,800).Thus the cycle time for the above waveform is 13+13=26us.Thus frequency of the waveform is 1000/26 = 38.46kHz.

I hope you got the idea.You'll have to do sth similar keeping in mind the SIR bps which is 115200 and the data framing format which you'll choose.
 say2paul like this.
Thu Jul 03 2008, 03:40 pm
#24
Very interesting...

Thanks a lot sashijoseph, you are a real supporter!

BTW I am using Symbian V7.0 and the target device is N3230. Yes, there are API's that supports the IrSIR communication instead of standard IRDA protocol.

As I do not have any electronics background (I am an IT Pro), its still difficult for me to implement this. But I will definitely try to implement it!
Fri Jul 04 2008, 11:07 am
#25
Hi paul
It will make your project really simple if you will be able to send uart data via IrSIR, because that will reduce not only your programming but also make you do more things faster.

You can directly connect the TSOP's o/p pin to controller's RX and you can use 8051's UART to read data.

to send you need a simple IR circuit's o/p anded with TX pin of 8051's UART.

Make sure that combination of TSOP17XX and frequency should match e.g if you are using TSOP1738 then in your software (phone side) frequency should be 38Khz
similarly for other frequency.

PS: Please give some startup information on symbian programming and SDKs. I want to target on OS9 FP1
Fri Jul 04 2008, 02:31 pm
#26
Is there a big difference of frequency between TSOP 1738 & TSOP 1736, I mean can I replace TSOP 1736 in your IR Switch circuit with TSOP 1738?

Is your IR Switch circuit based on UART received by TSOP?

P.S: Following two links will be sufficient for you to start Symbian C++ programming:

http://developer.symbian.com/main/getstarted/
http://www.newlc.com/Getting-started-with-Symbian,134.html

Mon Jul 07 2008, 08:45 pm
#27
thank you so much for links

what about sdk and all?
Mon Jul 07 2008, 08:48 pm
#28
sdk and all other links are provided in those two links. Please go through them. If you still have problem dowlodlading the sdk then mail me I will personally help you on it.

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

FrankTrelm
Tue May 14 2024, 10:39 am
BillyTum
Tue May 14 2024, 09:08 am
Loganbag
Tue May 14 2024, 04:05 am
MichaelMog
Tue May 14 2024, 03:58 am
ThomasGaxaW
Mon May 13 2024, 05:33 pm
RobertInfup
Mon May 13 2024, 04:28 pm
Joshuatem
Mon May 13 2024, 08:30 am
RaymondPex
Mon May 13 2024, 03:24 am