From 499df0ea40c1b5ed191374e17ce00d707d47aaf2 Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Sun, 12 Sep 2010 17:01:54 -0300 Subject: [PATCH] Added generation of Yageo RC0402 resistors. We can now produce the full BOM. - bom/lib/e12.inc: added _E12_1 translation - bom/yageo.gen: added RC0402 resistor series --- bom/lib/e12.inc | 32 +++++++++++++++++++++++++++++--- bom/yageo.gen | 12 ++++++++++++ 2 files changed, 41 insertions(+), 3 deletions(-) diff --git a/bom/lib/e12.inc b/bom/lib/e12.inc index 02614d7..b41477e 100644 --- a/bom/lib/e12.inc +++ b/bom/lib/e12.inc @@ -1,3 +1,26 @@ +# E12 scale + +_E12_1=(??)0 -> _E12=${_E12_1:1} +_E12_1=(??)1 -> _E12=${_E12_1:1}0 +_E12_1=(?)(?)2 -> _E12=$_E12_1:1.${_E12_1:2}k +_E12_1=(??)3 -> _E12=${_E12_1:1}k +_E12_1=(??)4 -> _E12=${_E12_1:1}0k +_E12_1=(?)(?)5 -> _E12=$_E12_1:1.${_E12_1:2}M +_E12_1=(??)6 -> _E12=${_E12_1:1}M +_E12_1=(??)7 -> _E12=${_E12_1:1}0M +_E12_1=(?)R(?) -> _E12=$_E12_1:1.$_E12_1:2 + +# E96 scale + +_E12_1=(???)0 -> _E12=${_E12_1:1} +_E12_1=(?)(??)1 -> _E12=$_E12_1:1.${_E12_1:2}k +_E12_1=(??)(?)2 -> _E12=$_E12_1:1.${_E12_1:2}k +_E12_1=(???)3 -> _E12=${_E12_1:1}k +_E12_1=(?)(??)4 -> _E12=$_E12_1:1.${_E12_1:2}M +_E12_1=(??)(?)5 -> _E12=$_E12_1:1.${_E12_1:2}M +_E12_1=(?)R(??) -> _E12=$_E12_1:1.$_E12_1:2 +_E12_1=(??)R(?) -> _E12=$_E12_1:1.$_E12_1:2 + # E12 scale, base multiplier is 10^-12 (pico) _E12_P=(??)8 -> _E12=${_E12_P:1}0f @@ -12,8 +35,11 @@ _E12_P=(??)6 -> _E12=${_E12_P:1}u _E12_P=(??)7 -> _E12=${_E12_P:1}0u _E12_P=(?)R(?) -> _E12=$_E12_P:1.${_E12_P:2}p # strange -# remove trailing zeroes +# remove leading and trailing zeroes -_E12=(*).0([fpnu]) -> _E12=$_E12:1$_E12:2 -_E12=(*).0 -> _E12=$_E12:1 +_E12=0([0-9]*) -> _E12=$_E12:1 +_E12=(*.[0-9]*)0([fpnumkM]) -> _E12=$_E12:1$_E12:2 +_E12=(*).0([fpnumkM]) -> _E12=$_E12:1$_E12:2 +_E12=(*.[0-9]*)0 -> _E12=$_E12:1 +_E12=(*).0 -> _E12=$_E12:1 diff --git a/bom/yageo.gen b/bom/yageo.gen index 2869861..98b48b0 100644 --- a/bom/yageo.gen +++ b/bom/yageo.gen @@ -1,5 +1,17 @@ #GEN +# http://www.yageo.com/pdf/Pu-RC0402_51_PbFree_L_2.pdf + +RC* -> T=R { + RC(????)(?)?-??(*)L -> + FP=$REF:1 _TOL=$REF:2 _R=$REF:3 + + include lib/captol.inc + + FP=0402 -> P=1/16W V=50V + _R=$R -> R=$_R ! +} + # http://www.yageo.com/pdf/yageo/NP0_16V-to-100V_6.pdf # http://www.yageo.com/pdf/UPY-GPHC_X7R_6.3V-to-50V_3.pdf