crc16

Convert CRC16 CCITT code from C to Python

Convert CRC16 CCITT code from C to Python Question: I want to do a Python implementation (actually MicroPython) of a specific checksum calculation based on CRC16-CCITT. It will be used on a microcontroller to check data integrity over a serial connection. The algorithm is available as C implementation. The checksum is a 16 bit, type …

Total answers: 1

Calculating CRC16 in Python

Calculating CRC16 in Python Question: I’m trying to evaluate appropriate checksum based on CRC-16 algorithm using crcmod Python module and 2.7 version of Python interpreter. The checksum parameters are: CRC order: 16 CRC polynomial: 0x8005 Inital value: 0xFFFF Final value: 0x0000 Direct: True Code: crc16 = crcmod.mkCrcFun(0x18005, rev=False, initCrc=0xFFFF, xorOut=0x0000) print hex(crc16(str(int(0x5A0001)))) and for the …

Total answers: 5

CRC-CCITT 16-bit Python Manual Calculation

CRC-CCITT 16-bit Python Manual Calculation Question: Problem I am writing code for an embedded device. A lot of solutions out there for CRC-CCITT 16-bit calculations require libraries. Given that using libraries is almost impossible and a drain on its resources, a function is required. Possible Solution The following CRC calculation was found online. However, its …

Total answers: 8