Shop OBEX P1 Docs P2 Docs Learn Events
Help! Need to know how to do Manchester Encoding/Decoding — Parallax Forums

Help! Need to know how to do Manchester Encoding/Decoding

ArchiverArchiver Posts: 46,084
edited 2001-11-03 15:20 in General Discussion
Hi,

I need some help with the Basic Stamp 2. I am building two vehicles
that will have the ability to transfer information to eachother as
they move around in areas. Our design project is using the Basic
Stamp 2 micro controller. My question is, i am required to do
Manchester Encoding/Decoding to send out and recieve the data via our
transceivers, and was wondering if anyone knows how to do this? If
so, please email me! As well, I was wondering if i can make a
circuit that can be connected to the serial out/in of the basic stamp
that will automatically convert it to manchester coding, instead of
having to code it for the micro controller?

Thanks!

Debu

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2001-11-01 09:50
    Hi,

    There are Manchester Encoding Decoding chips you can use.
    Checkout:
    http://www.intersil.com/data/FN/fn2/fn2959/FN2959.pdf
    http://www.intersil.com/data/FN/fn2/fn2952/FN2952.pdf
    You would place such a chip between stamp #1 and your transmitter and
    between your receiver and stamp #2.
    It should make the Manchester coding transparent to your program. However,
    if the Manchester coding is part
    of your assignment this would be cheating wouldn't it [noparse]:)[/noparse]

    regards peter


    Oorspronkelijk bericht
    Van: debu_sen_22@y... [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=1taL8U7_lZeQh0L-w9Vh0oWWw1EQRl4Ige93xt13y1cxwl94MZCvvXPEcXrm5ZG57iq1BpD22aWf9en95owAVw]debu_sen_22@y...[/url
    Verzonden: donderdag 1 november 2001 1:03
    Aan: basicstamps@yahoogroups.com
    Onderwerp: [noparse][[/noparse]basicstamps] Help! Need to know how to do Manchester
    Encoding/Decoding

    Hi,

    I need some help with the Basic Stamp 2. I am building two vehicles
    that will have the ability to transfer information to eachother as
    they move around in areas. Our design project is using the Basic
    Stamp 2 micro controller. My question is, i am required to do
    Manchester Encoding/Decoding to send out and recieve the data via our
    transceivers, and was wondering if anyone knows how to do this? If
    so, please email me! As well, I was wondering if i can make a
    circuit that can be connected to the serial out/in of the basic stamp
    that will automatically convert it to manchester coding, instead of
    having to code it for the micro controller?

    Thanks!

    Debu


    To UNSUBSCRIBE, just send mail to:
    basicstamps-unsubscribe@yahoogroups.com
    from the same email address that you subscribed. Text in the Subject and
    Body of the message will be ignored.


    Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
  • ArchiverArchiver Posts: 46,084
    edited 2001-11-01 18:08
    Yea, we can't use the chips because we would be over budget with our
    design project. We are trying to find a way to code it. Anyone have
    any other ideas?

    thanks

    Debu


    --- In basicstamps@y..., "peter verkaik" <peterverkaik@b...> wrote:
    > Hi,
    >
    > There are Manchester Encoding Decoding chips you can use.
    > Checkout:
    > http://www.intersil.com/data/FN/fn2/fn2959/FN2959.pdf
    > http://www.intersil.com/data/FN/fn2/fn2952/FN2952.pdf
    > You would place such a chip between stamp #1 and your transmitter
    and
    > between your receiver and stamp #2.
    > It should make the Manchester coding transparent to your program.
    However,
    > if the Manchester coding is part
    > of your assignment this would be cheating wouldn't it [noparse]:)[/noparse]
    >
    > regards peter
    >
    >
    >
    Oorspronkelijk bericht
    > Van: debu_sen_22@y... [noparse][[/noparse]mailto:debu_sen_22@y...]
    > Verzonden: donderdag 1 november 2001 1:03
    > Aan: basicstamps@y...
    > Onderwerp: [noparse][[/noparse]basicstamps] Help! Need to know how to do Manchester
    > Encoding/Decoding
    >
    > Hi,
    >
    > I need some help with the Basic Stamp 2. I am building two vehicles
    > that will have the ability to transfer information to eachother as
    > they move around in areas. Our design project is using the Basic
    > Stamp 2 micro controller. My question is, i am required to do
    > Manchester Encoding/Decoding to send out and recieve the data via
    our
    > transceivers, and was wondering if anyone knows how to do this? If
    > so, please email me! As well, I was wondering if i can make a
    > circuit that can be connected to the serial out/in of the basic
    stamp
    > that will automatically convert it to manchester coding, instead of
    > having to code it for the micro controller?
    >
    > Thanks!
    >
    > Debu
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@y...
    > from the same email address that you subscribed. Text in the
    Subject and
    > Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to
    http://docs.yahoo.com/info/terms/
  • ArchiverArchiver Posts: 46,084
    edited 2001-11-02 02:17
    Hi,

    Take a look at the following link
    http://www.mycal.net/projects/digital/encode.html
    It provides program samples in C and a simple cheap circuit to filter out
    data at the receiver end.
    Also look at
    http://www.erg.abdn.ac.uk/users/gorry/course/phy-pages/man.html
    This shows the encoding: for a 0 send out 01 and for a 1 send out 10
    i.e add 1 or 2 after shifting the result 2 bits to the left
    You could encode in the following way:

    charin var byte 'holds ASCII or binary character to send
    wordout var word 'holds manchestercode for charin
    bit var nib 'bitcounter

    wordout=0
    for bit=0 to 7
    wordout=(wordout<<2)+charin.bit7+1 'add 1 or 2 after shifting
    charin=charin<<1 'move next bit to bit7 position
    next
    serout pin,baud,[noparse][[/noparse]wordout\16]

    hope this helps

    regards peter


    Oorspronkelijk bericht
    Van: debu_sen_22@y... [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=SUr0H-jPj4snqtmXKUJ3r3CLaqyIbn6ezefEj2r8xnzV9QzjN8cRqgfjmSVdDfAI3s7P_hWXQpp_KpFD]debu_sen_22@y...[/url
    Verzonden: donderdag 1 november 2001 19:08
    Aan: basicstamps@yahoogroups.com
    Onderwerp: [noparse][[/noparse]basicstamps] Re: Help! Need to know how to do Manchester
    Encoding/Decoding


    Yea, we can't use the chips because we would be over budget with our
    design project. We are trying to find a way to code it. Anyone have
    any other ideas?

    thanks

    Debu


    --- In basicstamps@y..., "peter verkaik" <peterverkaik@b...> wrote:
    > Hi,
    >
    > There are Manchester Encoding Decoding chips you can use.
    > Checkout:
    > http://www.intersil.com/data/FN/fn2/fn2959/FN2959.pdf
    > http://www.intersil.com/data/FN/fn2/fn2952/FN2952.pdf
    > You would place such a chip between stamp #1 and your transmitter
    and
    > between your receiver and stamp #2.
    > It should make the Manchester coding transparent to your program.
    However,
    > if the Manchester coding is part
    > of your assignment this would be cheating wouldn't it [noparse]:)[/noparse]
    >
    > regards peter
    >
    >
    >
    Oorspronkelijk bericht
    > Van: debu_sen_22@y... [noparse][[/noparse]mailto:debu_sen_22@y...]
    > Verzonden: donderdag 1 november 2001 1:03
    > Aan: basicstamps@y...
    > Onderwerp: [noparse][[/noparse]basicstamps] Help! Need to know how to do Manchester
    > Encoding/Decoding
    >
    > Hi,
    >
    > I need some help with the Basic Stamp 2. I am building two vehicles
    > that will have the ability to transfer information to eachother as
    > they move around in areas. Our design project is using the Basic
    > Stamp 2 micro controller. My question is, i am required to do
    > Manchester Encoding/Decoding to send out and recieve the data via
    our
    > transceivers, and was wondering if anyone knows how to do this? If
    > so, please email me! As well, I was wondering if i can make a
    > circuit that can be connected to the serial out/in of the basic
    stamp
    > that will automatically convert it to manchester coding, instead of
    > having to code it for the micro controller?
    >
    > Thanks!
    >
    > Debu
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@y...
    > from the same email address that you subscribed. Text in the
    Subject and
    > Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to
    http://docs.yahoo.com/info/terms/


    To UNSUBSCRIBE, just send mail to:
    basicstamps-unsubscribe@yahoogroups.com
    from the same email address that you subscribed. Text in the Subject and
    Body of the message will be ignored.


    Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
  • ArchiverArchiver Posts: 46,084
    edited 2001-11-02 20:24
    Hi,

    Interesting links, Peter.

    BTW the Stamp will choke on the instruction,

    > serout pin,baud,[noparse][[/noparse]wordout\16]

    serout does only bytes!

    The "wordout\16" is okay for the shiftout command.

    From what I understand of Manchester, it will be hard to implement on
    the Stamp. The transmitting end needs to send an extended sychronous
    bit stream, and the receiving end needs a phase lock loop to recover
    the clock. The external chips Peter suggested would do that.

    Debu, you might take a look at the documentation that comes with the
    Parallax RF Digital tranceivers. They include some program examples
    written by Jeff Martin that implement data packets and check sums.
    The data packet and checksum scheme greatly improves the reliability
    of the RF link. Maybe you can convince your instructor that
    reliability is the goal of the assignment?! Even if you do implement
    Manchester, you still might want to packetize your data.

    It has never been clear to me if the RF Digital modules from Parallax
    are strictly AM keyed, or if they implement a transparent Manchester
    scheme. They do have a microprocessor on the RF transceiver board,
    something the cheap RF modules do not have.

    Simple AM keyed tranmitters are much more sensitive to noise when
    they are OFF (not transmitting) than when they are ON
    (transmitting). Therefore, a good transmission scheme will minimize
    the off time. One reason Manchester encoding is good for RF is that
    the transmitter is never off for more than two bit periods. When the
    level at the input to the Manchester encoder is steady, either high
    or low, the output of the Manchester is a steady stream of
    on-off-on-off.

    Jeff Martin had also written example programs for the
    now-discontinued DVP modules, the aim of which was to implement a
    transmission scheme on the BS2 that would hold the keyed AM
    transmitter ON for most of the time, and minimize the off periods. I
    don't see that document on line, but you might send an email to
    Parallax to see if it might still be available.

    -- best regards
    Tracy Allen
    electronically monitored ecosystems
    http://www.emesystems.com
    mailto:tracy@e...



    >Hi,
    >
    >Take a look at the following link
    >http://www.mycal.net/projects/digital/encode.html
    >It provides program samples in C and a simple cheap circuit to filter out
    >data at the receiver end.
    >Also look at
    >http://www.erg.abdn.ac.uk/users/gorry/course/phy-pages/man.html
    >This shows the encoding: for a 0 send out 01 and for a 1 send out 10
    >i.e add 1 or 2 after shifting the result 2 bits to the left
    >You could encode in the following way:
    >
    >charin var byte 'holds ASCII or binary character to send
    >wordout var word 'holds manchestercode for charin
    >bit var nib 'bitcounter
    >
    >wordout=0
    >for bit=0 to 7
    > wordout=(wordout<<2)+charin.bit7+1 'add 1 or 2 after shifting
    > charin=charin<<1 'move next bit to bit7 position
    >next
    >serout pin,baud,[noparse][[/noparse]wordout\16]
    >
    >hope this helps
    >
    >regards peter
    >
    >
    >
    Oorspronkelijk bericht
    >Van: debu_sen_22@y... [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=DCtRVD6spxfIf647rg0VuMUiCAvFhOTTW6iopZY9Ppmm3lpQhG0LkfNMQzN6_2o5SsUyMyBxR0spK0U]debu_sen_22@y...[/url
    >Verzonden: donderdag 1 november 2001 19:08
    >Aan: basicstamps@yahoogroups.com
    >Onderwerp: [noparse][[/noparse]basicstamps] Re: Help! Need to know how to do Manchester
    >Encoding/Decoding
    >
    >
    >Yea, we can't use the chips because we would be over budget with our
    >design project. We are trying to find a way to code it. Anyone have
    >any other ideas?
    >
    >thanks
    >
    >Debu
    >
    >
    >--- In basicstamps@y..., "peter verkaik" <peterverkaik@b...> wrote:
    >> Hi,
    >>
    >> There are Manchester Encoding Decoding chips you can use.
    >> Checkout:
    > > http://www.intersil.com/data/FN/fn2/fn2959/FN2959.pdf
    >> http://www.intersil.com/data/FN/fn2/fn2952/FN2952.pdf
    >> You would place such a chip between stamp #1 and your transmitter
    >and
    >> between your receiver and stamp #2.
    >> It should make the Manchester coding transparent to your program.
    >However,
    >> if the Manchester coding is part
    >> of your assignment this would be cheating wouldn't it [noparse]:)[/noparse]
    >>
    >> regards peter
    >>
    >>
    > >
    Oorspronkelijk bericht
    >> Van: debu_sen_22@y... [noparse][[/noparse]mailto:debu_sen_22@y...]
    >> Verzonden: donderdag 1 november 2001 1:03
    >> Aan: basicstamps@y...
    >> Onderwerp: [noparse][[/noparse]basicstamps] Help! Need to know how to do Manchester
    >> Encoding/Decoding
    >>
    >> Hi,
    >>
    >> I need some help with the Basic Stamp 2. I am building two vehicles
    >> that will have the ability to transfer information to eachother as
    >> they move around in areas. Our design project is using the Basic
    >> Stamp 2 micro controller. My question is, i am required to do
    > > Manchester Encoding/Decoding to send out and recieve the data via
    >our
    > > transceivers, and was wondering if anyone knows how to do this? If
    > > so, please email me! As well, I was wondering if i can make a
    > > circuit that can be connected to the serial out/in of the basic
    >stamp
    >> that will automatically convert it to manchester coding, instead of
    >> having to code it for the micro controller?
    >>
    >> Thanks!
    >>
    >
    > > Debu
  • ArchiverArchiver Posts: 46,084
    edited 2001-11-03 15:20
    The harris intersil data sheets and application notes give the whole
    story.

    Those chips only cost retail about $9.00 each and the work both
    receive and transmitt.

    Might be worth looking into.

    73 spence
Sign In or Register to comment.