November 21, 2024

Microcontroller parameter parsing with AWK

I needed to get all the information on every 16bit Microchip PIC microcontroller into one header file for use in a library. Microchip supplies a pic.h header for processors but it doesn’t have the information I needed including end address of the flash and EEPROM. If you poke around on the Microchip parametric search site, you can select all 16-bit microcontrollers and download a CSV with all the parameters. A little bit of AWK magic and you can get a nice header with whatever data you want.

awk -f process.awk all-microcontrollers.csv > pic.h

AWK script and example output header

microchip microcontroller parameteric search

Drew

Admin and creator of Protological.com

View all posts by Drew →

Leave a Reply

Your email address will not be published. Required fields are marked *