mixing rfbyte and rfword

Using a well tested serial routine (on the Prop2 side)
connected to a somewhat flakey serial connection on the computer side...
to read from the computer into the P2 and interleave image and distance data
(from a KinectV2). The image data is a byte and the distance data is two bytes.
Once I call this, the P2 doesn't seem to respond to further commands although the
computer side of things seems fine.
                mov z,##230400                                
                mov ptra,##_Off_SCREEN_BUFFER  
                wrfast ##0,ptra
               call #rcv_char
                wfbyte rx_char
                call #rcv_char
                mov xx,rx_char
                shl xx,#8
                call #rcv_char
                add xx,rx_char
                wfword xx
                djnz    z,#.get3bytes

                mov rx_char,#0


I suspect that mixing wfbyte and wfword might not be allow?


  • I should have plenty of hub ram available.
  • There should be no problem mixing any sizes of WFxxxx.
  • Yes... I just change my byte to a word and no go. must be elsewhere in my code... but it is really simple stuff. I don't know.
  • I don't see a problem from your example. Could you do a test where you see if a WFBYTE followed by a WFWORD write incorrect data? I would do it here, but things are somewhat in a state of flux with the smart pin work.
  • I took a nap...:) Things are much better. I was writing too much and thinking too little.
    The total buffer is 230400 bytes... but I am grabbing 3 bytes per loop... so I only need to
    loop 76800 times. With this fix... all is well. Sorry.

    By the way... the P2 is just fabulous.

Sign In or Register to comment.