Searching \ for '[PIC]: Biphase Decoding questions' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=pic
Search entire site for: 'Biphase Decoding questions'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: Biphase Decoding questions'
2003\02\17@104251 by michael brown

picon face
Hello all,

I'm tinkering with a remote control transmitter and a Sharp IR receiver.
I have the PIC successfully receiving data from the IR receiver.  I had
planned on using the Capture feature (to measure pulse width) of the
16F628.  I've now got working code that uses the Capture feature, but I
have now discovered that the remote TX that I'm using sends the data
using biphase encoding.

I've thought about this for a bit and have come to the (erroneous?)
conclusion that the capture technique is probably not going to work.  My
question is, "what is the best way to decode biphase data?"  Does anyone
have an tips on doing it?  I've Googled my fingers numb, but haven't
found a "readable" piece of code that decodes biphase data.

I'm somewhat stumped as to how best to do this, since rising/falling
edges occur in the middle of the data bits.

Any tips or advice would be greatly appreciated.

michael brown

"In the land of the blind, he who has one eye is king"

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2003\02\17@112912 by Anand Dhuru

flavicon
face
Hi,

I have 2 asm files written by different authors that do the same thing; decode RC5. If you go thru' the listing, you would get a pretty good idea on how to go about it.

I tried to attach them to this post, but the message bounced back.
If you are interested, do let me know.

Regards,

Anand Dhuru


--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2003\02\17@113728 by Hazelwood Lyle

flavicon
face
>-----Original Message-----
>From: michael brown [spam_OUTspam-meTakeThisOuTspamHOUSTON.RR.COM]
>Sent: Monday, February 17, 2003 10:13 AM
>To: .....PICLISTKILLspamspam@spam@MITVMA.MIT.EDU
>Subject: [PIC]: Biphase Decoding questions
>
>
>Hello all,
<Snip Snip>
>My question is, "what is the best way to decode biphase data?"  Does
anyone
>have an tips on doing it?  I've Googled my fingers numb, but haven't
>found a "readable" piece of code that decodes biphase data.
<Snip>
>Any tips or advice would be greatly appreciated.

One of the "Big Guys" on this list has posted a great deal of useful
information regarding how to decode IR remotes. I hope he doesn't mind
if I aim you towards his website.

http://www.ustr.net

You'll find info on most of the popular remote schemes, and even sample
code (though not all PIC) for decoding it. This should help you get
going.

Lyle

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2003\02\17@114149 by michael brown

picon face
From: "Anand Dhuru" <ardhuruspamKILLspamVSNL.COM

Hi,

>I have 2 asm files written by different authors that do the same thing;
decode RC5. If you go thru' the >listing, you would get a pretty good
idea on how to go about it.

>I tried to attach them to this post, but the message bounced back.

>If you are interested, do let me know.

Hello,

Yes, please send them to me at .....spam-meKILLspamspam.....houston.rr.com.  I've found lots
of explanations of how RC5 works (as if it really needs much
explanation), but nearly nothing on decoding it in software.

Thanks!

michael

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2003\02\17@131953 by michael brown

picon face
----- Original Message -----
From: "Hazelwood Lyle" <EraseMELHazelwoodspam_OUTspamTakeThisOuTMFGNC.COM>

>One of the "Big Guys" on this list has posted a great deal of useful
>information regarding how to decode IR remotes. I hope he doesn't mind
>if I aim you towards his website.

>http://www.ustr.net

>You'll find info on most of the popular remote schemes, and even sample
>code (though not all PIC) for decoding it. This should help you get
>going.

Thanks Lyle, that's a really nice site.  Sadly it seems to confirm my
fears.  It looks like I'm going to have to use the typical bit-bang
approach to sync with the data.  Much like receiving serial data.  They
didn't have a PIC example (that I found anyway) for doing it, but I
don't need one as I've bit-banged before using TMR0 to set the sampling
points for an interrupt routine.  The goal here is for me to learn how
to implement this myself, I just need a nudge in the right direction now
and then.  ;-)

I was hoping for some clever way to solve this without resorting to hard
delays between samples (not implying that is wrong or anything, I'm just
trying to "master" the capture/compare stuff now ;-)

I guess I'll just have to bit-bang it for the RC5 controller I have,
though surely there are other (more dynamic) ways to do it that aren't
so dependant upon critical timing.  I also have an old Sony controller,
but it's bigger.  They are PWM'd (sorta) and should work well with
Capture mode.  I wish these people would standardize this stuff instead
of dreaming up and patenting obscure and incompatible methods.

thanks again  ;-)

michael

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2003\02\17@160541 by Peter L. Peres

picon face
On Mon, 17 Feb 2003, michael brown wrote:

*>I'm somewhat stumped as to how best to do this, since rising/falling
*>edges occur in the middle of the data bits.

So you detect each bit half a bit late. Why is this hard ?

Peter

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2003\02\17@172947 by michael brown

picon face
From: "Peter L. Peres" <plpspamspam_OUTACTCOM.CO.IL>


> On Mon, 17 Feb 2003, michael brown wrote:
>
> *>I'm somewhat stumped as to how best to do this, since rising/falling
> *>edges occur in the middle of the data bits.
>
> So you detect each bit half a bit late. Why is this hard ?

