Search found 876 matches
- Fri Feb 12, 2021 11:37 am
- Forum: Programs, Libraries and Tools
- Topic: Fast crc8
- Replies: 49
- Views: 1240
Re: Fast crc8
Good arguments. Now I'm a bit unsure. Maybe I'll make it configureable :D Let the user decide.. recipe for disaster? :D I guess it could make sense to secure the whole package with a proper crc even if it slows the code down by 4-8ms. Thanks for the crc16 code! When I use that code at 400Bytes it ta...
- Fri Feb 12, 2021 8:26 am
- Forum: Programs, Libraries and Tools
- Topic: Fast crc8
- Replies: 49
- Views: 1240
Re: Fast crc8
Thank you! I'm a bit wary of adding more overhead with an even bigger/more crc since the communication is already slow enough due to processing time. I have a few checks in place: First a START_BYTE is read, then a 6 byte header including the crc8 is being read, which also contains the length of the...
- Thu Feb 11, 2021 10:04 pm
- Forum: Programs, Libraries and Tools
- Topic: Fast crc8
- Replies: 49
- Views: 1240
Re: Fast crc8
oh well.. then I would need a crc16 for up to 500Bytes? ... I just want some fast way to recognize garbae on my uart. Shouldn't crc8 be enough for that? Or is it recommended to use crc16?
- Thu Feb 11, 2021 8:09 pm
- Forum: General Discussion and Questions
- Topic: Class method return none why ?
- Replies: 9
- Views: 259
Re: Class method return none why ?
This is not the same code as above and you return "width" which is not in the class. You need to return "self.width" as in your first post.
- Thu Feb 11, 2021 8:02 pm
- Forum: Programs, Libraries and Tools
- Topic: Fast crc8
- Replies: 49
- Views: 1240
Re: Fast crc8
yeah the message is 4bit vs 8bit but if it takes longer, it won't help the transmission speed. Sending an additional byte takes 80us so it's faster to just send more.
- Thu Feb 11, 2021 7:57 pm
- Forum: Programs, Libraries and Tools
- Topic: Fast crc8
- Replies: 49
- Views: 1240
Re: Fast crc8
Thanks a lot! Interestingly this crc4 algorithm needs twice the time of my crc8 lookup table algorithm 
On a 400Byte bytearray crc8 takes 2.5ms, this crc4 takes 6ms.

On a 400Byte bytearray crc8 takes 2.5ms, this crc4 takes 6ms.
- Thu Feb 11, 2021 7:24 pm
- Forum: Programs, Libraries and Tools
- Topic: Fast crc8
- Replies: 49
- Views: 1240
Re: Fast crc8
How do I get to crc4 from this:
Since you created a script for the tables, you probably have an example code too?
Code: Select all
def crc8(*args, initial_value=0):
_sum = initial_value
table = _table
for arg in args:
for byte in arg:
_sum = table[_sum ^ byte]
return _sum
- Thu Feb 11, 2021 2:41 pm
- Forum: Raspberry Pi microcontroller boards
- Topic: Wifi bridge for RPI Pico
- Replies: 27
- Views: 1878
Re: Wifi bridge for RPI Pico
Yeah I was more busy than I expected :D Yes in many applications the performance might not be too important. In general I'd say the current state will add 50-100ms to communication. Haven't tested it with mqtt_as yet because in the current state there is one major problem: With non-blocking sockets ...
- Thu Feb 11, 2021 11:50 am
- Forum: Raspberry Pi microcontroller boards
- Topic: Wifi bridge for RPI Pico
- Replies: 27
- Views: 1878
Re: Wifi bridge for RPI Pico
I do have a working minimal codebase now between 2 esp32 over uart but I'm wondering about the performance. I might have overdone the protocol and the processing time for optimizations takes longer than just sending the frames without optimizations :lol: It was a premature decision coming from ardun...
- Thu Feb 11, 2021 8:36 am
- Forum: Programs, Libraries and Tools
- Topic: Fast crc8
- Replies: 49
- Views: 1240