![]() These are a couple hundred bytes in machine code. Simply use some simple LZW or huffman (low dict size) compressor and decompressor. Especially since you're only planning to access the data sequentially, and since even of your 7 bits, 27 values don't occur and, probably, a few bit combos are way more likely than others: Note that PWM sequence does sound like you're trying to reproduce some band-limited signal. That should both amount to roughly the same assembly, a few bytes in machine code. Or you just do a bit of pointer arithmetic: // get the 1000. elementĬase 0: value = table.word0 break Ĭase 1: value = table.word1 break Ĭase 7: value = table.word7 break ![]() The SW006021-2 MPLAB XC8 C Compiler generates highly optimized code for the 8-bit PIC microcontrollers (PIC10, PIC12, PIC16, and PIC18 devices) as well as the PIC14000 Mixed Signal Controller. You can either just use pointers to your eight_words struct: // get the 1000. MPLAB XC8 C Compiler Microchip MPLAB XC8 C Compiler (SW006021-2) is designed as a free-standing, ANSI C compiler. ![]() Obviously, this won't work: static const uint8_t table = Īnd the _packed_ attribute will make any decent compiler actually emit structures of size 7 Bytes.Īccess then is super simple. The target PIC MCU is PIC16F1829 (8K words of program memory), and the compiler is XC8. I'm writing the firmware for a simple testing device that would need to store a very large lookup table (I need 13500 entries with values 0.100 decimal). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |