Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

help regarding RC-5 protocol

Status
Not open for further replies.

sam08016

Member level 1
Joined
May 9, 2009
Messages
33
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,288
Activity points
1,527
hello
i have a confusion
philips remote use RC-5 protocol and sends data with 36khz carrier frequency..

in order to receive and demodulate it,we have to use a Tsop 1736 or any other demodulator with 36khz freq...
but can we receive signal with with a demodulator which works on 38khz freq???because 1736 is not available....
also that the RC-5 protocol works only on 36khz freq????

thanks
 

u can use TSOP1738
 
Last edited:

    V

    Points: 2
    Helpful Answer Positive Rating
but please tell me that RC-5 protocol works on 38khz????
and if philips remotes works on 38khz then which one?? can u name any???
 

Virtually all remotes use 38KHz, regardless of their coding method.

You don't have to use the TSOPxxx either, there is no reason why you can't use any IR detector and follow it by your own filter and demodulator. The TSOP series is just a convenient module with the detector and filters built inside it.

Brian.
 

    V

    Points: 2
    Helpful Answer Positive Rating
Hi,
It's not that strict. You can quite easily use 38kHz and maybe even push up to 40kHz. Won't malfunction. The TSOP is quite common, although there are quite some common PNAxxxx modules available which are very common here.

Hope this helps.
Tahmid.
 

    V

    Points: 2
    Helpful Answer Positive Rating
So u mean that we can use a 36khz transmitter and 38khz demodulator without doing anything extra...
i have philips RC-2835/01 remote but cant figure out its frequency...??
how to do that????i googled but couldnt find anything useful.....
 

Many of these devices will work OK all the way up to 50Khz
(some are designed at that frequency)

With IR there seems to be a very large "S U C K it and see" factor.

For Phillips kit I'd recommend (and have used) 38Khz
RC5/6 seems very resillient to me - as long as you maintain
the long lead-in pulse. I have one that doesnt do that here
and it just isn't as reliable.

Some of the japanese manufacturers use odd protocols and frequencies
and I believe there is a tendancy to use 50Khz in America (but dont quote me on that) but I've never had any real trouble decoding them. I have an air conditioner here that produces a really strange IR pulse train but again - 38Khz

For IR reception and demod I used a Hero HIM702. (heroelec.co.uk)
I find this very reliable with a wide range of standard and non standard
IR remotes.

jack

PS - Apparently the word s u c k is a four letter word... :-o
 

    V

    Points: 2
    Helpful Answer Positive Rating
ok buddy i got it about philips and RC-5 protocol.....
if i ask u NEC or RC-5 protocol???which one has more wide applications???
 

I don't claim to be an expert - I've only been doing IR for about a year
(off and on) but in my experience/reading RC5 and derivatives is pretty dominant now.

jack
 
Hi sam,
I think RC5 protocol has got wider use among hobbyists and then there's Sony SIRC. NEC is pretty popular as well, but when you check the pulses of most IR devices, they use their own protocol. From a hobbyist or beginner's point of view, RC5 seems to be the used, or so I've read, as I haven't used it. I've only used SIRC in my many IR circuits.

Hope this helps.
Tahmid.
 
yooo buddy....thanks for help.....may i add u in my contact list...because ur a experienced person...
I am doing a similar sort of project device control(on and off) using IR and 8051....
 

Hey,
If you're talking about messenger, I don't use it now. I can't help regarding coding of 8051 but I can help with AVR/PIC and can help in understanding IR. It's pretty simple. Googling a few links will make it very easy on its own.

Hope this helps.
Tahmid.
 
buddy i just want help for developing logics for demodulation....i will take care of the rest...if u will have the useful links..that would be a great help...
 

Hi,
Read through these, and you should get it:

