Crc-16

Firpas

Active Member
Licensed User
Longtime User
Hi Erel:

I was a problem calculating CRC 16 bits in B4A but it is solved.

I've seen some questions on this forum, so I send you a small example of how to calculate the CRC - 16.

I hope it is of use to someone.

Once again thank you for your contribution.

regards
 

Attachments

  • crc-16.zip
    7 KB · Views: 397

walterf25

Expert
Licensed User
Longtime User
Hi Firpas, thanks a lot for sharing the code, i'm actually stuck in the same spot you were, i'm trying to implement a crc check, i have a microcontroller measuring voltage from a strain gage, and i'm transmitting the values via bluetooth, but i need to make sure that all the bytes arrive in full, so i need to implement a crc check, i took a look at your code and is very easy to follow, my question now is, when i receive the data on my phone with the crc, how do i interpret the data, how can i extract the relevant data or how do i check that the data is not corrupted, hope i make sense, because i'm a little confused myself, maybe you or Erel can shed some light on my question.

thanks again, and great work.

Walter
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…