EmbeddedRelated.com
Forums

RC5 Code in C

Started by Kamal Shankar January 2, 2007
Hi

Has anyone done a single/two channel or more Remote
controller codec using some variant of C (HiTec C/CCS
C etc). Based on RC5 would make it more useful.

I want to control the IR Remote controlled devices in
my house controlled through a single PIC.

I have seen lots of ideas on the net, but they
recorded the data streams from the original remote and
played it back.

I want the PIC to "generate" the RC5 codes itself
rather than just dumbly "replay" it.

I hope I could make myself clear ?

Cheers

Kamal
__________________________________________________
Kamal,

A couple of years ago I made an RC5-remote
transmitter/receiver with a single PIC (16f628a), but
I used assembler instead of C. I still have the code
somewhere, would you be interested?

Grtz,

Kees
--- Kamal Shankar wrote:

> Hi
>
> Has anyone done a single/two channel or more Remote
> controller codec using some variant of C (HiTec
> C/CCS
> C etc). Based on RC5 would make it more useful.
>
> I want to control the IR Remote controlled devices
> in
> my house controlled through a single PIC.
>
> I have seen lots of ideas on the net, but they
> recorded the data streams from the original remote
> and
> played it back.
>
> I want the PIC to "generate" the RC5 codes itself
> rather than just dumbly "replay" it.
>
> I hope I could make myself clear ?
>
> Cheers
>
> Kamal
> __________________________________________________
>
>
__________________________________________________
> A couple of years ago I made an RC5-remote
> transmitter/receiver with a single PIC (16f628a),
> but
> I used assembler instead of C. I still have the code
> somewhere, would you be interested?

You mean you did BOTH Rx AND Tx with a SINGLE PIC ??

It's not that I am asssembler illetare or anything, I
can handle and read the 35 instructions well enough..
I was stressing on C because I would be converting any
useful ASM to C... so C would be a good thing to start
with in the first place.

So an ASM listing using the PIC Instruction set would
do just fine !

> I have some code that does RC5 on a 12F683 and
> 16F688, it's also in
> assembler.
>
> http://www.2dkits.com/kits/19led/19bi_t9.asm
http://www.2dkits.com/zencart/index.php?main_page=product_info&products_id=1

I will definitely have a look through it.

__________________________________________________
Yes, both Rx and Tx, it was a communication-module for
my robot-projects, so they could talk and listen to
each other using RC5-infrared.
I'll take a look for the code this evening and send it
to you.

Grtz,

Kees Stenekes
--- Kamal Shankar wrote:

> > A couple of years ago I made an RC5-remote
> > transmitter/receiver with a single PIC (16f628a),
> > but
> > I used assembler instead of C. I still have the
> code
> > somewhere, would you be interested?
>
> You mean you did BOTH Rx AND Tx with a SINGLE PIC ??
>
> It's not that I am asssembler illetare or anything,
> I
> can handle and read the 35 instructions well
> enough..
> I was stressing on C because I would be converting
> any
> useful ASM to C... so C would be a good thing to
> start
> with in the first place.
>
> So an ASM listing using the PIC Instruction set
> would
> do just fine !
>
> > I have some code that does RC5 on a 12F683 and
> > 16F688, it's also in
> > assembler.
> >
> > http://www.2dkits.com/kits/19led/19bi_t9.asm
> >
> http://www.2dkits.com/zencart/index.php?main_page=product_info&products_id=1
>
> I will definitely have a look through it.
>
> __________________________________________________
>
>
__________________________________________________
> Yes, both Rx and Tx, it was a communication-module
> for
> my robot-projects, so they could talk and listen to
> each other using RC5-infrared.

Me too !

I actually want to make an array of obstacle detectors
and fire atleast two simultaneously...

Obvisouly I need to identify which LED's output
reflected back...

What do you think ?

Can you share your idea ?

> I'll take a look for the code this evening and send
> it
> to you.

That would be just great !
__________________________________________________
> Yes, both Rx and Tx, it was a communication-module
> for
> my robot-projects, so they could talk and listen to
> each other using RC5-infrared.

Me too !

I actually want to make an array of obstacle detectors
and fire atleast two simultaneously...

Obviously I need to identify which LED's output
reflected back...

Plus the TSOP1738 and variants have a very involved
cycle/burst spec which I figured is already handled by
the RC5 standard... so just handling RC5 would solve
both problems at one go !

What do you think ?

Can you share your idea ?

> I'll take a look for the code this evening and send
> it
> to you.

That would be just great !
__________________________________________________
On 05/01/07, Kamal Shankar wrote:
> > Yes, both Rx and Tx, it was a communication-module
> > for
> > my robot-projects, so they could talk and listen to
> > each other using RC5-infrared.

Watching all this RC5 talk has made me think of another problem.......

I'm a bit of a car buf and post in a owners group, the cars are from
'89 and most have since lost their infrared plips or the plips have
failed.

Later versions of the car used RF encoded plips but the issue is the
lack of new infrared ones, it would not be too hard to rig up a small
pic in that way to emulate the original plips codes, or just replace
both plip and receiver.

RC5 would not be such a good idea, you dont want someone with a TV
remote opening your car, but that could be fixed just by inverting a
few bits in one of the button codes so its unique.

>
> Me too !
>
> I actually want to make an array of obstacle detectors
> and fire atleast two simultaneously...
>
> Obvisouly I need to identify which LED's output
> reflected back...
>
> What do you think ?
>
> Can you share your idea ?
>
> > I'll take a look for the code this evening and send
> > it
> > to you.
>
> That would be just great !
>
> __________________________________________________
>
>

--

Lez