-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdiodes.ato
49 lines (39 loc) · 1.23 KB
/
diodes.ato
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
component Diode:
signal anode
signal cathode
designator_prefix = "D"
mpn = "generic_diode"
component ZenerDiode from Diode:
designator_prefix = "DZ"
category = "zener"
component SchottkyDiode from Diode:
designator_prefix = "DS"
category = "schottky"
component TVSDiode from Diode:
designator_prefix = "DT"
category = "tvs"
component RectifierDiode from Diode:
designator_prefix = "DR"
category = "rectifier"
import Power from "interfaces.ato"
module PowerDiodeOr:
"""
A diode or gate that combines two power rails, only dropping the
"""
diode = new ShottkyDiode
power_in1 = new Power
power_in2 = new Power
power_out = new Power
power_in2 ~ power_out
power_in.vcc ~ diode.anode; diode.cathode ~ power_out.vcc
power_in.gnd ~ power_out.gnd
import Power_AC from "interfaces.ato"
module FULLBRIDGERECTIFIER:
power_in = new Power_AC
power_out = new Power
d1 = new Diode
d2 = new Diode
d3 = new Diode
d4 = new Diode
power_in.line1 ~ d1.anode; d1.cathode ~ power_out.vcc; power_out.vcc~ d2.cathode; d2.anode ~ power_in.neutral
power_in.line1 ~ d4.cathode; d4.anode ~ power_out.gnd; power_out.gnd ~ d3.anode; d3.cathode ~ power_in.neutral