Skip to content

Commit 465020f

Browse files
committed
wip
1 parent 079eebc commit 465020f

File tree

4 files changed

+6281
-10224
lines changed

4 files changed

+6281
-10224
lines changed

edg/parts/BuckConverter_Mps.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,11 @@ def __init__(self, charging_current: RangeLike):
4646
input_threshold_abs=(0.4, 1.3)*Volt)
4747
self.rst = self.Port(DigitalSink.from_bidir(dio_model), optional=True) # 200k internal pullup, float if unused
4848
self.int = self.Port(DigitalSource.low_from_supply(self.gnd), optional=True)
49-
self.vrntc = self.Port(Passive())
50-
self.ntc1 = self.Port(Passive())
49+
self.vrntc = self.Port(VoltageSource(
50+
voltage_out=self.vcc.voltage_out,
51+
current_limits=(0, 5)*mAmp
52+
))
53+
self.ntc1 = self.Port(AnalogSink()) # required, doesn't seem to be any way to disable
5154
self.stat = self.Port(DigitalSource.low_from_supply(self.gnd), optional=True) # requires 10k pullup
5255
self.pg = self.Port(DigitalSource.low_from_supply(self.gnd), optional=True) # requires 10k pullup
5356

@@ -111,6 +114,9 @@ def __init__(self, *args: Any, frequency: RangeLike = (900, 1280)*kHertz,
111114

112115
self.batt = self.Export(self.ic.batt)
113116

117+
self.vrntc = self.Export(self.ic.vrntc)
118+
self.ntc1 = self.Export(self.ic.ntc1)
119+
114120
# RST isn't a traditional reset pin, but used for eg exiting shipping mode,
115121
# so this does not use the Resettable base interface
116122
self.rst = self.Export(self.ic.rst, optional=True)

0 commit comments

Comments
 (0)