Search found 876 matches

by kevinkk525
Thu Feb 11, 2021 6:17 am
Forum: Programs, Libraries and Tools
Topic: Fast crc8
Replies: 49
Views: 1240

Re: Fast crc8

I don't really know how to choose another polynome for 8 bits :roll:
I thought this could be it: x^8+ x^6 + x^4 + x^3 + 1

But I don't see how I get to the polynome byte from that :?:
by kevinkk525
Wed Feb 10, 2021 10:58 am
Forum: Programs, Libraries and Tools
Topic: Fast crc8
Replies: 49
Views: 1240

Re: Fast crc8

That's nice but I'm not sure what exactly to do with it. Can it replace the table I'm using? It was created for crc8, does that code work with tables for 6 or 4 too? Sorry I'm not too familiar with how crc works, I just use it anyway :D
by kevinkk525
Tue Feb 09, 2021 7:30 pm
Forum: Programs, Libraries and Tools
Topic: Fast crc8
Replies: 49
Views: 1240

Re: Fast crc8

Thanks for the suggestion but for bytearrays of 40 bytes that code needed twice the time of the lookup table. (1ms vs 2ms)
by kevinkk525
Tue Feb 09, 2021 1:56 pm
Forum: Hardware Projects
Topic: ATE-NIC project using Pyboard D-series and 20+ I2C
Replies: 10
Views: 387

Re: ATE-NIC project using Pyboard D-series and 20+ I2C

awesome project! Thanks for sharing it!
by kevinkk525
Tue Feb 09, 2021 11:11 am
Forum: Programs, Libraries and Tools
Topic: Fast crc8
Replies: 49
Views: 1240

Re: Fast crc8

Thanks that was a good tip. I found one with a lookup table and stripped it down for micropyhton: _table = b'\x00\x07\x0e\t\x1c\x1b\x12\x158?61$#*-pw~ylkbeHOFATSZ]\xe0\xe7\xee\xe9\xfc\xfb\xf2\xf5\xd8\xdf\xd6\xd1\xc4\xc3\xca\xcd\x90\x97\x9e\x99\x8c\x8b\x82\x85\xa8\xaf\xa6\xa1\xb4\xb3\xba\xbd\xc7\xc0\...
by kevinkk525
Tue Feb 09, 2021 9:03 am
Forum: Programs, Libraries and Tools
Topic: Fast crc8
Replies: 49
Views: 1240

Fast crc8

I'm currently using a crc8 python implementation on the esp32 but it easily takes 1-4ms to calculate the crc. So I'm wondering if there is a better option in micropython for a simple crc/checksum for UART communications. Current code: def crc8(*args, initial_value=0): crc = initial_value for datagra...
by kevinkk525
Tue Feb 09, 2021 6:09 am
Forum: ESP32 boards
Topic: A little Home Assistant Mqtt integration using mqtt_as
Replies: 4
Views: 251

Re: A little Home Assistant Mqtt integration using mqtt_as

That is a very nice first version! By the way: I actually created a framework over the last few years with the exact same goal, integrating devices with home-assistant using mqtt_as with mqtt autodiscovery. It is more complex and powerful than yours, so maybe you can find some inspiration or some co...
by kevinkk525
Tue Feb 09, 2021 6:02 am
Forum: General Discussion and Questions
Topic: Compiled modules load time
Replies: 8
Views: 265

Re: Compiled modules load time

Does your module use psram? My esp32 with psram is painfully slow when it comes to loading modules. But 5 seconds does seem a little long but might not be unusal. My whole project consists of .mpy files and on start it loads up to 7 files and it takes a while..
by kevinkk525
Tue Feb 09, 2021 6:00 am
Forum: General Discussion and Questions
Topic: Asyncio in uPython 1.14 has not "run"???
Replies: 18
Views: 551

Re: Asyncio in uPython 1.14 has not "run"???

That's good news. However, personally any module without uasyncio is unusable to me and the 1M build should have enough space left for uasyncio even if other modules need to go or the flash side reduced. In the forum we often refer to using uasyncio for programming, I think it is a core module that ...
by kevinkk525
Mon Feb 08, 2021 5:55 am
Forum: General Discussion and Questions
Topic: Asyncio in uPython 1.14 has not "run"???
Replies: 18
Views: 551

Re: Asyncio in uPython 1.14 has not "run"???

Oh I must have missed the information that you use a 1MB firmware. But interesting that the old uasyncio is part of that firmware, that does indeed make no sense at all. So if you want to use the new uasyncio with the 1MB module, you need to build the firmware yourself. you can take a look at my scr...