From d7f43af9b2c585ffe607ec1ab4a55916e6211aa0 Mon Sep 17 00:00:00 2001
From: Krisjanis Rijnieks <krisjanis.rijnieks@gmail.com>
Date: Fri, 8 Jan 2021 16:36:09 +0200
Subject: [PATCH] Add crystal CERAMIC RES 20.0000MHZ 15PF SMD

---
 fab.dcm                                 |  6 +++++
 fab.lib                                 | 19 ++++++++++++++
 fab.pretty/Crystal_ECS-CR2-20.kicad_mod | 33 +++++++++++++++++++++++++
 3 files changed, 58 insertions(+)
 create mode 100644 fab.pretty/Crystal_ECS-CR2-20.kicad_mod

diff --git a/fab.dcm b/fab.dcm
index db2eaef..cd8de7a 100644
--- a/fab.dcm
+++ b/fab.dcm
@@ -52,6 +52,12 @@ K battery charger lithium
 F http://ww1.microchip.com/downloads/en/DeviceDoc/MCP73831-Family-Data-Sheet-DS20001984H.pdf
 $ENDCMP
 #
+$CMP Crystal_ECS-CR2-20
+D 20MHz Ceramic Resonator Built in Capacitor 15pF ±0.3%  -20°C ~ 80°C Surface Mount
+K Ceramic Resonator Crystal Oscillator Surface Mount
+F https://ecsxtal.com/store/pdf/ecs_cr2_b.pdf
+$ENDCMP
+#
 $CMP DRV883_MOTOR_DRIVER
 D Low-Voltage H-Bridge Motor Driver 8-WSON (2x2) in Package
 K h-bridge half bridge motor driver
diff --git a/fab.lib b/fab.lib
index b857640..5987dc6 100644
--- a/fab.lib
+++ b/fab.lib
@@ -607,6 +607,25 @@ X PROG 5 -400 -100 100 R 50 50 1 1 I
 ENDDRAW
 ENDDEF
 #
+# Crystal_ECS-CR2-20
+#
+DEF Crystal_ECS-CR2-20 X 0 20 Y Y 1 F N
+F0 "X" -200 250 50 H V L CNN
+F1 "Crystal_ECS-CR2-20" 50 -250 50 H V L CNN
+F2 "fab:ECS-CR2-20" 450 -350 50 H I C CNN
+F3 "" -175 125 50 H I C CNN
+$FPLIST
+ Oscillator*SMD*ECS*2520MV*2.5x2.0mm*
+$ENDFPLIST
+DRAW
+S -300 200 300 -200 0 1 10 f
+P 9 0 1 0 -175 100 -150 100 -150 150 -125 150 -125 100 -100 100 -100 150 -75 150 -75 100 N
+X IN_OUT 1 -400 0 100 R 50 50 1 1 I
+X GND 2 0 -300 100 U 50 50 1 1 W
+X OUT_IN 3 400 0 100 L 50 50 1 1 O
+ENDDRAW
+ENDDEF
+#
 # DRV883_MOTOR_DRIVER
 #
 DEF DRV883_MOTOR_DRIVER U 0 40 Y Y 1 F N
diff --git a/fab.pretty/Crystal_ECS-CR2-20.kicad_mod b/fab.pretty/Crystal_ECS-CR2-20.kicad_mod
new file mode 100644
index 0000000..5ca833a
--- /dev/null
+++ b/fab.pretty/Crystal_ECS-CR2-20.kicad_mod
@@ -0,0 +1,33 @@
+(module Crystal_ECS-CR2-20 (layer F.Cu) (tedit 5FF86D92)
+  (descr "SMD Resomator/Filter Murata SFECV, http://cdn-reichelt.de/documents/datenblatt/B400/SFECV-107.pdf, 6.9x2.9mm^2 package")
+  (tags "SMD SMT ceramic resonator filter filter")
+  (attr smd)
+  (fp_text reference REF** (at 0 -3) (layer F.SilkS)
+    (effects (font (size 1 1) (thickness 0.15)))
+  )
+  (fp_text value Crystal_ECS-CR2-20 (at 0 3) (layer F.Fab)
+    (effects (font (size 1 1) (thickness 0.15)))
+  )
+  (fp_line (start 2.05 -2.3) (end -2.175 -2.3) (layer F.CrtYd) (width 0.05))
+  (fp_line (start 2.05 2.3) (end 2.05 -2.3) (layer F.CrtYd) (width 0.05))
+  (fp_line (start -2.175 2.3) (end 2.05 2.3) (layer F.CrtYd) (width 0.05))
+  (fp_line (start -2.175 -2.3) (end -2.175 2.3) (layer F.CrtYd) (width 0.05))
+  (fp_line (start -2.025 2.2) (end 1.925 2.2) (layer F.SilkS) (width 0.12))
+  (fp_line (start -2.025 -2.2) (end -2.025 2.2) (layer F.SilkS) (width 0.12))
+  (fp_line (start -1.775 0.55) (end -0.775 1.55) (layer F.Fab) (width 0.1))
+  (fp_line (start 1.75 -1.55) (end -1.775 -1.55) (layer F.Fab) (width 0.1))
+  (fp_line (start 1.75 1.55) (end 1.75 -1.55) (layer F.Fab) (width 0.1))
+  (fp_line (start -1.775 1.55) (end 1.75 1.55) (layer F.Fab) (width 0.1))
+  (fp_line (start -1.775 -1.55) (end -1.775 1.55) (layer F.Fab) (width 0.1))
+  (fp_text user %R (at 0 0) (layer F.Fab)
+    (effects (font (size 1 1) (thickness 0.15)))
+  )
+  (pad 1 smd rect (at -1.5 0) (size 0.7 4.1) (layers F.Cu F.Paste F.Mask))
+  (pad 2 smd rect (at 0 0) (size 1 4.1) (layers F.Cu F.Paste F.Mask))
+  (pad 3 smd rect (at 1.5 0) (size 0.7 4.1) (layers F.Cu F.Paste F.Mask))
+  (model ${KISYS3DMOD}/Crystal.3dshapes/Resonator_SMD_muRata_SFECV-3Pin_6.9x2.9mm.wrl
+    (at (xyz 0 0 0))
+    (scale (xyz 1 1 1))
+    (rotate (xyz 0 0 0))
+  )
+)
-- 
GitLab