IR switch using TV remote controller(RC5)
Sun Sep 06 2009, 11:44 am
hi thanks for your help,
As i analyzed the program,I got few doubts,regarding the time period. this
protocol uses Bi-phase coding. hence "0" or "1" bits are of same period i.e. 1.728ms.
Accordingly, first it sends two start bits("1").hence it would take time 2*1.728ms=3.456ms. but in the program u have written delay for 3.024ms ! could u explain it please ?
I was referring to RC5 protocol in the following web site,there he considers 1.778ms for every bit ? So I'm getting confused :mad
http://www.sbprojects.com/knowledge/ir/rc5.htm
I would like to study RC5 protocol,if u know any site please let me know or if u can send any files regarding it I would be thankful.:-)
regards,
lohi bargur
As i analyzed the program,I got few doubts,regarding the time period. this
protocol uses Bi-phase coding. hence "0" or "1" bits are of same period i.e. 1.728ms.
Accordingly, first it sends two start bits("1").hence it would take time 2*1.728ms=3.456ms. but in the program u have written delay for 3.024ms ! could u explain it please ?
I was referring to RC5 protocol in the following web site,there he considers 1.778ms for every bit ? So I'm getting confused :mad
http://www.sbprojects.com/knowledge/ir/rc5.htm
I would like to study RC5 protocol,if u know any site please let me know or if u can send any files regarding it I would be thankful.:-)
regards,
lohi bargur
Tue Sep 08 2009, 08:51 am
hi thanks,
The site u suggested was very useful.the information provided in two sites are contradict to each other regarding the time period of "0"/"1" bit.:(
1.http://www.ustr.net/infrared/infrared1.shtml --- in this site Time period=1.728ms
2.http://www.sbprojects.com/knowledge/ir/rc5.htm ---- time period=1.778ms
I think first one is much appropriate.Am I right ?
in the program I have one doubt.....this regarding delay generated for Start bits(AGC bits).....
main:
jb IR,$ ;Wait for first bit
mov VAR1,#255 ;3.024mS delay
djnz VAR1,$
mov VAR1,#255
djnz VAR1,$
mov VAR1,#255
djnz VAR1,$
mov VAR1,#255
djnz VAR1,$
mov VAR1,#255
djnz VAR1,$
mov VAR1,#100
djnz VAR1,$
mov c,IR ;Read Flip bit
mov FLIP,c
As soon as the signal arrives at IR(P3.3 input port),first we receive Start bits,in which we are not interested,hence a delay of 3.456ms must be generated...but in the program the delay routine is for 3.042ms ....kindly let me know,why it is so ?:-s
regards,
lohi bargur
The site u suggested was very useful.the information provided in two sites are contradict to each other regarding the time period of "0"/"1" bit.:(
1.http://www.ustr.net/infrared/infrared1.shtml --- in this site Time period=1.728ms
2.http://www.sbprojects.com/knowledge/ir/rc5.htm ---- time period=1.778ms
I think first one is much appropriate.Am I right ?
in the program I have one doubt.....this regarding delay generated for Start bits(AGC bits).....
main:
jb IR,$ ;Wait for first bit
mov VAR1,#255 ;3.024mS delay
djnz VAR1,$
mov VAR1,#255
djnz VAR1,$
mov VAR1,#255
djnz VAR1,$
mov VAR1,#255
djnz VAR1,$
mov VAR1,#255
djnz VAR1,$
mov VAR1,#100
djnz VAR1,$
mov c,IR ;Read Flip bit
mov FLIP,c
As soon as the signal arrives at IR(P3.3 input port),first we receive Start bits,in which we are not interested,hence a delay of 3.456ms must be generated...but in the program the delay routine is for 3.042ms ....kindly let me know,why it is so ?:-s
regards,
lohi bargur
Wed Sep 09 2009, 11:12 am
Thats the reason i always say, theory goes one way and practical goes other way, if you check my delay routines, they are not exactly the delay i mentioned. The delay mentioned in my comments are theoretical delay, you have to make changes in delay to get correct bits on correct time.
I followed USTR's description but later i made lot of changes in delay which is i guess closer to SB Project's description. So i suggest you follow the second link.
In my code i am reading every bit in the first half of Manchester coded bit. so if remote is sending bit 1, Manchester encoding will be [1,0] if remote is sending 0 encoding will be [0,1]. delay comes around 3.556ms, but again you may need to manipulate it to get right bits if it doesnt work on first shot.
I followed USTR's description but later i made lot of changes in delay which is i guess closer to SB Project's description. So i suggest you follow the second link.
In my code i am reading every bit in the first half of Manchester coded bit. so if remote is sending bit 1, Manchester encoding will be [1,0] if remote is sending 0 encoding will be [0,1]. delay comes around 3.556ms, but again you may need to manipulate it to get right bits if it doesnt work on first shot.
Tue May 04 2010, 10:20 pm
i m interested in making a project in which more than three things can be switch using tv remote
is it posible
if it is plz send me related code and ckt using tsop1738
it wil b gr8 help for me
is it posible
if it is plz send me related code and ckt using tsop1738
it wil b gr8 help for me
Sat Jun 05 2010, 03:56 pm
use the sample project given in RC5 library code. it can switch 8 devices.
Thu Sep 30 2010, 10:35 pm
This Project is TESTED OK by me - no hassles worked in first attempt . Go on .....
Powered by e107 Forum System