SB-Projects: IR remote control
Okay, these are for SIRC (Sony's Protocol) and RC5:

Decoding the Sony IR protocol (SIRC) with a pic
**broken link removed**
http://picprojects.org.uk/projects/sirc/sonysirc.jpg
SB-Projects: IR remote control: Philips RC-5
SB-Projects: IR remote control: SIRC protocol

From here, you can get other protocol details as well:
SB-Projects: IR remote control

Hope this helps.
Tahmid.

---------- Post added at 17:12 ---------- Previous post was at 17:10 ----------

3 channel IR remote control

This is a complete project with PIC12F629 using RC5 for 3-channel IR rx tx.
 
Last edited by a moderator:
Developing the decoding is widely reported online so your shouldn't have
too much trouble finding fairly precise code you can adapt.

Personally I recommend Elektronica C and their dev kits because the support is
excelent - including many examples/libraries and explanation book online.
There is also a good deal of actual code online in their forums.

Essentially for decoding RC5 with a pic chip you really need an interrupt
design - I dont recommend other approaches I've seen that try to avoid this.

My approach is as follows:

You will need a 16 bit timer with 1 Interrupt/data line and ideally a capture/compare module on chip. I use a PIC18F4550 but that may well be overkill for many applications - much cheaper/simpler pic's can do this job easy enough.

For decoding you use the capture module to grab the timer value when the interrupt from your IR decoder (HIM...TSOP etc) triggers the chip.

You store the 16 bit captured value widths as the pulses enter.
After you have all the pulses you can then process them to decide
whether you have 1's or Zeros and decode the actual data and decide
if its a valid RC5 code etc.

One good thing about RC5 is the 2 leading 1 pulses I mentioned earlier.
This lets you:

1. Recognise the start sequence reliably
2. Rapidly calculate and allow for pulse stretching etc.

The RC5 code starts with the lead in bits then product address then command
followed by silence. Very often the remote will repeat 1 or 2 times with a delay
of around 120ms between for a single button press. You need to account for this in your code (Hence the occasional use of a toggle bit to identify multiple button presses).

There are some pitfalls but thats a basic idea.

Hope that helps.

jack
 
I had made a RC5 remote decoder using PIC... below is my video..
I know my code is not an ideal one, and i had written the code just after refreshing my C which i studied earlier, but any way, if u want it, i will post it here,
its written in High TECH C ...:-|
 
Last edited:
thanks guys...with all your help finally i have managed the right components for my work....
i have a question about RC-5 protocol
i have been reading on the net and looking at the previous projects.....i found clash between the bit time...some says it is 1.778ms some says it is 1.728ms..really confused...which one is right???
 

Both really or it could be a typo. There is a specification you should be able to download it from just about anywhere. Why not try the Philips web site first.
In my designs each bit is composed of a mark and a space of 895uS each - sometimes. Mostly.
If I remember rightly the actual spec is 889 uS

In practice timings for IR seem to vary quite a lot a lot caused by variations in electronics and varying distances from the reciever (or even signal bounce)
hence my comment about real time calibration based on the 2 leading pulses.

Different designs found online seem to vary from the actual spec which is confusing at first. You need to design in a fairly big tolerance so a few uS wont hurt you either way.

jacks law of IR design:
As a rule of thumb IR timing is a rule of thumb....

jack
 

Hi,
The actual spec is 889us x 2 for period:
rc5modulation.gif

example, transmitting $35 to $05:
rc5train.gif


Hope this helps.
Tahmid.
 

guys i have developed a code in assembly for decoding Rc-5 protocol but it seems that there is some problem....
what i am doing is im giving a delay of 8x1.778ms as soon as my start bit puts a zero on 8051 pin(demodulator gives inverted output to 8051) because i am ignoring first 8 bits...

then i am just saving remaining 6 command bits into A register.....
i am using buttons 1-6 of remote which have values 1,2,3......6 respectively..
but as i press buttons on remote nothing happens...i wonder whats the problem

here is my code
;-------------------------------------------------------------------------

ORG 00H

IPIN EQU P1.0
COUNT EQU R0
PIN0 EQU P2.0
PIN1 EQU P2.1
PIN2 EQU P2.2
PIN3 EQU P2.3
PIN4 EQU P2.4
PIN5 EQU P2.5


MOV A,0H
CLR C
MOV COUNT,8
MOV TMOD,01H

MAIN:
JB IPIN,$
DO:
LCALL DELAY
DJNZ COUNT,DO


MOV COUNT,6
CLR C

AGAIN:
MOV C,IPIN
RLC A
LCALL DELAY
DJNZ COUNT,AGAIN



DEV1:
CJNE A,1H,DEV2
CPL PIN0
LJMP MAIN

DEV2:
CJNE A,2H,DEV3
CPL PIN1
LJMP MAIN

DEV3:
CJNE A,3H,DEV4
CPL PIN2
LJMP MAIN

DEV4:
CJNE A,4H,DEV5
CPL PIN3
LJMP MAIN

DEV5:
CJNE A,5H,DEV6
CPL PIN4
LJMP MAIN

DEV6:
CJNE A,6H,MAIN
CPL PIN5
LJMP MAIN


LJMP LAST

;------1.778ms DELAY----------;

DELAY:
MOV TH0,0F9H
MOV TL0,99H
SETB TR0

HERE: JNB TF0,HERE
CLR TF0
CLR TR0
RET

;------------------------------;

LAST:
END
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top