Tag Archives: awk

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