[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-cvs: pcb.git: branch: master updated (23ce99f3dc445e611fd501074c7c9514aad800d7)



The branch, master has been updated
       via  23ce99f3dc445e611fd501074c7c9514aad800d7 (commit)
      from  73de75e137a6c847259ecf4cabf4f70a86074584 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


=========
 Summary
=========

 lib/geda.inc |   15 ++++++++-
 lib/misc.inc |   94 ++++++++++++++++++++++++++++++++++++++++++++++-----------
 2 files changed, 90 insertions(+), 19 deletions(-)


=================
 Commit Messages
=================

commit 23ce99f3dc445e611fd501074c7c9514aad800d7
Author: Wojciech Kazubski <wk0@xxxxx>
Commit: Krzysztof KoÅ?ciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>

    add more crystal footprints to m4 library
    
    Currently m4 symbols contain one footprint for crystal holder (HC49),
    wich is not accurate, pin spacing is a bit too big and the outline is
    too small.
    
    This patch adds several m4 crystal holder footprints of different size,
    2 or 3 pin, both standing and laying.
    
    Closes-bug: lp-699440
    Reviewed-by: Bert Timmerman <bert.timmerman@xxxxxxxxx>
    Reviewed-by: Krzysztof KoÅ?ciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>

:100644 100644 b2a2310... a56b6ea... M	lib/geda.inc
:100755 100755 45def93... 380d511... M	lib/misc.inc

=========
 Changes
=========

commit 23ce99f3dc445e611fd501074c7c9514aad800d7
Author: Wojciech Kazubski <wk0@xxxxx>
Commit: Krzysztof KoÅ?ciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>

    add more crystal footprints to m4 library
    
    Currently m4 symbols contain one footprint for crystal holder (HC49),
    wich is not accurate, pin spacing is a bit too big and the outline is
    too small.
    
    This patch adds several m4 crystal holder footprints of different size,
    2 or 3 pin, both standing and laying.
    
    Closes-bug: lp-699440
    Reviewed-by: Bert Timmerman <bert.timmerman@xxxxxxxxx>
    Reviewed-by: Krzysztof KoÅ?ciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>

diff --git a/lib/geda.inc b/lib/geda.inc
index b2a2310..a56b6ea 100644
--- a/lib/geda.inc
+++ b/lib/geda.inc
@@ -608,7 +608,20 @@ define(`PKG_RCY1100P', `PKG_RADIAL_CAN(`$1', `$2', `$3', 2200, 1)');
 define(`PKG_RCY1200P', `PKG_RADIAL_CAN(`$1', `$2', `$3', 2400, 1)');
 
 #
-##  Crystal
+##  Crystals
+#
+#
+define(`PKG_HC49U',   `PKG_CRYSTAL_V(`$1', `$2', `$3', 192, 435, 183,  60, 32, 2)');
+define(`PKG_HC49UH',  `PKG_CRYSTAL_H(`$1', `$2', `$3', 192, 435, 515,  60, 32, 2)');
+define(`PKG_HC49U_3', `PKG_CRYSTAL_V(`$1', `$2', `$3',  96, 435, 183,  60, 32, 3)');
+define(`PKG_HC49U_3H',`PKG_CRYSTAL_H(`$1', `$2', `$3',  96, 435, 515,  60, 32, 3)');
+define(`PKG_HC51U',   `PKG_CRYSTAL_V(`$1', `$2', `$3', 485, 757, 352,  80, 40, 2)');
+define(`PKG_HC51UH',  `PKG_CRYSTAL_H(`$1', `$2', `$3', 485, 757, 775,  80, 40, 2)');
+define(`PKG_UM1',     `PKG_CRYSTAL_V(`$1', `$2', `$3', 148, 311, 126,  60, 32, 2)');
+define(`PKG_UM1H',    `PKG_CRYSTAL_H(`$1', `$2', `$3', 148, 311, 322,  60, 32, 2)');
+define(`PKG_UM1_3',   `PKG_CRYSTAL_V(`$1', `$2', `$3',  74, 311, 126,  60, 32, 3)');
+define(`PKG_UM1_3H',  `PKG_CRYSTAL_H(`$1', `$2', `$3',  74, 311, 322,  60, 32, 3)');
+#
 #   HC49
 #
 define(`PKG_HC49',  `PKG_CRYSTAL(`$1', `$2', `$3', 300)');
diff --git a/lib/misc.inc b/lib/misc.inc
index 45def93..380d511 100755
--- a/lib/misc.inc
+++ b/lib/misc.inc
@@ -348,30 +348,88 @@ Element(0x00 "$1" "`$2'" "$3" eval(X2+20) eval(Y2+20) 0 100 0x00)
 )')
 
 # -------------------------------------------------------------------
-# an crystal package
-# Pin 1 is K, 2 is A
-# 
+#
+# general purpose crystal standing, 2 or 3 pins
 # $1: canonical name
 # $2: name on PCB
 # $3: value
-# $4: package width in MIL
+# $4: pin spacing in mil
+# $5: length of component in mil
+# $6: width of component in mil
+# $7: diametr of pad in mil
+# $8: diametr of drill in mil
+# $9: number of pins
 #
-define(`PKG_CRYSTAL',
-	`define(`X1', `100')
-	define(`X2', `$4')
-	define(`Y', `100')
-	define(`Y1', `eval(Y -50)')
-	define(`Y2', `eval(Y +50)')
-Element(0x00 "$1" "`$2'" "$3" X1 eval(Y2+20) 0 100 0x00)
+define(`PKG_CRYSTAL_V',
+       `define(`spacing',  `$4')
+	define(`sizX',     `$5')
+	define(`sizY',     `$6')
+	define(`pad',      `$7')
+	define(`drill',    `$8')
+	define(`centerY',  `eval(sizY / 2)')
+	define(`pinX',    `eval((sizX - spacing * (`$9'-1)) /2)')
+
+Element(0x00 "$1" "$2" "$3" 0 eval(0 - 60) 0 100 0x00)
 (
-	PIN(X1, Y, 60, 28, 1)
-	PIN(X2, Y, 60, 28, 2)
-	ElementLine(X1 Y1 X2 Y1 10)
-	ElementLine(X1 Y2 X2 Y2 10)
-	ElementArc(X1 Y 50 50 270 180 10)
-	ElementArc(X2 Y 50 50 90 180 10)
-	Mark (X1 Y)
+	PIN(pinX, centerY, pad, drill, 1)
+	PIN(eval(pinX + spacing), centerY, pad, drill, 2)
+	ifelse(eval(`$9' == 3), 1,
+	PIN(eval(pinX + 2 * spacing), centerY, pad, drill, 3))
+
+	ElementLine(centerY 0 eval(sizX-centerY) 0 20)
+	ElementArc(eval(sizX-centerY) centerY centerY centerY 90 180 20)
+	ElementLine(eval(sizX-centerY) sizY centerY sizY 20)
+	ElementArc(centerY centerY centerY centerY 270 180 20)
+
+	Mark(pinX centerY)
 )')
+#
+#
+# general purpose crystal laying, 2 or 3 pins
+# $1: canonical name
+# $2: name on PCB
+# $3: value
+# $4: pin spacing in mil
+# $5: length of component in mil
+# $6: height of component in mil
+# $7: diametr of pad in mil
+# $8: diametr of drill in mil
+# $9: number of pins
+#
+define(`PKG_CRYSTAL_H',
+       `define(`base',     `$4')
+	define(`sizX',     `$5')
+	define(`sizY',     `$6')
+	define(`pad',      `$7')
+	define(`drill',    `$8')
+	define(`pinX',     `eval((sizX - base * (`$9'-1)) /2)')
+	define(`pinY',     `ifelse(eval(sizX > 500),1,eval(sizY+200),eval(sizY+100))')
+	define(`maxY',     `eval(sizY + offset)')
+
+Element(0x00 "$1" "$2" "$3" 0 eval(0 - 60) 0 100 0x00)
+(
+	PIN(pinX, pinY, pad, drill, 1)
+	PIN(eval(pinX + base), pinY, pad, drill, 2)
+	ifelse(eval(`$9' == 3), 1,
+	PIN(eval(pinX + 2 * base), pinY, pad, drill, 3))
+
+	ElementLine(0 0 sizX 0 20)
+	ElementLine(sizX 0 sizX sizY 20)
+	ElementLine(sizX sizY 0 sizY 20)
+	ElementLine(0 sizY 0 0 20)
+
+	Mark(pinX pinY)
+)')
+
+# a crystal package for backward compatibility
+#
+# $1: canonical name
+# $2: name on PCB
+# $3: value
+# $4: package width in MIL
+#
+define(`PKG_CRYSTAL',`PKG_CRYSTAL_V(`$1',`$2',`$3',`eval($4-100)',`$4',`100',`60',`28',`2')')
+
 
 # -------------------------------------------------------------------
 # a can oscillator package



_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs