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.

[SOLVED] RC 5 protocol transmitter and receiver using pic 16f877a

Status
Not open for further replies.

pratzz

Member level 5
Joined
Jun 15, 2012
Messages
83
Helped
6
Reputation
12
Reaction score
6
Trophy points
1,288
Activity points
1,781
Hi, i am supposed to use rc 5 protocol to transmit data from one pic and display it on another where other pic is connected to lcd for display purpose.
i searched on net a lot but only links i found were to use rc 5 as remote control. I have never used RC5 protocol so i am bit clueless.Can anyone guide me?


I am confused can anyone tell me where to get started like which ir receiver transmitter should i use first of all?
 
Last edited:

sarge

Full Member level 3
Joined
Dec 29, 2009
Messages
187
Helped
56
Reputation
112
Reaction score
55
Trophy points
1,308
Activity points
2,170
Hi, as i understand you need a wired connection? Why then use the RC5, but not built-in hardware i2c, spi or uart?
If you still want that kind of RC5, then you just need to explore the Manchester encoding and representation of data in RC5. Some information about this you can find here. Use google translate.
 
Last edited:

dean_winchester

Advanced Member level 4
Joined
Oct 19, 2010
Messages
111
Helped
22
Reputation
44
Reaction score
21
Trophy points
1,298
Location
India
Activity points
1,826
RC-5 is just a protocol for IR commands. It corresponds to remote control, because remote control works on IR Codes only.
You can use it for any IR Codes, not only Remote control.
 

honey 77

Advanced Member level 4
Joined
Jun 29, 2012
Messages
100
Helped
17
Reputation
34
Reaction score
17
Trophy points
1,298
Activity points
1,761
these two PIC'S are in single board or two boards? if these two pics having seperated boards means we can use RJ-9 connector for tranmistting data from one board to other board
 

pratzz

Member level 5
Joined
Jun 15, 2012
Messages
83
Helped
6
Reputation
12
Reaction score
6
Trophy points
1,288
Activity points
1,781
these two PIC'S are in single board or two boards? if these two pics having seperated boards means we can use RJ-9 connector for tranmistting data from one board to other board

The two pics are on separate board.

- - - Updated - - -

RC-5 is just a protocol for IR commands. It corresponds to remote control, because remote control works on IR Codes only.
You can use it for any IR Codes, not only Remote control.
ok can you tell me any link which could serve my purpose a bit

- - - Updated - - -

also which comapnies transmitter and receiver should i use?
 

honey 77

Advanced Member level 4
Joined
Jun 29, 2012
Messages
100
Helped
17
Reputation
34
Reaction score
17
Trophy points
1,298
Activity points
1,761
Better thing instead of RC-5 you can place RJ-9 connector If both pinouts same.
 

milind.a.kulkarni

Advanced Member level 3
Joined
Oct 6, 2011
Messages
923
Helped
214
Reputation
428
Reaction score
208
Trophy points
1,333
Location
Bangalore
Activity points
7,438
Let me ask a question here -

Do you want to have wireless communications between two PIC( I assume that PIC micro-controller ) ?

with regards,

Milind
 

pratzz

Member level 5
Joined
Jun 15, 2012
Messages
83
Helped
6
Reputation
12
Reaction score
6
Trophy points
1,288
Activity points
1,781
thing is it is a task and i am supposed to ir interface those pics using rc5 protocol only.better or worse is question when you are doing project for yourself.

- - - Updated - - -

Let me ask a question here -

Do you want to have wireless communications between two PIC( I assume that PIC micro-controller ) ?

with regards,

Milind
yup wireless communication but using ir(rc5 protocol) only
 

dean_winchester

Advanced Member level 4
Joined
Oct 19, 2010
Messages
111
Helped
22
Reputation
44
Reaction score
21
Trophy points
1,298
Location
India
Activity points
1,826
i think NXP provides some Tx and RX.. also go through zigbee once.
let me know any help needed.. i have used a philips one once only. u also need to be very precise about the timing specs of the Protocol or u miss a data..
 

milind.a.kulkarni

Advanced Member level 3
Joined
Oct 6, 2011
Messages
923
Helped
214
Reputation
428
Reaction score
208
Trophy points
1,333
Location
Bangalore
Activity points
7,438
I think My question hurt you it seems... from the answer that you given in post....My intention was to understand your requirement .... Now to answer your question .... As a part of learning it is good exercise and I will definably work .... It is based on the capacity of your coding skills .... Also the hardware that your have....

Here are some of the points that you need to consider ....
1) Do you want the Communication to be one ways or two way i.e. Both can acts as master or master -slave or even slave master etc.
2) Is you will like to have acknowledgement concept
3) What is strength of your IR signals
4) RC-5 spec is based on 38 Khz signal based sampling
5) Also RC-5 works mostly in broad-cast case of communication ....i.e No concept of acknowledgement ....
6) Do you like to have encryption in the communications
7) What about the decryption in the signal ( I mean CRC or some thing like that staff is a part of this )

First one need to think all of these aspect ....

I hope you understand my intention to ask this question...

Good Luck
 

dean_winchester

Advanced Member level 4
Joined
Oct 19, 2010
Messages
111
Helped
22
Reputation
44
Reaction score
21
Trophy points
1,298
Location
India
Activity points
1,826
I think My question hurt you it seems... from the answer that you given in post....My intention was to understand your requirement .... Now to answer your question .... As a part of learning it is good exercise and I will definably work .... It is based on the capacity of your coding skills .... Also the hardware that your have....

