PropBASIC - High speed comm's almost working
simonl
Posts: 866
I've been working on getting Beau Schwabe's 8.42MBaud comm's working with PropBASIC, and it's almost there - I think!
I've got it so I'm able to send/receive a packet of data, but my code for testing if the received data is correct doesn't seem to be working - and now I think I'm just missing something obvious! Would anyone care to take a look at the attached and let me know where I'm going wrong, please?
I think I'm going wrong here:
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheers,
Simon
www.norfolkhelicopterclub.com
Announcement: To cut costs in the current economic climate, we have switched-off the light at the end of the tunnel.
I've got it so I'm able to send/receive a packet of data, but my code for testing if the received data is correct doesn't seem to be working - and now I think I'm just missing something obvious! Would anyone care to take a look at the attached and let me know where I'm going wrong, please?
I think I'm going wrong here:
RX DataIn ' Read & wait for data packet. SENDCRSR 18, 8 ' Show received packet on screen. SENDSTR DataIn Flag = 0 ' Reset the error flag. FOR i = 0 TO PacketSizeMinusOne ' Check Data and update display only if there is a difference. RDLONG DataIn( i ), thisData ' Get received LONG for test. RDLONG DataTest( i ), expectedData ' Get corresponding test LONG for test. IF thisData <> expectedData THEN ' Did they match? Flag = 1 ' No, so set the error flag. ENDIF NEXT IF Flag = 0 THEN INC Match ' Flag stayed 0, so we have a match. ELSE INC Error ' Flag changed, so we have a mismatch. ENDIF
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheers,
Simon
www.norfolkhelicopterclub.com
Announcement: To cut costs in the current economic climate, we have switched-off the light at the end of the tunnel.
Comments
Are you using the latest version of PropBasic ? May be a bug that has been fixed.
Bean
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Use BASIC on the Propeller with the speed of assembly language.
PropBASIC thread http://forums.parallax.com/showthread.php?p=867134
March 2010 Nuts and Volts article·http://www.parallax.com/Portals/0/Downloads/docs/cols/nv/prop/col/nvp5.pdf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
There are two rules in life:
· 1) Never divulge all information
I'm using 00.00.92 - I think that's the latest, right?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheers,
Simon
www.norfolkhelicopterclub.com
Announcement: To cut costs in the current economic climate, we have switched-off the light at the end of the tunnel.
I'm pretty sure my error checking code is at fault, but I just can't see the problem.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheers,
Simon
www.norfolkhelicopterclub.com
Announcement: To cut costs in the current economic climate, we have switched-off the light at the end of the tunnel.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheers,
Simon
www.norfolkhelicopterclub.com
Announcement: To cut costs in the current economic climate, we have switched-off the light at the end of the tunnel.