-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix small issues and compartmentalize pcb-modules
- Loading branch information
Showing
13 changed files
with
1,904 additions
and
1,789 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#use-added-syntax(jitx) | ||
|
||
defpackage bundles: | ||
import core | ||
import collections | ||
import jitx | ||
import jitx/commands | ||
import ocdb/utils/defaults | ||
import ocdb/utils/landpatterns | ||
import ocdb/utils/box-symbol | ||
import ocdb/utils/bundles | ||
import ocdb/utils/property-structs | ||
import ocdb/utils/generic-components | ||
import ocdb/utils/generator-utils | ||
import ocdb/utils/symbols | ||
|
||
public pcb-bundle sd-card-uhs-1-connector: | ||
pin CMD ; Command/Response | ||
port power : power ; 3.3v and 2 ground pins | ||
pin CLK ; Clock | ||
port DAT : pin[4] ; Data pins (last pin also used as card detect) | ||
pin CD ; Card detect | ||
pin WP ; Write protect |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#use-added-syntax(jitx) | ||
|
||
defpackage components/bd433: | ||
import core | ||
import collections | ||
import jitx | ||
import jitx/commands | ||
import ocdb/utils/defaults | ||
import ocdb/utils/landpatterns | ||
import ocdb/utils/box-symbol | ||
import ocdb/utils/bundles | ||
import ocdb/utils/property-structs | ||
import ocdb/utils/generic-components | ||
import ocdb/utils/generator-utils | ||
import ocdb/utils/symbols | ||
import bundles | ||
import helpers | ||
|
||
public pcb-module voltage-regulator : | ||
port power-in : power | ||
port power-out : power | ||
|
||
inst reg : database-part(["mpn" => "BD433M5FP-CE2", "manufacturer" => "ROHM Semicon"]) | ||
|
||
property(reg.rated-temperature) = min-max(-40.0, 150.0) | ||
property(reg.mounting) = "smd" | ||
property(reg.VCC.power-pin) = PowerPin(min-max(4.0,42.0)) | ||
property(reg.VOUT.power-supply-pin) = PowerSupplyPin(min-max(3.2, 3.37), 500.0e-3) | ||
|
||
net (reg.FIN power-in.gnd power-out.gnd) | ||
net (reg.VCC power-in.vdd) | ||
net (reg.VOUT power-out.vdd) | ||
|
||
bypass-cap-strap(reg.VCC, power-in.gnd, ["capacitance" => 0.1e-6, "_exist" => ["vendor_part_numbers.lcsc"]]) | ||
bypass-cap-strap(reg.VOUT, power-out.gnd, ["capacitance" => 0.1e-6, "_exist" => ["vendor_part_numbers.lcsc"]]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#use-added-syntax(jitx) | ||
|
||
defpackage components/m24c04: | ||
import core | ||
import collections | ||
import jitx | ||
import jitx/commands | ||
import ocdb/utils/defaults | ||
import ocdb/utils/landpatterns | ||
import ocdb/utils/box-symbol | ||
import ocdb/utils/bundles | ||
import ocdb/utils/property-structs | ||
import ocdb/utils/generic-components | ||
import ocdb/utils/generator-utils | ||
import ocdb/utils/symbols | ||
import bundles | ||
import helpers | ||
|
||
public pcb-module eeprom : | ||
port power : power | ||
port i2c : i2c | ||
|
||
inst eeprom : database-part(["mpn" => "M24C04-WMN6TP", "manufacturer" => "STMicroelectronics"]) | ||
|
||
property(eeprom.rated-temperature) = min-max(-65.0, 130.0) | ||
val vcc = 3.3 | ||
|
||
property(eeprom.SDA) = DigitalIO(OpenCollector(min-max(0.0, 0.4), 1.0e-3), min-max(-0.45,0.3 * vcc), min-max(0.7 * vcc, vcc + 1.0), eeprom.VCC, eeprom.VSS, 2.0e-6) | ||
property(eeprom.SCL) = DigitalInput(min-max(-0.45,0.3 * vcc), min-max(0.7 * vcc, vcc + 1.0), eeprom.VCC, eeprom.VSS, 2.0e-6) | ||
|
||
property(eeprom.WC_NOT) = DigitalInput(min-max(-0.45,0.3 * vcc), min-max(0.7 * vcc, vcc + 1.0), eeprom.VCC, eeprom.VSS, 2.0e-6) | ||
|
||
no-connect(eeprom.NC) | ||
; We only have one EEPROM chip so we leave these floating | ||
no-connect(eeprom.E1) | ||
no-connect(eeprom.E2) | ||
|
||
net (eeprom.VCC power.vdd) | ||
net (eeprom.VSS power.gnd) | ||
|
||
net (eeprom.SDA i2c.sda) | ||
net (eeprom.SCL i2c.scl) | ||
|
||
; Put pull up on SDA and SCL | ||
res-strap(eeprom.SDA, power.vdd, ["resistance" => 5.0e3, "_exist" => ["vendor_part_numbers.lcsc"]]) | ||
res-strap(eeprom.SCL, power.vdd, ["resistance" => 5.0e3, "_exist" => ["vendor_part_numbers.lcsc"]]) | ||
|
||
; We don't want write operations to the EEPROM so we set WC_NOT high | ||
res-strap(eeprom.WC_NOT, power.vdd, ["resistance" => 5.0e3, "_exist" => ["vendor_part_numbers.lcsc"]]) |
Oops, something went wrong.