Here are some of the points that you need to consider ....
1) Do you want the Communication to be one ways or two way i.e. Both can acts as master or master -slave or even slave master etc.
2) Is you will like to have acknowledgement concept
3) What is strength of your IR signals
4) RC-5 spec is based on 38 Khz signal based sampling
5) Also RC-5 works mostly in broad-cast case of communication ....i.e No concept of acknowledgement ....
6) Do you like to have encryption in the communications
7) What about the decryption in the signal ( I mean CRC or some thing like that staff is a part of this )

First one need to think all of these aspect ....

I hope you understand my intention to ask this question...

Good Luck


There is no such funda of encryption or decryption in RC-5. Do not confuse it with RC5 cryption. It is different.
Also, the protocol is basically timing related. timing serves as the encryption. This protocol is commonly used in Wired Remote control Protocols.
 

pratzz

Member level 5
Joined
Jun 15, 2012
Messages
83
Helped
6
Reputation
12
Reaction score
6
Trophy points
1,288
Activity points
1,781
I think My question hurt you it seems... from the answer that you given in post....My intention was to understand your requirement .... Now to answer your question .... As a part of learning it is good exercise and I will definably work .... It is based on the capacity of your coding skills .... Also the hardware that your have....

Here are some of the points that you need to consider ....
1) Do you want the Communication to be one ways or two way i.e. Both can acts as master or master -slave or even slave master etc.
2) Is you will like to have acknowledgement concept
3) What is strength of your IR signals
4) RC-5 spec is based on 38 Khz signal based sampling
5) Also RC-5 works mostly in broad-cast case of communication ....i.e No concept of acknowledgement ....
6) Do you like to have encryption in the communications
7) What about the decryption in the signal ( I mean CRC or some thing like that staff is a part of this )

First one need to think all of these aspect ....

I hope you understand my intention to ask this question...

Good Luck
No i was not hurt i am just clueless ,only one way communication is required,no encryption sort of thing is required just transmitting a single message from transmitter and displaying on receiver.They will be very close to each other so give me the advice regarding ir strength needed also
 

pratzz

Member level 5
Joined
Jun 15, 2012
Messages
83
Helped
6
Reputation
12
Reaction score
6
Trophy points
1,288
Activity points
1,781
Guys I am sorry ...if you fell this is Confusing....

Good Luck
You dont have to be sorry.I dont know who is right about encryption but i dont require it whatever maybe the case.I just have to send simple predefined message of 32 characters and have to display it on receivers's (pic) LCD
 

ameriq

Junior Member level 3
Joined
Oct 1, 2007
Messages
29
Helped
4
Reputation
8
Reaction score
4
Trophy points
1,283
Location
Pakistan
Activity points
1,487
Well after reading this long discussion, I understand that you want to transmit data over RC5 from board and receive it on another and show it on LCD. That is farly easy.
First on transmitting board you need to make an IR transmitter. The IR led must be oscillated at 38KHz and modulated to carry data. There are many ways to do that, simplest is to make 555 oscillator with 38KHz 50% duty cycle. Connect an IR LED through a transistor like 2N2222. Usually for astable mode pin 4 of 555 is connected to VCC, in your case connect this pin to TX of your controller.
Now whenever there is logic 1 on TX the IR LED will flash at 38KHZ.

On Receiver place a 38KHz IR sensor, and invert the output using a transistor inverter. Connect the Output to RX of the second board.
Now you have a IR MODEM. Simply sending Serial data will be recived at other end. Now you can encode the RC5 protocol.

Truly speaking this protocol is for remote controls, however using the ideology you can transmit data over it.
 
Last edited:
  • Like
Reactions: pratzz

    pratzz

    Points: 2
    Helpful Answer Positive Rating

wp100

Advanced Member level 5
Joined
May 15, 2009
Messages
3,056
Helped
883
Reputation
1,781
Reaction score
736
Trophy points
113
Location
Prime Meridian
Activity points
0
Hi,

Agree with Ameriq, start with the simple IR and get the basic code and hardware proven, then you can add any encoding needed.
Have you established which RC5 standard is needed ?

Those WinPicProg tutorials I mentioned the other day detail all the software and hardware needed to transmit from one pic and receive on another, the Pics generate the 38khz signal.

He uses a 16F628 , so very little modification will be needed to run on a 877A.
 
  • Like
Reactions: pratzz

    pratzz

    Points: 2
    Helpful Answer Positive Rating

tpetar

Advanced Member level 5
Joined
Sep 27, 2010
Messages
6,427
Helped
1,713
Reputation
3,456
Reaction score
1,678
Trophy points
1,393
Location
Pancevo-Belgrade, Serbia
Activity points
37,372
Use search field on edaboard. I post that 05.05.2012.






Cannot be simpler than this:

LCD_serial.png
 
  • Like
Reactions: pratzz

    pratzz

    Points: 2
    Helpful Answer Positive Rating

pratzz

Member level 5
Joined
Jun 15, 2012
Messages
83
Helped
6
Reputation
12
Reaction score
6
Trophy points
1,288
Activity points
1,781
Thanks tpetar your suggestion is certainly making sense.

@wp100:in that winpic link they are using receiver on pic as it looks like and separete transmitter not sure though.

- - - Updated - - -

after reading this discussion my boss has changed the project,now i have to connect a receiver to pic and display that what certain command is supposed to do ,for example if i press key 1 it should show key 1(lcd).

if volume increase the volume increase and so on.
any suggestion for that?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top