crc16

  1. practicalsoft

    B4X FEED Calculating CRC16-CCITT FCS to match C implementation

    I need to calculate a CRC on a block of data that matches a CRC calculation done in an 8 bit microcontroller (8051 using Keil C51 compiler). The CRC is calculated on a block of 512 bytes according to the Get_Buf_CRC() function below: B4X: uint Get_Buf_CRC( uchar *ptr, uint numbytes ){ uint...
  2. practicalsoft

    B4X FEED [Solved]Help to convert code from c to B4A or Java

    Hi, I've this code written in "c": B4X: uint16_t CRC16Calc(uint8_t *data, uint16_t size) { #define CRC16 0x8005 uint16_t out = 0; uint16_t bits_read = 0, bit_flag; uint16_t idx = 0; while (size > 0) { bit_flag = out >> 15; out <<= 1; out |=...
  3. practicalsoft

    B4X FEED Help to convert code from c to B4A or Java

    Hi, I've this code written in "c": B4X: uint16_t CRC16Calc(uint8_t *data, uint16_t size) { #define CRC16 0x8005 uint16_t out = 0; uint16_t bits_read = 0, bit_flag; uint16_t idx = 0; while (size > 0) { bit_flag = out >> 15; out <<= 1; out |=...
عقب
بالا