i am doing a project which includes ,IR LED and IR receiver(TSOP 1738)I have to get the receiver output and that output is going to control the stepper motor thro 8051.
I dont know how to write program for receiving the signals from the IR receiver.
can anyone help???
TSOP1738 receive IR signal and remove modulated portion, output pure digital level signal to your processor.
Next step you have to measure the on/off periode of that signal to determine what code is transmitted.
What is at the transmitter side to send the data for ex rc5 remote/ 555 in astable mode with switch etc. with out know the txd side how you can programme.
you can use bascom 8051
it is a basic compiler for 8051
it has a command called " getrc4"
here is an example
Dim New As Bit
Dim Command As Byte , Subaddress As Byte
Reset Tcon.0 'triggered by rising edge
On Int0 Receiverc5
Enable Int0
Enable Interrupts
Do
If New = 1 Then 'received new code
Disable Int0
Print Command ; " " ; Subaddress
New = 0 'reset new bit
Enable Int0
End If
Loop
Receiverc5: 'interrupt routine
'the getrc5 routine uses 30 bytes ! of the stack for measuring
'the interval between the bits
Getrc5(subaddress , Command)
New = 1 'set flag
Return
so it receives rc5 code without tedious programming