Compare commits
8 Commits
0df4e2a382
...
51c0a3dcb7
| Author | SHA1 | Date | |
|---|---|---|---|
| 51c0a3dcb7 | |||
| 2a037ea69b | |||
| 46006d9f72 | |||
| 8e1af93284 | |||
| 446015db40 | |||
| 6dc762d3c0 | |||
| 48f45588c7 | |||
| 0de14c6b72 |
2388
3d_models/ABS07-32.768KHZ-T.step
Normal file
2388
3d_models/ABS07-32.768KHZ-T.step
Normal file
File diff suppressed because it is too large
Load Diff
@@ -385,7 +385,7 @@ AidanBrzezinski_KiCad_Library/
|
||||
|
||||
| MPN | Description | Manufacturer | Symbol Library | Footprint | Digikey PN |
|
||||
|---|---|---|---|---|---|
|
||||
| 74LS192 | Synchronous 4-bit Up/Down (2 clk) counter | - | 0_ic_logic | - | - |
|
||||
| SN74HC193DR | Synchronous 4-bit Up/Down (2 clk) counter | Texas Instruments | 0_ic_logic | 0_package_SO:SOIC-16_3.9x9.9mm_P1.27mm | 296-41634-1-ND |
|
||||
|
||||
*1 components — auto-generated 2026-03-08*
|
||||
|
||||
|
||||
0
footprints/0_capacitor_smd.pretty/.gitkeep
Normal file
0
footprints/0_capacitor_smd.pretty/.gitkeep
Normal file
0
footprints/0_connector.pretty/.gitkeep
Normal file
0
footprints/0_connector.pretty/.gitkeep
Normal file
0
footprints/0_custom.pretty/.gitkeep
Normal file
0
footprints/0_custom.pretty/.gitkeep
Normal file
0
footprints/0_diode_smd.pretty/.gitkeep
Normal file
0
footprints/0_diode_smd.pretty/.gitkeep
Normal file
0
footprints/0_fiducials.pretty/.gitkeep
Normal file
0
footprints/0_fiducials.pretty/.gitkeep
Normal file
0
footprints/0_inductor_smd.pretty/.gitkeep
Normal file
0
footprints/0_inductor_smd.pretty/.gitkeep
Normal file
0
footprints/0_interface_uart.pretty/.gitkeep
Normal file
0
footprints/0_interface_uart.pretty/.gitkeep
Normal file
0
footprints/0_led_smd.pretty/.gitkeep
Normal file
0
footprints/0_led_smd.pretty/.gitkeep
Normal file
0
footprints/0_mousebites.pretty/.gitkeep
Normal file
0
footprints/0_mousebites.pretty/.gitkeep
Normal file
0
footprints/0_net_tie.pretty/.gitkeep
Normal file
0
footprints/0_net_tie.pretty/.gitkeep
Normal file
0
footprints/0_package_DFN_QFN.pretty/.gitkeep
Normal file
0
footprints/0_package_DFN_QFN.pretty/.gitkeep
Normal file
0
footprints/0_package_QFP.pretty/.gitkeep
Normal file
0
footprints/0_package_QFP.pretty/.gitkeep
Normal file
0
footprints/0_package_SO.pretty/.gitkeep
Normal file
0
footprints/0_package_SO.pretty/.gitkeep
Normal file
@@ -0,0 +1,354 @@
|
||||
(footprint "TSSOP-16_4.4x5mm_P0.65mm"
|
||||
(version 20241229)
|
||||
(generator "pcbnew")
|
||||
(generator_version "9.0")
|
||||
(layer "F.Cu")
|
||||
(descr "TSSOP, 16 Pin (https://www.jedec.org/document_search?search_api_views_fulltext=MO-153), generated with kicad-footprint-generator ipc_gullwing_generator.py")
|
||||
(tags "TSSOP SO JEDEC-MO-153-AB Texas_PW0016A Microchip-ST Toshiba-TSSOP16-P-0044-0.65A NXP-SOT403-1 Infineon-P-TSSOP-16-800")
|
||||
(property "Reference" "REF**"
|
||||
(at 0 -3.45 0)
|
||||
(layer "F.SilkS")
|
||||
(uuid "f83da426-84a7-48f0-bcfe-e07099809110")
|
||||
(effects
|
||||
(font
|
||||
(size 1 1)
|
||||
(thickness 0.15)
|
||||
)
|
||||
)
|
||||
)
|
||||
(property "Value" "TSSOP-16_4.4x5mm_P0.65mm"
|
||||
(at 0 3.45 0)
|
||||
(layer "F.Fab")
|
||||
(uuid "dd61f7d2-8b26-4181-85c6-616b78e4797f")
|
||||
(effects
|
||||
(font
|
||||
(size 1 1)
|
||||
(thickness 0.15)
|
||||
)
|
||||
)
|
||||
)
|
||||
(property "Datasheet" ""
|
||||
(at 0 0 0)
|
||||
(layer "F.Fab")
|
||||
(hide yes)
|
||||
(uuid "9ecc4c18-0477-4206-b7dc-7a6d30323fa3")
|
||||
(effects
|
||||
(font
|
||||
(size 1.27 1.27)
|
||||
(thickness 0.15)
|
||||
)
|
||||
)
|
||||
)
|
||||
(property "Description" ""
|
||||
(at 0 0 0)
|
||||
(layer "F.Fab")
|
||||
(hide yes)
|
||||
(uuid "a60a2786-86f0-40bf-9649-fb67f16f276d")
|
||||
(effects
|
||||
(font
|
||||
(size 1.27 1.27)
|
||||
(thickness 0.15)
|
||||
)
|
||||
)
|
||||
)
|
||||
(attr smd)
|
||||
(fp_line
|
||||
(start -2.31 -2.735)
|
||||
(end 2.31 -2.735)
|
||||
(stroke
|
||||
(width 0.12)
|
||||
(type solid)
|
||||
)
|
||||
(layer "F.SilkS")
|
||||
(uuid "4f65c287-4f3f-4585-a13a-4f3138a18131")
|
||||
)
|
||||
(fp_line
|
||||
(start 2.31 2.735)
|
||||
(end -2.31 2.735)
|
||||
(stroke
|
||||
(width 0.12)
|
||||
(type solid)
|
||||
)
|
||||
(layer "F.SilkS")
|
||||
(uuid "94482b9f-648a-4c3b-b834-9aa250300fd1")
|
||||
)
|
||||
(fp_poly
|
||||
(pts
|
||||
(xy -3.86 -2.28) (xy -4.19 -2.04) (xy -4.19 -2.52)
|
||||
)
|
||||
(stroke
|
||||
(width 0.12)
|
||||
(type solid)
|
||||
)
|
||||
(fill yes)
|
||||
(layer "F.SilkS")
|
||||
(uuid "a8e97a90-de83-4634-bc34-cd9974fe79eb")
|
||||
)
|
||||
(fp_line
|
||||
(start -3.85 -2.73)
|
||||
(end -2.45 -2.73)
|
||||
(stroke
|
||||
(width 0.05)
|
||||
(type solid)
|
||||
)
|
||||
(layer "F.CrtYd")
|
||||
(uuid "7843ffd0-a350-415a-81d1-e6c173bc5db4")
|
||||
)
|
||||
(fp_line
|
||||
(start -3.85 2.73)
|
||||
(end -3.85 -2.73)
|
||||
(stroke
|
||||
(width 0.05)
|
||||
(type solid)
|
||||
)
|
||||
(layer "F.CrtYd")
|
||||
(uuid "f0850d91-5c66-4ea5-9b9d-51d019c56677")
|
||||
)
|
||||
(fp_line
|
||||
(start -2.45 -2.75)
|
||||
(end 2.45 -2.75)
|
||||
(stroke
|
||||
(width 0.05)
|
||||
(type solid)
|
||||
)
|
||||
(layer "F.CrtYd")
|
||||
(uuid "f39f3710-5b7c-4e18-a973-e9ed0f1611be")
|
||||
)
|
||||
(fp_line
|
||||
(start -2.45 -2.73)
|
||||
(end -2.45 -2.75)
|
||||
(stroke
|
||||
(width 0.05)
|
||||
(type solid)
|
||||
)
|
||||
(layer "F.CrtYd")
|
||||
(uuid "93344276-293a-471e-bdd3-05c196827584")
|
||||
)
|
||||
(fp_line
|
||||
(start -2.45 2.73)
|
||||
(end -3.85 2.73)
|
||||
(stroke
|
||||
(width 0.05)
|
||||
(type solid)
|
||||
)
|
||||
(layer "F.CrtYd")
|
||||
(uuid "fef1fa97-be5b-4ee7-86e8-274535baeaf0")
|
||||
)
|
||||
(fp_line
|
||||
(start -2.45 2.75)
|
||||
(end -2.45 2.73)
|
||||
(stroke
|
||||
(width 0.05)
|
||||
(type solid)
|
||||
)
|
||||
(layer "F.CrtYd")
|
||||
(uuid "093799d4-4038-4d45-9e18-8583d9b8517d")
|
||||
)
|
||||
(fp_line
|
||||
(start 2.45 -2.75)
|
||||
(end 2.45 -2.73)
|
||||
(stroke
|
||||
(width 0.05)
|
||||
(type solid)
|
||||
)
|
||||
(layer "F.CrtYd")
|
||||
(uuid "83502815-c44e-4faa-a056-7dc587f158c5")
|
||||
)
|
||||
(fp_line
|
||||
(start 2.45 -2.73)
|
||||
(end 3.85 -2.73)
|
||||
(stroke
|
||||
(width 0.05)
|
||||
(type solid)
|
||||
)
|
||||
(layer "F.CrtYd")
|
||||
(uuid "db4a7d7e-3ebf-4e3e-b849-b3d43035c1eb")
|
||||
)
|
||||
(fp_line
|
||||
(start 2.45 2.73)
|
||||
(end 2.45 2.75)
|
||||
(stroke
|
||||
(width 0.05)
|
||||
(type solid)
|
||||
)
|
||||
(layer "F.CrtYd")
|
||||
(uuid "99af9576-5476-4b56-b609-0ef413f2ee60")
|
||||
)
|
||||
(fp_line
|
||||
(start 2.45 2.75)
|
||||
(end -2.45 2.75)
|
||||
(stroke
|
||||
(width 0.05)
|
||||
(type solid)
|
||||
)
|
||||
(layer "F.CrtYd")
|
||||
(uuid "6b6e7274-e7c6-4cce-85bb-15d95e5149cd")
|
||||
)
|
||||
(fp_line
|
||||
(start 3.85 -2.73)
|
||||
(end 3.85 2.73)
|
||||
(stroke
|
||||
(width 0.05)
|
||||
(type solid)
|
||||
)
|
||||
(layer "F.CrtYd")
|
||||
(uuid "007a6b77-671a-49f4-984a-b6e9547780d6")
|
||||
)
|
||||
(fp_line
|
||||
(start 3.85 2.73)
|
||||
(end 2.45 2.73)
|
||||
(stroke
|
||||
(width 0.05)
|
||||
(type solid)
|
||||
)
|
||||
(layer "F.CrtYd")
|
||||
(uuid "f5ad2245-0dab-4f63-849b-6e1406659b97")
|
||||
)
|
||||
(fp_poly
|
||||
(pts
|
||||
(xy -1.2 -2.5) (xy 2.2 -2.5) (xy 2.2 2.5) (xy -2.2 2.5) (xy -2.2 -1.5)
|
||||
)
|
||||
(stroke
|
||||
(width 0.1)
|
||||
(type solid)
|
||||
)
|
||||
(fill no)
|
||||
(layer "F.Fab")
|
||||
(uuid "4077accf-1a5a-4cc6-b3ef-8896e0f7856a")
|
||||
)
|
||||
(fp_text user "${REFERENCE}"
|
||||
(at 0 0 0)
|
||||
(layer "F.Fab")
|
||||
(uuid "cacc690a-a0df-4ac9-b315-5a5307c9d396")
|
||||
(effects
|
||||
(font
|
||||
(size 1 1)
|
||||
(thickness 0.15)
|
||||
)
|
||||
)
|
||||
)
|
||||
(pad "1" smd roundrect
|
||||
(at -2.8625 -2.275)
|
||||
(size 1.475 0.4)
|
||||
(layers "F.Cu" "F.Mask" "F.Paste")
|
||||
(roundrect_rratio 0.25)
|
||||
(uuid "7b360025-32c3-40d1-a781-ac34d4d17e04")
|
||||
)
|
||||
(pad "2" smd roundrect
|
||||
(at -2.8625 -1.625)
|
||||
(size 1.475 0.4)
|
||||
(layers "F.Cu" "F.Mask" "F.Paste")
|
||||
(roundrect_rratio 0.25)
|
||||
(uuid "973a593d-e9f4-4783-ba62-98d77025da88")
|
||||
)
|
||||
(pad "3" smd roundrect
|
||||
(at -2.8625 -0.975)
|
||||
(size 1.475 0.4)
|
||||
(layers "F.Cu" "F.Mask" "F.Paste")
|
||||
(roundrect_rratio 0.25)
|
||||
(uuid "9d65490b-4fab-4eb7-9d36-afa6075874ca")
|
||||
)
|
||||
(pad "4" smd roundrect
|
||||
(at -2.8625 -0.325)
|
||||
(size 1.475 0.4)
|
||||
(layers "F.Cu" "F.Mask" "F.Paste")
|
||||
(roundrect_rratio 0.25)
|
||||
(uuid "8155793c-bb77-43c2-a6d9-0ced975d276d")
|
||||
)
|
||||
(pad "5" smd roundrect
|
||||
(at -2.8625 0.325)
|
||||
(size 1.475 0.4)
|
||||
(layers "F.Cu" "F.Mask" "F.Paste")
|
||||
(roundrect_rratio 0.25)
|
||||
(uuid "314aab7b-54cd-46ca-a20d-dd7ffd4c635a")
|
||||
)
|
||||
(pad "6" smd roundrect
|
||||
(at -2.8625 0.975)
|
||||
(size 1.475 0.4)
|
||||
(layers "F.Cu" "F.Mask" "F.Paste")
|
||||
(roundrect_rratio 0.25)
|
||||
(uuid "3b061eb0-34d2-4a07-9890-926742590246")
|
||||
)
|
||||
(pad "7" smd roundrect
|
||||
(at -2.8625 1.625)
|
||||
(size 1.475 0.4)
|
||||
(layers "F.Cu" "F.Mask" "F.Paste")
|
||||
(roundrect_rratio 0.25)
|
||||
(uuid "4913d9db-714f-4fb6-8f91-30bbef67950a")
|
||||
)
|
||||
(pad "8" smd roundrect
|
||||
(at -2.8625 2.275)
|
||||
(size 1.475 0.4)
|
||||
(layers "F.Cu" "F.Mask" "F.Paste")
|
||||
(roundrect_rratio 0.25)
|
||||
(uuid "2f9c1f7b-e9d0-4198-80a4-271df302154f")
|
||||
)
|
||||
(pad "9" smd roundrect
|
||||
(at 2.8625 2.275)
|
||||
(size 1.475 0.4)
|
||||
(layers "F.Cu" "F.Mask" "F.Paste")
|
||||
(roundrect_rratio 0.25)
|
||||
(uuid "a7ed2e0d-78db-4a20-9020-7ed586b1717a")
|
||||
)
|
||||
(pad "10" smd roundrect
|
||||
(at 2.8625 1.625)
|
||||
(size 1.475 0.4)
|
||||
(layers "F.Cu" "F.Mask" "F.Paste")
|
||||
(roundrect_rratio 0.25)
|
||||
(uuid "6a127c6e-a742-46df-becb-7400550ce052")
|
||||
)
|
||||
(pad "11" smd roundrect
|
||||
(at 2.8625 0.975)
|
||||
(size 1.475 0.4)
|
||||
(layers "F.Cu" "F.Mask" "F.Paste")
|
||||
(roundrect_rratio 0.25)
|
||||
(uuid "b8edbafc-e4a9-4770-92e2-7b1c02e48759")
|
||||
)
|
||||
(pad "12" smd roundrect
|
||||
(at 2.8625 0.325)
|
||||
(size 1.475 0.4)
|
||||
(layers "F.Cu" "F.Mask" "F.Paste")
|
||||
(roundrect_rratio 0.25)
|
||||
(uuid "5cc00e82-99d6-44fd-844d-ef3be92c4da5")
|
||||
)
|
||||
(pad "13" smd roundrect
|
||||
(at 2.8625 -0.325)
|
||||
(size 1.475 0.4)
|
||||
(layers "F.Cu" "F.Mask" "F.Paste")
|
||||
(roundrect_rratio 0.25)
|
||||
(uuid "cb73689b-5050-4f2a-8c1d-796be06984ab")
|
||||
)
|
||||
(pad "14" smd roundrect
|
||||
(at 2.8625 -0.975)
|
||||
(size 1.475 0.4)
|
||||
(layers "F.Cu" "F.Mask" "F.Paste")
|
||||
(roundrect_rratio 0.25)
|
||||
(uuid "d131e25a-3e96-4c5e-adfd-fb493e3545c4")
|
||||
)
|
||||
(pad "15" smd roundrect
|
||||
(at 2.8625 -1.625)
|
||||
(size 1.475 0.4)
|
||||
(layers "F.Cu" "F.Mask" "F.Paste")
|
||||
(roundrect_rratio 0.25)
|
||||
(uuid "c07d59ad-ca57-4f30-a74c-60eb0610b51d")
|
||||
)
|
||||
(pad "16" smd roundrect
|
||||
(at 2.8625 -2.275)
|
||||
(size 1.475 0.4)
|
||||
(layers "F.Cu" "F.Mask" "F.Paste")
|
||||
(roundrect_rratio 0.25)
|
||||
(uuid "2f64934f-1ef8-4e59-b22d-2e64c956811d")
|
||||
)
|
||||
(embedded_fonts no)
|
||||
(model "${KICAD9_3DMODEL_DIR}/Package_SO.3dshapes/TSSOP-16_4.4x5mm_P0.65mm.step"
|
||||
(offset
|
||||
(xyz 0 0 0)
|
||||
)
|
||||
(scale
|
||||
(xyz 1 1 1)
|
||||
)
|
||||
(rotate
|
||||
(xyz 0 0 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
footprints/0_package_SON.pretty/.gitkeep
Normal file
0
footprints/0_package_SON.pretty/.gitkeep
Normal file
0
footprints/0_package_SOT_TO_SMD.pretty/.gitkeep
Normal file
0
footprints/0_package_SOT_TO_SMD.pretty/.gitkeep
Normal file
0
footprints/0_pad.pretty/.gitkeep
Normal file
0
footprints/0_pad.pretty/.gitkeep
Normal file
0
footprints/0_resistor_smd.pretty/.gitkeep
Normal file
0
footprints/0_resistor_smd.pretty/.gitkeep
Normal file
0
footprints/0_switch_button.pretty/.gitkeep
Normal file
0
footprints/0_switch_button.pretty/.gitkeep
Normal file
0
footprints/0_switching_regulator.pretty/.gitkeep
Normal file
0
footprints/0_switching_regulator.pretty/.gitkeep
Normal file
0
footprints/0_testpoint.pretty/.gitkeep
Normal file
0
footprints/0_testpoint.pretty/.gitkeep
Normal file
0
footprints/0_transistor_fet.pretty/.gitkeep
Normal file
0
footprints/0_transistor_fet.pretty/.gitkeep
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
4
symbols/0_passive.bak
Normal file
4
symbols/0_passive.bak
Normal file
@@ -0,0 +1,4 @@
|
||||
(kicad_symbol_lib
|
||||
(version 20231120)
|
||||
(generator kicad_symbol_editor)
|
||||
)
|
||||
@@ -1,4 +1,214 @@
|
||||
(kicad_symbol_lib
|
||||
(version 20231120)
|
||||
(generator kicad_symbol_editor)
|
||||
(version 20241209)
|
||||
(generator "kicad_symbol_editor")
|
||||
(generator_version "9.0")
|
||||
(symbol "ABS07-32.768KHZ-T"
|
||||
(pin_numbers
|
||||
(hide yes)
|
||||
)
|
||||
(pin_names
|
||||
(offset 1.016)
|
||||
(hide yes)
|
||||
)
|
||||
(exclude_from_sim no)
|
||||
(in_bom yes)
|
||||
(on_board yes)
|
||||
(property "Reference" "Y"
|
||||
(at 0 3.81 0)
|
||||
(effects
|
||||
(font
|
||||
(size 1.27 1.27)
|
||||
)
|
||||
)
|
||||
)
|
||||
(property "Value" "ABS07-32.768KHZ-T"
|
||||
(at 0 -3.81 0)
|
||||
(effects
|
||||
(font
|
||||
(size 1.27 1.27)
|
||||
)
|
||||
)
|
||||
)
|
||||
(property "Footprint" "Crystal:Crystal_SMD_3215-2Pin_3.2x1.5mm"
|
||||
(at 0 0 0)
|
||||
(effects
|
||||
(font
|
||||
(size 1.27 1.27)
|
||||
)
|
||||
(hide yes)
|
||||
)
|
||||
)
|
||||
(property "Datasheet" "https://abracon.com/Resonators/ABS07.pdf"
|
||||
(at 0 0 0)
|
||||
(effects
|
||||
(font
|
||||
(size 1.27 1.27)
|
||||
)
|
||||
(hide yes)
|
||||
)
|
||||
)
|
||||
(property "Description" "Two pin crystal"
|
||||
(at 0 0 0)
|
||||
(effects
|
||||
(font
|
||||
(size 1.27 1.27)
|
||||
)
|
||||
(hide yes)
|
||||
)
|
||||
)
|
||||
(property "MPN" "ABS07-32.768KHZ-T"
|
||||
(at 0 0 0)
|
||||
(effects
|
||||
(font
|
||||
(size 1.27 1.27)
|
||||
)
|
||||
(hide yes)
|
||||
)
|
||||
)
|
||||
(property "Digikey_PN" "535-9542-1-ND"
|
||||
(at 0 0 0)
|
||||
(effects
|
||||
(font
|
||||
(size 1.27 1.27)
|
||||
)
|
||||
(hide yes)
|
||||
)
|
||||
)
|
||||
(property "Manufacturer" "Abracon LLC"
|
||||
(at 0 0 0)
|
||||
(effects
|
||||
(font
|
||||
(size 1.27 1.27)
|
||||
)
|
||||
(hide yes)
|
||||
)
|
||||
)
|
||||
(property "Library_Source" "KiCad 9.0 Crystal"
|
||||
(at 0 0 0)
|
||||
(effects
|
||||
(font
|
||||
(size 1.27 1.27)
|
||||
)
|
||||
(hide yes)
|
||||
)
|
||||
)
|
||||
(property "ki_keywords" "quartz ceramic resonator oscillator"
|
||||
(at 0 0 0)
|
||||
(effects
|
||||
(font
|
||||
(size 1.27 1.27)
|
||||
)
|
||||
(hide yes)
|
||||
)
|
||||
)
|
||||
(property "ki_fp_filters" "Crystal*"
|
||||
(at 0 0 0)
|
||||
(effects
|
||||
(font
|
||||
(size 1.27 1.27)
|
||||
)
|
||||
(hide yes)
|
||||
)
|
||||
)
|
||||
(symbol "ABS07-32.768KHZ-T_0_1"
|
||||
(polyline
|
||||
(pts
|
||||
(xy -2.54 0) (xy -1.905 0)
|
||||
)
|
||||
(stroke
|
||||
(width 0)
|
||||
(type default)
|
||||
)
|
||||
(fill
|
||||
(type none)
|
||||
)
|
||||
)
|
||||
(polyline
|
||||
(pts
|
||||
(xy -1.905 -1.27) (xy -1.905 1.27)
|
||||
)
|
||||
(stroke
|
||||
(width 0.508)
|
||||
(type default)
|
||||
)
|
||||
(fill
|
||||
(type none)
|
||||
)
|
||||
)
|
||||
(rectangle
|
||||
(start -1.143 2.54)
|
||||
(end 1.143 -2.54)
|
||||
(stroke
|
||||
(width 0.3048)
|
||||
(type default)
|
||||
)
|
||||
(fill
|
||||
(type none)
|
||||
)
|
||||
)
|
||||
(polyline
|
||||
(pts
|
||||
(xy 1.905 -1.27) (xy 1.905 1.27)
|
||||
)
|
||||
(stroke
|
||||
(width 0.508)
|
||||
(type default)
|
||||
)
|
||||
(fill
|
||||
(type none)
|
||||
)
|
||||
)
|
||||
(polyline
|
||||
(pts
|
||||
(xy 2.54 0) (xy 1.905 0)
|
||||
)
|
||||
(stroke
|
||||
(width 0)
|
||||
(type default)
|
||||
)
|
||||
(fill
|
||||
(type none)
|
||||
)
|
||||
)
|
||||
)
|
||||
(symbol "ABS07-32.768KHZ-T_1_1"
|
||||
(pin passive line
|
||||
(at -3.81 0 0)
|
||||
(length 1.27)
|
||||
(name "1"
|
||||
(effects
|
||||
(font
|
||||
(size 1.27 1.27)
|
||||
)
|
||||
)
|
||||
)
|
||||
(number "1"
|
||||
(effects
|
||||
(font
|
||||
(size 1.27 1.27)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(pin passive line
|
||||
(at 3.81 0 180)
|
||||
(length 1.27)
|
||||
(name "2"
|
||||
(effects
|
||||
(font
|
||||
(size 1.27 1.27)
|
||||
)
|
||||
)
|
||||
)
|
||||
(number "2"
|
||||
(effects
|
||||
(font
|
||||
(size 1.27 1.27)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(embedded_fonts no)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -9,33 +9,20 @@ Reads the following fields from each symbol:
|
||||
Symbol Library column = which .kicad_sym file the symbol lives in.
|
||||
Used to locate a symbol quickly in KiCad Symbol Editor.
|
||||
|
||||
Handles derived symbols (Derive from symbol) by merging parent fields
|
||||
with child overrides so all fields resolve correctly.
|
||||
|
||||
Run locally: python3 .github/scripts/update_component_index.py
|
||||
Run in CI: triggered automatically on push to symbols/
|
||||
"""
|
||||
|
||||
import re
|
||||
import os
|
||||
from pathlib import Path
|
||||
from datetime import date
|
||||
|
||||
SYMBOLS_DIR = Path("symbols")
|
||||
README_PATH = Path("README.md")
|
||||
|
||||
# Maps symbol filename (without extension) to a human-readable category label
|
||||
LIBRARY_LABELS = {
|
||||
"0_ic_logic": "0_ic_logic",
|
||||
"0_ic_mcu": "0_ic_mcu",
|
||||
"0_ic_driver": "0_ic_driver",
|
||||
"0_ic_power": "0_ic_power",
|
||||
"0_ic_analog": "0_ic_analog",
|
||||
"0_ic_rf": "0_ic_rf",
|
||||
"0_ic_interface": "0_ic_interface",
|
||||
"0_passive": "0_passive",
|
||||
"0_connector": "0_connector",
|
||||
"0_discrete": "0_discrete",
|
||||
}
|
||||
|
||||
# Order categories should appear in the table
|
||||
CATEGORY_ORDER = [
|
||||
"0_ic_logic",
|
||||
"0_ic_driver",
|
||||
@@ -50,63 +37,96 @@ CATEGORY_ORDER = [
|
||||
]
|
||||
|
||||
|
||||
def parse_field(symbol_block: str, field_name: str) -> str:
|
||||
"""Extract a named field value from a symbol block."""
|
||||
# KiCad sym format: (property "FieldName" "Value" ...)
|
||||
pattern = rf'\(property\s+"{re.escape(field_name)}"\s+"([^"]*)"'
|
||||
match = re.search(pattern, symbol_block)
|
||||
return match.group(1).strip() if match else ""
|
||||
def extract_all_fields(block: str) -> dict:
|
||||
"""Extract all property fields from a symbol block into a dict."""
|
||||
fields = {}
|
||||
for m in re.finditer(r'\(property\s+"([^"]+)"\s+"([^"]*)"', block):
|
||||
fields[m.group(1)] = m.group(2).strip()
|
||||
return fields
|
||||
|
||||
|
||||
def parse_symbols_from_file(filepath: Path) -> list[dict]:
|
||||
def shorten_footprint(footprint: str) -> str:
|
||||
"""Trim long footprint names for table readability."""
|
||||
if footprint and ":" in footprint:
|
||||
lib_part, fp_name = footprint.split(":", 1)
|
||||
if len(fp_name) > 30:
|
||||
fp_name = fp_name[:27] + "..."
|
||||
return f"{lib_part}:{fp_name}"
|
||||
return footprint
|
||||
|
||||
|
||||
def parse_symbols_from_file(filepath: Path) -> list:
|
||||
"""
|
||||
Parse all symbols from a .kicad_sym file.
|
||||
Returns a list of dicts with keys: name, mpn, description, footprint, digikey_pn, manufacturer
|
||||
|
||||
Handles both normal symbols and derived symbols (Derive from symbol).
|
||||
Derived symbols only store fields that differ from their parent — the
|
||||
parser merges parent fields first then overlays child overrides so all
|
||||
fields resolve correctly.
|
||||
"""
|
||||
content = filepath.read_text(encoding="utf-8")
|
||||
symbols = []
|
||||
|
||||
# Find all top-level symbol blocks
|
||||
# Each starts with: (symbol "NAME"
|
||||
symbol_pattern = re.compile(r'\(symbol\s+"([^"]+)"(?!\s+\(extends)', re.MULTILINE)
|
||||
# --- Pass 1: collect ALL raw symbol blocks indexed by name ---
|
||||
symbol_pattern = re.compile(r'\(symbol\s+"([^"]+)"', re.MULTILINE)
|
||||
all_matches = list(symbol_pattern.finditer(content))
|
||||
|
||||
matches = list(symbol_pattern.finditer(content))
|
||||
raw_blocks = {} # name -> raw text block
|
||||
extends_map = {} # child name -> parent name
|
||||
|
||||
for i, match in enumerate(matches):
|
||||
for i, match in enumerate(all_matches):
|
||||
name = match.group(1)
|
||||
|
||||
# Skip sub-units (contain _ followed by digits at the end e.g. "SN74HC193_0_1")
|
||||
# KiCad uses these internally for multi-unit symbols
|
||||
# Skip KiCad internal sub-unit blocks e.g. SN74HC193DR_0_1
|
||||
if re.search(r'_\d+_\d+$', name):
|
||||
continue
|
||||
|
||||
# Extract the block for this symbol (up to next top-level symbol or end)
|
||||
start = match.start()
|
||||
end = matches[i + 1].start() if i + 1 < len(matches) else len(content)
|
||||
end = all_matches[i + 1].start() if i + 1 < len(all_matches) else len(content)
|
||||
block = content[start:end]
|
||||
raw_blocks[name] = block
|
||||
|
||||
mpn = parse_field(block, "MPN") or parse_field(block, "Value") or name
|
||||
description = (parse_field(block, "ki_description")
|
||||
or parse_field(block, "Description")
|
||||
or parse_field(block, "description")
|
||||
or "")
|
||||
footprint = parse_field(block, "Footprint")
|
||||
digikey_pn = parse_field(block, "Digikey_PN") or parse_field(block, "Digikey PN") or "-"
|
||||
manufacturer = parse_field(block, "Manufacturer") or "-"
|
||||
extends_match = re.search(r'\(extends\s+"([^"]+)"\)', block)
|
||||
if extends_match:
|
||||
extends_map[name] = extends_match.group(1)
|
||||
|
||||
# Shorten footprint for table readability — keep library:name but trim long paths
|
||||
if footprint and ":" in footprint:
|
||||
lib_part, fp_name = footprint.split(":", 1)
|
||||
# Truncate very long footprint names
|
||||
if len(fp_name) > 30:
|
||||
fp_name = fp_name[:27] + "..."
|
||||
footprint = f"{lib_part}:{fp_name}"
|
||||
# --- Pass 2: resolve fields, merging parent into child ---
|
||||
def resolve_fields(name, visited=None):
|
||||
if visited is None:
|
||||
visited = set()
|
||||
if name in visited:
|
||||
return {}
|
||||
visited.add(name)
|
||||
block = raw_blocks.get(name, "")
|
||||
own_fields = extract_all_fields(block)
|
||||
parent_name = extends_map.get(name)
|
||||
if parent_name:
|
||||
parent_fields = resolve_fields(parent_name, visited)
|
||||
return {**parent_fields, **own_fields}
|
||||
return own_fields
|
||||
|
||||
# --- Pass 3: build symbol list ---
|
||||
symbols = []
|
||||
|
||||
for name in raw_blocks:
|
||||
is_derived = name in extends_map
|
||||
fields = resolve_fields(name)
|
||||
mpn = fields.get("MPN") or fields.get("Value") or name
|
||||
|
||||
# Skip base/template symbols — no MPN field, just drawing sources
|
||||
if not is_derived and not fields.get("MPN"):
|
||||
continue
|
||||
|
||||
description = (fields.get("ki_description")
|
||||
or fields.get("Description")
|
||||
or fields.get("description")
|
||||
or "—")
|
||||
footprint = shorten_footprint(fields.get("Footprint", "")) or "-"
|
||||
digikey_pn = fields.get("Digikey_PN") or fields.get("Digikey PN") or "-"
|
||||
manufacturer = fields.get("Manufacturer") or "-"
|
||||
|
||||
symbols.append({
|
||||
"name": name,
|
||||
"mpn": mpn,
|
||||
"description": description,
|
||||
"footprint": footprint or "-",
|
||||
"footprint": footprint,
|
||||
"digikey_pn": digikey_pn,
|
||||
"manufacturer": manufacturer,
|
||||
})
|
||||
@@ -114,7 +134,7 @@ def parse_symbols_from_file(filepath: Path) -> list[dict]:
|
||||
return symbols
|
||||
|
||||
|
||||
def build_component_table(all_symbols: dict[str, list[dict]]) -> str:
|
||||
def build_component_table(all_symbols: dict) -> str:
|
||||
"""Build the full markdown component index table."""
|
||||
lines = []
|
||||
lines.append("| MPN | Description | Manufacturer | Symbol Library | Footprint | Digikey PN |")
|
||||
@@ -128,7 +148,7 @@ def build_component_table(all_symbols: dict[str, list[dict]]) -> str:
|
||||
for s in sorted(symbols, key=lambda x: x["mpn"]):
|
||||
lines.append(
|
||||
f"| {s['mpn']} "
|
||||
f"| {s['description'] or '—'} "
|
||||
f"| {s['description']} "
|
||||
f"| {s['manufacturer']} "
|
||||
f"| {category} "
|
||||
f"| {s['footprint']} "
|
||||
@@ -143,13 +163,11 @@ def build_component_table(all_symbols: dict[str, list[dict]]) -> str:
|
||||
|
||||
def update_readme(new_table: str) -> bool:
|
||||
"""
|
||||
Replace the content between the Component Index header and the next
|
||||
top-level ## header in README.md with the new table.
|
||||
Replace the Component Index section in README.md with the new table.
|
||||
Returns True if the file was changed.
|
||||
"""
|
||||
readme = README_PATH.read_text(encoding="utf-8")
|
||||
|
||||
# Match from ## Component Index to the next ## section or end of file
|
||||
pattern = re.compile(
|
||||
r'(## Component Index\n+)(.*?)(\n## |\Z)',
|
||||
re.DOTALL
|
||||
@@ -178,14 +196,14 @@ def update_readme(new_table: str) -> bool:
|
||||
|
||||
def main():
|
||||
if not SYMBOLS_DIR.exists():
|
||||
print(f"ERROR: symbols/ directory not found. Run from repo root.")
|
||||
print("ERROR: symbols/ directory not found. Run from repo root.")
|
||||
return
|
||||
|
||||
if not README_PATH.exists():
|
||||
print(f"ERROR: README.md not found. Run from repo root.")
|
||||
print("ERROR: README.md not found. Run from repo root.")
|
||||
return
|
||||
|
||||
all_symbols: dict[str, list[dict]] = {}
|
||||
all_symbols = {}
|
||||
|
||||
for sym_file in sorted(SYMBOLS_DIR.glob("*.kicad_sym")):
|
||||
lib_name = sym_file.stem
|
||||
|
||||
Reference in New Issue
Block a user