View previous topic :: View next topic |
Author |
Message |
chriss2000 Guest
|
Manchester Decoding |
Posted: Thu Jan 09, 2003 7:41 am |
|
|
I am searching a source code to do manchester decoding with a pic16f876 in ccs. I need it for decoding an rc5 signal from an infrared receiver [14 bit]
Please Help me i really need it for a school projekt !!
thx chriss
___________________________
This message was ported from CCS's old forum
Original Post ID: 10561 |
|
|
Steve H Guest
|
Search Manchester.... |
Posted: Thu Jan 09, 2003 10:28 am |
|
|
Search this board for 600 days back for Manchester, including the body text in the search.
Steve H.
___________________________
This message was ported from CCS's old forum
Original Post ID: 10568 |
|
|
chriss2000 Guest
|
Re: Search Manchester.... |
Posted: Thu Jan 09, 2003 2:05 pm |
|
|
:=Search this board for 600 days back for Manchester, including the body text in the search.
:=
:=Steve H.
This messages include only non interesting tips. Please i need real code, i really need quick help !!!!!!!!!!
___________________________
This message was ported from CCS's old forum
Original Post ID: 10573 |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
Re: Manchester Decoding |
Posted: Thu Jan 09, 2003 4:59 pm |
|
|
:=I am searching a source code to do manchester decoding with a pic16f876 in ccs. I need it for decoding an rc5 signal from an infrared receiver [14 bit]
:=Please Help me i really need it for a school projekt !!
:=
------------------------------------------------------
I did a little web search and found this:
C code:
<a href="http://www.quickbuilder.co.uk/qb/articles/" TARGET="_blank">http://www.quickbuilder.co.uk/qb/articles/</a>
ASM code:
<a href="http://www.microchip.com/1010/suppdoc/appnote/all/tb045/" TARGET="_blank">http://www.microchip.com/1010/suppdoc/appnote/all/tb045/</a>
<a href="http://www.piclist.com/techref/microchip/manchester.htm" TARGET="_blank">http://www.piclist.com/techref/microchip/manchester.htm</a>
It might help.
___________________________
This message was ported from CCS's old forum
Original Post ID: 10579 |
|
|
Hans Wedemeyer Guest
|
Re: Search Manchester.... |
Posted: Thu Jan 09, 2003 5:46 pm |
|
|
The links by PCM Programmer is complete with code !
What more do you want ?
___________________________
This message was ported from CCS's old forum
Original Post ID: 10581 |
|
|
Dale Botkin Guest
|
Re: Manchester Decoding |
Posted: Fri Jan 10, 2003 3:23 pm |
|
|
:=C code:
:= <a href="http://www.quickbuilder.co.uk/qb/articles/" TARGET="_blank"> <a href="http://www.quickbuilder.co.uk/qb/articles/" TARGET="_blank">http://www.quickbuilder.co.uk/qb/articles/</a></a>
They say: "Converting Manchester encoded data back to original data is straight forward and error checking may be carried out at the same time. Since data arrives as 4 pairs of Manchester encoded data a simple shift and test algorithm can be implemented to retrieve the original data."
Hah! Now figure out how to get from a stream of stuff arriving via wire, infrared, RF or whatever to those nicely ordered bytes sitting in memory. Neat trick, if you can do it. The above was obviously written by someone who can figure out the theory behind Manchester encoding and decoding, but has absolutely no practical experience in doing it in the real world over less than perfect links like IR or RF. Pretty much useless, I'm afraid, and a pretty basic programming exercise even for someone like me.
:=ASM code:
:= <a href="http://www.microchip.com/1010/suppdoc/appnote/all/tb045/" TARGET="_blank"> <a href="http://www.microchip.com/1010/suppdoc/appnote/all/tb045/" TARGET="_blank">http://www.microchip.com/1010/suppdoc/appnote/all/tb045/</a></a>
The mother lode. This is what I used to guide me as I wrote (in C) a timer interrupt driven state machine to decode Manchester data from an RF link. You really, really have to understand the timing and synchronization issues, and this app note is very good. I spent many hours writing and debugging the functions. They are probably the best and most complex code I've ever done, and it works extremely well. Unfortunately I can't share it, as the code was paid for by someone else. You don't know how much I would love to share it.
:= <a href="http://www.piclist.com/techref/microchip/manchester.htm" TARGET="_blank"> <a href="http://www.piclist.com/techref/microchip/manchester.htm" TARGET="_blank">http://www.piclist.com/techref/microchip/manchester.htm</a></a>
OK for Manchester encoding, but that's pretty much a no-brainer anyway. As with most communication methods (Morse, async serial, TCP, etc) *sending* i seasy, *receiving* is hard. Sometimes really hard.
___________________________
This message was ported from CCS's old forum
Original Post ID: 10599 |
|
|
Dale Botkin Guest
|
Re: Search Manchester.... |
Posted: Fri Jan 10, 2003 3:26 pm |
|
|
:=:=Search this board for 600 days back for Manchester, including the body text in the search.
:=:=
:=:=Steve H.
:=
:=This messages include only non interesting tips. Please i need real code, i really need quick help !!!!!!!!!!
Oh, you mean we're supposed to write it for you too? Sorry. I spent a week searching for useful code already written. If you can actually understand and write code, the Microchip app note is as close as you'er going to get. If you can't, well, that's why profs give tests, I guess - to figure out who learned and who didn't.
Dale
___________________________
This message was ported from CCS's old forum
Original Post ID: 10600 |
|
|
|