From ebf61e2e3392914d9688874a1f34da916c708ce5 Mon Sep 17 00:00:00 2001 From: Carl Allendorph Date: Thu, 17 Oct 2024 14:26:22 -0700 Subject: [PATCH] Added 'Termination' module with initial termination modules --- src/circuits.stanza | 2 +- src/circuits/Termination.stanza | 35 +++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 src/circuits/Termination.stanza diff --git a/src/circuits.stanza b/src/circuits.stanza index 0830b7d5..0ed21553 100644 --- a/src/circuits.stanza +++ b/src/circuits.stanza @@ -6,5 +6,5 @@ defpackage jsl/circuits: forward jsl/circuits/CrystalResonator forward jsl/circuits/Network forward jsl/circuits/Pullups + forward jsl/circuits/Termination forward jsl/circuits/utils - \ No newline at end of file diff --git a/src/circuits/Termination.stanza b/src/circuits/Termination.stanza new file mode 100644 index 00000000..9932dec0 --- /dev/null +++ b/src/circuits/Termination.stanza @@ -0,0 +1,35 @@ +#use-added-syntax(jitx) +defpackage jsl/circuits/Termination: + import core + import jitx + import jitx/parts + + +doc: \ +Create a typical shield termination + +This type is intended mostly for prototypes where the +exact termination requirements aren't completely known. +We're giving ourselves options for testing. + +Default is a simple RC parallel circuit. + +@member SHIELD Connected to the shield of a connector, etc. +@member GND Ground plane connection for the termination. + +@param R-query Resistor query parameters - default is `ResistorQuery()`. +@param C-query Capacitor query parameters. Default sets a min rated +voltage of 50.0V. + +public defn shield-termination ( + R-query:ResistorQuery = ResistorQuery(), + C-query:CapacitorQuery = CapacitorQuery(rated-voltage = AtLeast(50.0)) + ) -> Instantiable: + + pcb-module shield-term-t : + port SHIELD + port GND + insert-resistor(SHIELD, GND, R-query, resistance = 0.0, inst-name = "R") + insert-capacitor(SHIELD, GND, C-query, capacitance = 4.7e-9, inst-name = "C") + + shield-term-t \ No newline at end of file