Half bit late, half bit early, either way that's not too hard using a
timer and hard delays.  I was just looking for a way to do it using the
capture mode of the capture/compare module and reading data on the
edges.  The problem with hard delays is the signal varies quite a bit
between controllers.  I suppose that I could use the first two bits to
"get a feel" for the pulse length and then set the timer delays
accordingly to sample the data accurately, but I'm trying to become a
Zen master of capture mode.  ;-)

I've now switched to a Sony remote that uses PWM instead of RC-5
encoding.  The capture mode works well with this scheme.  I just thought
that maybe someone knew of a clever way to measure the biphase pulse
widths and then divine the data out of it.

michael

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2003\02\17@221606 by ards, Justin P

flavicon
face
What is Biphase/RC5?
I have been working on a program that records and retransmits IR commands after recieving the respective RF command on 16f628. (The IR part is finally working well in 'Mode1' which will capture any command that has a max of 80 pulse and a max pulse width of 1.2 secs. Mode2 will have a max of 160 pulses with a max pulse width of 6.7mS other Modes will have a variation on resolution)

The next part is to decode a signal from a mc14496 keyboard decoder that transmits via RF 304Mhz TX/RX pair.  The wave form looks like this
|AGC|   STRT|   fff|fff   |fff   |fff  
AGC = AGC burst
STRT = Start bit
fff = freq 28khz
|   fff| is a 1
|fff   | is a 0

If this is biphase coding then I have successful decoded this using a HC11 and about to port it to 16f628 using input/output capture and you are welcome to the code (and the ported code when I am done) and an explanation of how I decoded it.  May not be the best solution (or RC5) but it worked well in a noisy environment were I could detect false triggers.

Let me know.

Justin

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2003\02\18@064756 by michael brown

picon face
>What is Biphase/RC5?

An I/R encoding technique created by Phillips that has level transitions
in the center of the bit.

>I have been working on a program that records and retransmits IR
commands after recieving the >respective RF command on 16f628. (The IR
part is finally working well in 'Mode1' which will capture any >command
that has a max of 80 pulse and a max pulse width of 1.2 secs. Mode2 will
have a max of 160 >pulses with a max pulse width of 6.7mS other Modes
will have a variation on resolution)

>The next part is to decode a signal from a mc14496 keyboard decoder
that transmits via RF 304Mhz >TX/RX pair.  The wave form looks like this
>|AGC|   STRT|   fff|fff   |fff   |fff

>AGC = AGC burst
>STRT = Start bit
>fff = freq 28khz
>|   fff| is a 1
>|fff   | is a 0

That all looks like RC5 to me.  ;-)

>If this is biphase coding then I have successful decoded this using a
HC11 and about to port it to >16f628 using input/output capture and you
are welcome to the code (and the ported code when I am >done) and an
explanation of how I decoded it.  May not be the best solution (or RC5)
but it worked well >in a noisy environment were I could detect false
triggers.

>Let me know.

Cool, yes I'd like to see the code to see how you did it.  I can get it
to work using a timer and syncing to the AGC data, but I'd like to see
how it's done using the capture feature.  You can send the code to
@spam@spam-meKILLspamspamhouston.rr.com

Thanks

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2003\02\18@195357 by ards, Justin P

flavicon
face
Cool, yes I'd like to see the code to see how you did it.  I can get it
to work using a timer and syncing to the AGC data, but I'd like to see
how it's done using the capture feature.  You can send the code to
KILLspamspam-meKILLspamspamhouston.rr.com

The code for the HC11 will be on its way later today.

The approach I took was to use input capture to get a count between the First rising edge and then a subsequent rising edge.  ie the time between start of AGC and the start of the 'Start' bit.

I then divided this down by a fixed constant to get an approximation of the bit time I called baud. The I set Output capture counter to equal baud + 1/4baud.

When the output capture count expired I sample the pin and suffle in a 1 if it is high or a zero if it is low and then reload the counter with the value baud. Then repeat an additional 5 times. The MC14496 generates 6 bits.

If the baud value was in a certain range I would consider it a valid capture.

Hope this helps
Regards Justin

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2003\02\19@141432 by Andrew Warren

flavicon
face
michael brown <RemoveMEPICLISTTakeThisOuTspammitvma.mit.edu> wrote:

> I just thought that maybe someone knew of a clever way to measure
> the biphase pulse widths and then divine the data out of it.

Michael:

It's pretty easy to do... Pseudocode may be found at:

   http://home.netcom.com/~fastfwd/answers.html#OTHER00015

-Andy

=== Andrew Warren -- spamBeGoneaiwspamBeGonespamcypress.com
=== Principal Design Engineer
=== Cypress Semiconductor Corporation
===
=== Opinions expressed above do not
=== necessarily represent those of
=== Cypress Semiconductor Corporation

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email TakeThisOuTlistservEraseMEspamspam_OUTmitvma.mit.edu with SET PICList DIGEST in the body

2003\02\19@144636 by michael brown

picon face
From: "Andrew Warren" <RemoveMEaiwspamTakeThisOuTCYPRESS.COM>
To: <PICLISTEraseMEspam.....MITVMA.MIT.EDU>
Sent: Wednesday, February 19, 2003 1:09 PM
Subject: Re: [PIC]: Biphase Decoding questions


{Quote hidden}

That's what I was looking for!  Thanks, I just knew it could be done, I
just wasn't sure how.

michael brown

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email RemoveMElistservEraseMEspamEraseMEmitvma.mit.edu with SET PICList DIGEST in the body

More... (looser matching)
- Last day of these posts
- In 2003 , 2004 only
- Today
- New search...