I decided to try to create KiCad symbols with GPT4. But instead of generating the raw KiCad symbol file directly, I had it write the pin information as CSV that I could pass to kipart. So GPT would handle the collection and formatting of part information, and kipart
would do the mechanistic placement of pin symbols and drawing the box:
Then I store the CSV in 555.csv
and pass that file to kipart
:
kipart 555.csv -s num -w -o 555.lib
And here’s the result along with a pinout from the internet:
Next, I tried to make a symbol for the 74LS244
:
That’s just completely wrong. Power and ground are on the wrong pins, etc.
The '244
may be well-known to us, but it probably occurs much less in the GPT training set than the 555
. So I cut the pin information from a table in the PDF datasheet and pasted it into the prompt:
This is the CSV generated by GPT4:
It’s not quite right: the pins aren’t evenly divided between the left/right sides of the symbol. So I asked it to correct itself:
And this is the resulting symbol after passing the CSV through kipart
:
Finally, I asked it to create the '244
, but as a multi-unit symbol:
And these are the separate units:
Is this a viable way to make symbols?
Maybe. If I had a new 100-pin microcontroller or small FPGA, then I might try to cut-and-paste its pin information from the datasheet into GPT4 to see what I could get. I would still have to verify the symbol, but that’s needed whether I make it with GPT or by hand.
It would be more difficult to do this with parts having hundreds of pins. But the manufacturer usually provides a ready-made spreadsheet or CSV with the pin table for those. That’s how I made these Xilinx and Lattice FPGA libraries.