Compare commits
3 commits
70cefb78d3
...
4269bba81a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4269bba81a | ||
|
|
a8d2f4c797 | ||
|
|
f7af6fb900 |
4 changed files with 38 additions and 5 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -19,3 +19,4 @@ nm64file
|
|||
mustang_scripts
|
||||
nm64/nm64
|
||||
ahepam/seth
|
||||
leia/
|
||||
|
|
|
|||
2
avr
2
avr
|
|
@ -1 +1 @@
|
|||
Subproject commit 7ebd848bd2e58dc30c966ebf915f7ce6ff8e77df
|
||||
Subproject commit a7e45f235d59d5f8d815bf7daf9734e9ee0f2a2c
|
||||
35
dorn.py
35
dorn.py
|
|
@ -186,6 +186,25 @@ class DORN_CONFIG:
|
|||
# ! change the class attribute .HK
|
||||
self.HK[4] = ("HK PA", self.HK4_AHBGO, HK4_AHBGO_fmt)
|
||||
|
||||
# calib 2025-11-25
|
||||
Fluke_cal = 1/0.862
|
||||
# SN2 dac, 14*HK3H, VbiasD
|
||||
VbiasD_SN2 = [
|
||||
[ 64, 0.51, 0.5 * Fluke_cal ],
|
||||
[ 960, 1.85, 1.6 * Fluke_cal ],
|
||||
[ 1984, 3.36, 2.9 * Fluke_cal ],
|
||||
[ 4992, 7.85, 6.7 * Fluke_cal ],
|
||||
[ 9984, 15.27, 13.1 * Fluke_cal ],
|
||||
[ 14976, 22.56, 19.3 * Fluke_cal ],
|
||||
[ 19968, 29.91, 25.6 * Fluke_cal ],
|
||||
[ 20992, 31.42, 26.9 * Fluke_cal ],
|
||||
[ 21440, 32.06, 27.5 * Fluke_cal ],
|
||||
[ 21952, 32.83, 28.0 * Fluke_cal ],
|
||||
[ 24960, 37.36, 28.6 * Fluke_cal ],
|
||||
]
|
||||
VbiasD_a = 0.033
|
||||
VbiasD_b = 0.9918
|
||||
|
||||
HK3_LEIA = [[
|
||||
("Tadc", (degC, {})),
|
||||
("Vadc", 2.0),
|
||||
|
|
@ -194,13 +213,13 @@ class DORN_CONFIG:
|
|||
("Vss", 2.5, ("Vcc", -1.5)),
|
||||
("Vcc", 2.0),
|
||||
("Vbias2", -1/0.022 * 66.6/75.2),
|
||||
("VbiasD", -14.),
|
||||
("VbiasD", -14 * VbiasD_b - VbiasD_a),
|
||||
]]
|
||||
|
||||
HK4_LEIA = [[
|
||||
("IbiasD", 100., -1.4),
|
||||
("VbiasG", 46.3, ("Vref", -45.3)),
|
||||
("Ibias2", 10470/470 * 51/1051 * 100, -65.0),
|
||||
("Ibias2", 10470/470 * 51/1051 * 100, -71.0),
|
||||
("Ibias1", 10470/470 * 51/1051 * 100, -52.0),
|
||||
("Vbias1", -1/0.047 * 44.7/48.5),
|
||||
("Tpa0", (degC, {})),
|
||||
|
|
@ -686,3 +705,15 @@ def mem_op(addr=None, hist=None, bank=None, data=None, read=None, clear=None, ba
|
|||
dorn_config(base+1, h, "mem data high")
|
||||
dh = h
|
||||
dorn_config(base, d & 0xffff, "mem data write")
|
||||
|
||||
def VbiasD(V):
|
||||
a = 0.48
|
||||
b = 95.97
|
||||
if V < 0:
|
||||
V = -V
|
||||
if V>32:
|
||||
raise valueError(f"VbiasD too large {V}V > 32V")
|
||||
d = int(0x10000/b*(V-a) + 32)
|
||||
if d<0:
|
||||
d = 0
|
||||
ecmd(f"v dac={d}", verb=True)
|
||||
|
|
|
|||
|
|
@ -563,12 +563,13 @@ class leia_stepper:
|
|||
period (float) in ms
|
||||
"""
|
||||
if period is None:
|
||||
return self.cmd('q')
|
||||
r = self.cmd('q')
|
||||
return r, r*self.T1TICK
|
||||
if isinstance(period, float):
|
||||
period = int(period/self.T1TICK) - 1
|
||||
if period < self.MIN_SPEED:
|
||||
period = self.MIN_SPEED
|
||||
return self.cmd('Q', period)
|
||||
return self.cmd('Q', period)
|
||||
|
||||
LIMITS = bitnames(
|
||||
ALL = ("LEDS", "FAULTS"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue