This is an almost 100% off-topic blog in the TI Ultrasonic Sensing RoadTest series. I'm going to create a KiCad component for the TDC1000 with the KiPart utility.
Creating a 28 pin component takes quite some click-and-navigate work with the default KiCad component editor. With the utility, it's a less-than-10-minute job.
|
KiPart
devbisme (or devbisme2 ?) from xess was tired of creating KiCad components in the GUI component editor.
If you know that he's into the fpga business - where pin counts run into the hundreds and even thousands - that comes as no surprise.
In stead of accepting the situation, he developed the nifty KiPart tool.
I've blogged about the tool before (yes, I'm a fanboy).
Today I've used it to generate a component for the TDC1000 Ultrasonic Analog Front End in less than 10 minutes (the raw video, recorded in one take, was 9'27" including waffle and tangents, edited down to 6'20") .
KiPart Related Blog |
---|
KiCAD lovers, check out KiPart |
Create my first KiCad part with KiPart utility |
Generating the Data for KiPart
The source for the KiPart utility is a CSV file that describes the component. We need to list the pin names and a few attributes.
But hey, we don't want to type. All info can be grabbed from the TDC1000 Datasheet.
It's easy to move the data from the datasheet to a spreadsheet, because the info is nicely listed in a structured table in the PDF.
This is how the end result looks like:
TDC1000 | |||
type | pin | name | side |
input | 1 | RX1 | left |
input | 2 | RX2 | left |
pwr | 3 | VCOM | left |
output | 4 | LNAOUT | left |
input | 5 | PGAIN | left |
output | 6 | PGAOUT | left |
input | 7 | COMPIN | left |
output | 8 | RTD1 | left |
output | 9 | RTD2 | left |
output | 10 | RREF | left |
input | 11 | CHSEL | left |
output | 12 | ERRB | left |
output | 13 | START | left |
output | 14 | STOP | left |
input | 15 | EN | right |
input | 16 | TRIGGER | right |
input | 17 | RESET | right |
input | 18 | SCLK | right |
input | 19 | ~CSB | right |
input | 20 | SDI | right |
output | 21 | SDO | right |
pwr | 22 | VIO | right |
pwr | 23 | VDD | right |
pwr | 24 | VDD | right |
input | 25 | CLKIN | right |
pwr | 26 | GND | right |
output | 27 | TX2 | right |
output | 28 | TX1 | right |
There are a few things that I had to do by hand:
Because the SPI CHIP SELECT pin 19 is active low, I added a tilde (~) in front of the name.
That results in the correct annotation in KiCad:
Pin 23 and 24 were listed on the same line in the datasheet. I split them up manually in the spreadsheet.
And the two last pins were on the next page. Easy to forget! Take care that your number of lines in the spreadsheet match the pin count of the component.
I entered input, output or pwr in the type column (A) based upon the I, O or P/GND value in the datasheet table. This could have been done with a formula - and I would have done that if the pin count was higher.
In the pin column, I entered left or right exactly as in the top view of the datasheet.
Then I invoked KiPart:
>kipart TDC1000.csv -s num -f -o TDC1000.lib -w
Miliseconds later I had a part ready to be used in KiCad's schema editor.
Check the links above to install the KiPart utility and for the documentation.
The spreadsheet (in Libre/Open Office format), CSV file and KiCad library are attached to this blog.
Top Comments