Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
09/14/05 08:56
Read: times


 
Msg Score: +1
 +1 Good Answer/Helpful
#101032 - Circuit idea
Responding to: ???'s previous message
Use the 8052 inbuilt UART to achieve this. Ofcourse you will require 8052 at both sides. The output of Tx at transmitter is passed to NOT gate (reason explained afterwards) and ANDed with square wave at 38KHz aquired using 4047. This is amplified and fed to ir LED(tral6200 or other).
The reciever will be TSOP1738, the output of which is unmodulated.
This ic is active high. So when it recieves nothing o/p is high.
Hence Tx=1, !Tx=0 So, o/p=1. Hence the not gate. Feed this to Rx pin and you have serial communication. Range 6 feet.

Here is the code written in SDCC
Dynamically change the byte to be send.
#Reciever
#include<8052.h>


void initialise(void)


{


PCON&=0x7F;//setting SMOD=0;


TMOD=0x20;//Timer1 in mode 2


TH1=0xE8;//baudrate=1200


TL1=0xE8;


TR1=1;//Start timer 1


SCON=0x50;//recieve enabled mode 1


IE=0x92;//Enable timer0 and serial int.


P1=0x00;//P1 keeps count of data recieved


P2=0x00;//The data recieved


return;


}


void main(void)


{


initialise();


while(1);


return;


}


void recieve(void) interrupt 4


{


RI=0;//clear reciever flag


P1++;


P2=SBUF;


return;


}

#Transmitter
#include<8052.h>


void initialize(void)


{


PCON&=0x7F;//setting SMOD=0;


TMOD=0x20;//Timer1 in mode 2


TH1=0xE8;//baudrate=1200


TL1=0xE8;


TR1=1;//Start timer 1


SCON=0x40;//Serial port mode1 recieve disabled


IE=0x90;//Enable timer0 and serial int.


P1=0x00;//P1 keeps count of data trans


P2=0xAA;//The data to be trans


return;


}


void main(void)


{


initialize();


SBUF=P2;


while(1);


return;


}


void transmit(void) interrupt 4


{


TI=0;//clear transmit flag


P1++;


P2++;


SBUF=P2;


return;


}







List of 8 messages in thread
TopicAuthorDate
IR communication (how to start?)            01/01/70 00:00      
   www.irda.org ?            01/01/70 00:00      
      TV Remote Control is enough...            01/01/70 00:00      
         Wireless Protocol            01/01/70 00:00      
            Protocol            01/01/70 00:00      
            Good resource for IR remote stuff            01/01/70 00:00      
         TV remote control            01/01/70 00:00      
   Circuit idea            01/01/70 00:00      

Back to Subject List