From 3d2d2d7519373bb06279a973ac44ee5817435d0c Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sun, 4 Oct 2015 03:53:25 -0700 Subject: [PATCH] Add symbol and package for KL02 QFN-16 Signed-off-by: Keith Packard --- packages/Makefile | 3 +- packages/qfn16-3x3.5c | 146 ++++++++++++++++++++++++ symbols/freescale/kl02_fg.sym | 205 ++++++++++++++++++++++++++++++++++ 3 files changed, 353 insertions(+), 1 deletion(-) create mode 100644 packages/qfn16-3x3.5c create mode 100644 symbols/freescale/kl02_fg.sym diff --git a/packages/Makefile b/packages/Makefile index 602e7e3..d5d7b4d 100644 --- a/packages/Makefile +++ b/packages/Makefile @@ -88,7 +88,8 @@ FOOTPRINTS= \ DO-214AC.fp \ BU2032SM.fp \ TO252AA.fp \ - vbrite.fp + vbrite.fp \ + qfn16-3x3.fp .5c.fp: nickle $*.5c > $@ diff --git a/packages/qfn16-3x3.5c b/packages/qfn16-3x3.5c new file mode 100644 index 0000000..fedd52c --- /dev/null +++ b/packages/qfn16-3x3.5c @@ -0,0 +1,146 @@ +/* + * Copyright © 2012 Keith Packard + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + */ + +load "footprint.5c" +import Footprint; + +real pad_width = 0.55; +real metal_width = 0.32; +real metal_height = 0.24; +real pad_height = 0.30; +real pad_spacing = 0.50; +real pad_clearance = 12 / 1000 * 25.4; + +real center_width = 2; +real center_height = 2; + +real package_width = 3; +real package_height = 3; + +real pad_x_off = package_width / 2 - metal_width; +real pad_y_off = package_height / 2 - metal_width; + +real num_pad = 4; /* per side */ + +element_start("qfn16-3x3"); + +real pad_off(int n) { + return pad_spacing * (n - (num_pad - 1) / 2); +} + +real corner(int dx, int dy) { + real x = dx * package_width / 2; + real y = dy * package_height / 2; + real len = 0.4; + + line(x, y, x - dx * len, y); + line(x, y, x, y - dy * len); +} + +corner(-1, -1); +corner(1, -1); +corner(-1, 1); +corner(1, 1); + +real dot_off = .3; + +line(-package_width/2 + dot_off, -package_height/2 + dot_off, + -package_width/2 + dot_off, -package_height/2 + dot_off); + +for (pad = 0; pad < num_pad; pad++) { + /* left side (1-4) */ + + pad_mm_clear(-pad_x_off - pad_width / 2, + pad_off(pad), + pad_width, + pad_height, + pad_clearance, + sprintf("%d", pad + 1), + sprintf("%d", pad + 1)); + + /* bottom (5-8) */ + + pad_mm_clear(pad_off(pad), + pad_y_off + pad_width / 2, + pad_height, + pad_width, + pad_clearance, + sprintf("%d", pad + 5), + sprintf("%d", pad + 5)); + + /* right side (9-12) */ + + pad_mm_clear(pad_x_off + pad_width / 2, + -pad_off(pad), + pad_width, + pad_height, + pad_clearance, + sprintf("%d", pad + 9), + sprintf("%d", pad + 9)); + + /* top (13-16) */ + + pad_mm_clear(-pad_off(pad), + -pad_y_off - pad_width / 2, + pad_height, + pad_width, + pad_clearance, + sprintf("%d", pad + 13), + sprintf("%d", pad + 13)); + +} + +int pad_blocks = 3; + +real block_width = center_width / pad_blocks; +real block_height = center_height / pad_blocks; + +real block_x(int x) = (x - (pad_blocks - 1)/2) * block_width; +real block_y(int y) = (y - (pad_blocks - 1)/2) * block_height; + +bool via_block(int x, int y) { + return (x & 1) == 0 && (y & 1) == 0; +} + +real via_hole = 13/1000 * 25.4; /* 13 mil drill */ +real via_copper = 7/1000 * 25.4; /* 5.6 mil anulus */ + +for (int pad_y = 0; pad_y < pad_blocks; pad_y++) { + for (int pad_x = 0; pad_x < pad_blocks; pad_x++) + if (via_block(pad_x, pad_y)) { + pin_mm_clear_mask(block_x(pad_x), block_y(pad_y), + via_hole, via_hole + 2 * via_copper, pad_clearance, 0, + "GND", "GND"); + pad_mm_clear_mask_options(block_x(pad_x), block_y(pad_y), + block_width, block_height, + pad_clearance, 0, + "GND", "GND","square,nopaste"); + } else { + /* full square of metal */ + pad_mm_clear_options(block_x(pad_x), block_y(pad_y), + block_width, block_height, + 0, + "GND", "GND","square,nopaste"); + /* 1/4 full of solder paste */ + pad_mm_clear_options(block_x(pad_x), block_y(pad_y), + block_width/2, block_height/2, + 0, + "GND", "GND","square"); + } +} + +element_end(); diff --git a/symbols/freescale/kl02_fg.sym b/symbols/freescale/kl02_fg.sym new file mode 100644 index 0000000..42c8d30 --- /dev/null +++ b/symbols/freescale/kl02_fg.sym @@ -0,0 +1,205 @@ +v 20130925 2 +B 400 400 10100 4100 3 0 0 0 -1 -1 0 -1 -1 -1 -1 -1 +T 5300 2700 8 10 0 0 0 0 1 +numslots=1 +T 5300 3000 8 10 0 0 0 0 1 +slot=1 +T -105 -600 8 10 0 1 0 0 1 +footprint=qfn16-3x3 +T -105 -600 8 10 0 1 0 0 1 +vendor=digikey +T 395 4600 8 10 1 1 0 0 1 +refdes=U? +T 395 12500 8 10 0 1 0 0 1 +loadstatus=smt +T -105 -600 8 10 0 1 0 0 1 +vendor_part_number=??? +T -105 -600 8 10 0 1 0 0 1 +mfg_part_number=MKL02Z32VFG4 +P 5300 4900 5300 4500 1 0 0 +{ +T 5300 4900 5 10 0 0 0 0 1 +pintype=unknown +T 5300 4445 5 10 1 1 90 6 1 +pinlabel=vdd +T 5250 4595 5 10 1 1 90 0 1 +pinnumber=1 +T 5300 4900 5 10 0 0 0 0 1 +pinseq=0 +} +P 5300 0 5300 400 1 0 0 +{ +T 5300 0 5 10 0 0 0 0 1 +pintype=unknown +T 5300 455 5 10 1 1 90 0 1 +pinlabel=vss +T 5250 305 5 10 1 1 90 6 1 +pinnumber=2 +T 5300 0 5 10 0 0 0 0 1 +pinseq=0 +} +P 0 3800 400 3800 1 0 0 +{ +T 0 3800 5 10 0 0 0 0 1 +pintype=unknown +T 455 3795 5 10 1 1 0 0 1 +pinlabel=ADC0_SE12/CMP0_IN2 PTA0/IRQ0 TPM1_CH0 SWD_CLK +T 305 3845 5 10 1 1 0 6 1 +pinnumber=14 +T 0 3800 5 10 0 0 0 0 1 +pinseq=0 +} +P 0 3400 400 3400 1 0 0 +{ +T 0 3400 5 10 0 0 0 0 1 +pintype=unknown +T 455 3395 5 10 1 1 0 0 1 +pinlabel=PTA1/IRQ_1/LPTMR0_ALT1 TPM_CLKIN0 RESET_b +T 305 3445 5 10 1 1 0 6 1 +pinnumber=15 +T 0 3400 5 10 0 0 0 0 1 +pinseq=0 +} +P 0 3000 400 3000 1 0 0 +{ +T 0 3000 5 10 0 0 0 0 1 +pintype=unknown +T 455 2995 5 10 1 1 0 0 1 +pinlabel=PTA2 CMP0_OUT SWD_DIO +T 305 3045 5 10 1 1 0 6 1 +pinnumber=16 +T 0 3000 5 10 0 0 0 0 1 +pinseq=0 +} +P 0 2600 400 2600 1 0 0 +{ +T 0 2600 5 10 0 0 0 0 1 +pintype=unknown +T 455 2595 5 10 1 1 0 0 1 +pinlabel=EXTAL0 PTA3 I2C0_SCL I2C1_SDA +T 305 2645 5 10 1 1 0 6 1 +pinnumber=3 +T 0 2600 5 10 0 0 0 0 1 +pinseq=0 +} +P 0 2200 400 2200 1 0 0 +{ +T 0 2200 5 10 0 0 0 0 1 +pintype=unknown +T 455 2195 5 10 1 1 0 0 1 +pinlabel=XTAL0 PTA4 I2C0_SDA I2C1_SCL +T 305 2245 5 10 1 1 0 6 1 +pinnumber=4 +T 0 2200 5 10 0 0 0 0 1 +pinseq=0 +} +P 0 1800 400 1800 1 0 0 +{ +T 0 1800 5 10 0 0 0 0 1 +pintype=unknown +T 455 1795 5 10 1 1 0 0 1 +pinlabel=PTA5 TMP0_CH1 SPI0_SS_b +T 305 1845 5 10 1 1 0 6 1 +pinnumber=5 +T 0 1800 5 10 0 0 0 0 1 +pinseq=0 +} +P 0 1400 400 1400 1 0 0 +{ +T 0 1400 5 10 0 0 0 0 1 +pintype=unknown +T 455 1395 5 10 1 1 0 0 1 +pinlabel=PTA6 TMP0_CH0 SPI0_MISO +T 305 1445 5 10 1 1 0 6 1 +pinnumber=6 +T 0 1400 5 10 0 0 0 0 1 +pinseq=0 +} +P 0 1000 400 1000 1 0 0 +{ +T 0 1000 5 10 0 0 0 0 1 +pintype=unknown +T 455 995 5 10 1 1 0 0 1 +pinlabel=ADC0_SE7 PTA7/IRQ_4 SPI0_MISO SPI0_MOSI +T 305 1045 5 10 1 1 0 6 1 +pinnumber=7 +T 0 1000 5 10 0 0 0 0 1 +pinseq=0 +} +P 10900 3800 10500 3800 1 0 0 +{ +T 10900 3800 5 10 0 0 0 0 1 +pintype=unknown +T 10445 3795 5 10 1 1 0 6 1 +pinlabel=ADC0_SE6 PTB0/IRQ_5 EXTRG_IN SPI0_SCK +T 10595 3845 5 10 1 1 0 0 1 +pinnumber=8 +T 10900 3800 5 10 0 0 0 0 1 +pinseq=0 +} +P 10900 3400 10500 3400 1 0 0 +{ +T 10900 3400 5 10 0 0 0 0 1 +pintype=unknown +T 10445 3395 5 10 1 1 0 6 1 +pinlabel=ADC0_SE5/CMP0_IN3 PTB1/IRQ_6 UART0_TX UART0_RX +T 10595 3445 5 10 1 1 0 0 1 +pinnumber=9 +T 10900 3400 5 10 0 0 0 0 1 +pinseq=0 +} +P 10900 3000 10500 3000 1 0 0 +{ +T 10900 3000 5 10 0 0 0 0 1 +pintype=unknown +T 10445 2995 5 10 1 1 0 6 1 +pinlabel=ADC0_SE4 PTB2/IRQ_7 UART0_RX UART0_TX +T 10595 3045 5 10 1 1 0 0 1 +pinnumber=10 +T 10900 3000 5 10 0 0 0 0 1 +pinseq=0 +} +P 10900 2600 10500 2600 1 0 0 +{ +T 10900 2600 5 10 0 0 0 0 1 +pintype=unknown +T 10445 2595 5 10 1 1 0 6 1 +pinlabel=PTB3/IRQ_10 I2C0_SCL UART0_TX +T 10595 2645 5 10 1 1 0 0 1 +pinnumber=11 +T 10900 2600 5 10 0 0 0 0 1 +pinseq=0 +} +P 10900 2200 10500 2200 1 0 0 +{ +T 10900 2200 5 10 0 0 0 0 1 +pintype=unknown +T 10445 2195 5 10 1 1 0 6 1 +pinlabel=PTB4/IRQ_11 I2C0_SDA UART0_RX +T 10595 2245 5 10 1 1 0 0 1 +pinnumber=12 +T 10900 2200 5 10 0 0 0 0 1 +pinseq=0 +} +P 10900 1800 10500 1800 1 0 0 +{ +T 10900 1800 5 10 0 0 0 0 1 +pintype=unknown +T 10445 1795 5 10 1 1 0 6 1 +pinlabel=ADC0_SE1/CMP0_IN1 PTB5/IRQ_12 TPM1_CH1 NMI_b +T 10595 1845 5 10 1 1 0 0 1 +pinnumber=13 +T 10900 1800 5 10 0 0 0 0 1 +pinseq=0 +} +P 5700 0 5700 400 1 0 0 +{ +T 5700 0 5 10 0 0 0 0 1 +pintype=unknown +T 5700 455 5 10 1 1 90 0 1 +pinlabel=vss +T 5550 405 5 10 1 1 90 8 1 +pinnumber=GND +T 5700 0 5 10 0 0 0 0 1 +pinseq=0 +} -- 2.47.2