Shop OBEX P1 Docs P2 Docs Learn Events
PASM Coding Challenge - 4 wire Prop to Prop communication. - Page 2 — Parallax Forums

PASM Coding Challenge - 4 wire Prop to Prop communication.

2»

Comments

  • Andrey DemenevAndrey Demenev Posts: 377
    edited 2009-12-16 12:00
    heater said...
    That means the table used in Andrey Demenev's 10Mbit/s Tx solution is not going to fit in COG.

    At cost of 2 additional instructions at setup time, 9th bit can be accounted:

    send
                test data, #$100            wz
                and data, #$FF
                add data, #bit_table
                movs pattern, data
                nop
    pattern     mov ptn, bit_table + 0
        if_z    xor  ptn, ptn_9th_bit_one
    
    



    Patterns must be written in a way that they match 1 in 9th bit, and ptn_9th_bit_one contains ones in positions that match 9th bit.
  • kuronekokuroneko Posts: 3,623
    edited 2009-12-16 12:48
  • heaterheater Posts: 3,370
    edited 2009-12-16 13:08
    woha, you guys are amazing.

    Kuroneko is your receiver working as most significant bit is received first?

    We have enough instructions after receiving a token now that going at 10Mb/s rather than 5Mb/s may not be worth it.
    However I will for sure give this a test when I get hold of some real target hardware.

    It may be possible to use a FIFO for the Rxed tokens, prior to "unscrambling them".
    In theory some of the Rx tokens should not be entered into the Rx FIFO and delivered to the applications.
    However it practice it may be OK if they are. Provided they are acted on and removed prior to finding their way to the application. It just means that things like link RESET commands from the far end will not be acted on as quickly because they have to travel up the FIFO.

    I really don't want to use another COG to do this processing.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    For me, the past is not over yet.
  • kuronekokuroneko Posts: 3,623
    edited 2009-12-16 14:00
    heater said...
    Kuroneko is your receiver working as most significant bit is received first?
    The transmitter sends a 9 bit value MSB first. It's received in the same order. The first byte is the actual payload (8x wc), the last bit the control bit (wz). If you look at the code, it's easy to latch onto it and either add it to the data (to form a 9 bit value, ATM done like this to keep the SPIN test happy) or make some controlled decisions.

                    add     addr, addr              ' make space for bit 9
        if_c_ne_z   or      addr, #1                ' add bit 9
    

    Post Edited (kuroneko) : 12/16/2009 2:06:10 PM GMT
Sign In or Register to comment.