APFEL
APFEL
command set
allows to talk to (several instances of) the APFEL ASIC.
It uses a subset of the the I/O-Ports of the ATMEL μController to facilitate the communication to the proprietary protocol (q.v.Decoder.pdf) of the asic, sending a 22bit sequence for command, value, and chipId.
( → Apfel protocol code sequences) CLK
DOUT
Side Select
DIN
GND
JDINOUT1/2, JADC
I/O port | A | C | F | |||
---|---|---|---|---|---|---|
Connector | JDINOUT1 | JDINOUT2 | JADC | |||
pins | DIN1 | 1 | DIN1 | 1 | DIN1 | 1 |
DOUT1 | 2 | DOUT1 | 2 | DOUT1 | 2 | |
CLK1 | 3 | CLK1 | 3 | CLK1 | 3 | |
SS1 | 4 | SS1 | 4 | SS1 | 4 | |
DIN2 | 5 | DIN2 | 5 | DIN2 | 5 | |
DOUT2 | 6 | DOUT2 | 6 | DOUT2 | 6 | |
CLK2 | 7 | CLK2 | 7 | CLK2 | 7 | |
SS2 | 8 | SS2 | 8 | SS2 | 8 |
task | command | individual arguments | common address arguments | comment |
---|---|---|---|---|
setDac | APFEL 9 <DAC value> <dac> <chipId> <pinSetId> <sideSelectId> <port> [<quiet>] answer (if not quiet): → readDac |
<DAC value> [ 0 ... 0x3FF ] <DAC> [ 1 ... 4 ] |
<chipId> [ 0 ... 7, 8 ... FE, FF] 0xFF: generic call to all available chip Ids <pinSetId> [ 1, 2 ] <sideSelectId> [ 0,1 ] <port> A,C,F <quiet> [0,1] |
writes DAC channel |
readDac | APFEL A <dac> <chipId> <pinSetId> <sideSelectId> <port> answers: RECV APFEL dac <port> <pinSetId> <sideSelectId> <chipId> <dac> <DAC value> ERRA APFEL dac <port> <pinSetId> <sideSelectId> <chipId> <dac> <DAC value> - read validity check failed, raw value: |
<DAC> [ 1 ... 4 ] |
reads single DAC channel | |
readAllDacs | APFEL A 0 <chipId> <pinSetId> <sideSelectId> <port> answers: RECV APFEL dac <port> <pinSetId> <sideSelectId> <chipId> 0 <DAC value1> <DAC value2> <DAC value3> <DAC value4> ERRA APFEL dac <port> <pinSetId> <sideSelectId> <chipId> <dac> <DAC value> - read validity check failed, raw value: |
*Not Yet Available* reads all DAC channels of an ch | ||
|
||||
autocalib | APFEL B <chipId> <pinSetId> <sideSelectId> <port> |
auto calibration | ||
|
||||
TP single | APFEL C <pulse height Pattern> <chipId> <pinSetId> <sideSelectId> <port> |
<pulse height Pattern> [ 2...3FF ] |
test pulse | |
TP reset | APFEL D <pulse height> <channel> <chipId> <pinSetId> <sideSelectId> <port> |
<pulse height Pattern> [ 1 ... F ] <channel> [ 1, 2 ] |
test pulse inkl. reset | |
TP trigger | APFEL 11 <on/off> <port> <pin> <trigger position> |
<on/off> [ 0,1 ] <port> [ A,B,C,D,E,F,G ] <pin> [1...8] <trigger after set (1) or after reset (2)> [1,2] |
<on/off> enables/disables <pin> on <port> to trigger right in the moment after a test pulse set or reset command sequence is sent | |
|
||||
setAmpl | APFEL E <channel> <chipId> <pinSetId> <sideSelectId> <port> |
<channel> [ 1, 2 ] |
setAmplification to high | |
resetAmpl | APFEL F <channel> <chipId> <pinSetId> <sideSelectId> <port> |
<channel> [ 1, 2 ] |
resetAmplification to low | |
|
||||
listId | APFEL 10 <all> <NChipIds> <pinSetId> <sideSelectId> <port> |
<all flag> [ 1...FF ] <number of chip Ids> [ 1...FF ] |
check <number of chip Ids> channels and list depending on the <all flag> all or only positive results | |
listId++ | APFEL 20 <all> <NChipIds> <minChipId> <pinSetId> <sideSelectId> <port> |
<all flag> [ 1...FF ] <number of chip Ids> [ 1...FF ] <min Chip Id> [ 1...FF ] |
check <number of chip Ids> channels and list depending on the <all flag> all or only positive results |
typical | best measured | "preHadCon2 Timings" ~× 8000 | ||
Clock Timing | T [µs] | 44.8 | 24.8 | 400,000 |
f [kHz] | 22.3 | 40.3 | 0.0027 | |
Function call overhead offset | [µs] | ~330 | ~300 | |
Task Timings | ||||
---|---|---|---|---|
Task | typical | best measured | ||
set DAC | [ms] | 2.4 | 1.4 | |
read DAC | [ms] | 2.7 | 1.6 | |
AutoCalibration | [ms] | 48.4 | 27 | |
AutoCalibration × 256 × 2 | [s] | 24.8 | 13.8 | |
TestPulseSequence | [ms] | 2.3 | 1.4 | |
TestPulse | [ms] | 4.7 | 2.7 | |
SetAmplitude | [ms] | 2.3 | 1.3 | |
ResetAmplitude | [ms] | 2.3 | 1.3 |
typical | "preHadCon2 Timings" ~× 104 | ||
Clock Timing | T [µs] | 40 | 400,000 |
f [kHz] | 25 kHz | 0.0027 | |
Function call overhead offset | [µs] | ~330 | |
Task Timings | |||
---|---|---|---|
Task | typical | ||
set DAC w/o readback | [ms] | 2 | |
read DAC | [ms] | 2.3 | |
set DAC w/ readback (estimate) | [ms] | 4.3 | |
AutoCalibration | [ms] | ~155 | |
AutoCalibration × 256 × 2 (estimate) | [s] | ~80 | |
TestPulseSequence | [ms] | 2 | |
complete TestPulse | [ms] | 4 | |
SetAmplitude | [ms] | 2 | |
ResetAmplitude | [ms] | 2 |
$CMND <command> $ADDRESS [<Argument(s)>]
command | address | arguments | comment | ||||
---|---|---|---|---|---|---|---|
"channel" | value(s) | ||||||
dac |
<portLetter> A,C,F, |
<pinSetId> [ 1, 2 ] |
<sideSelectId> [ 1, 2 ] |
<chipId> [ 0 ... 7, 8 ... FE, FF] 0xFF: generic call to all available chip Ids see command chipIdIgnoreMask for limiting the chipId range |
<dacId> [ 1 ... 4 ] < 4 , e.g. 0xA : all DACs get value vDAC1 |
[vDAC1[vDAC2[vDAC3[vDAC4]]]] [ 0 ... 0x3FF ] |
read/writes up to 4 DAC channels (if set with sign, incr/decr relatively) |
autoCalib |
auto calibration of the DAC channels | ||||||
testPulse |
<channelId> [ 1 ... 2 ] < 4 , e.g. 0xA : both channels |
height1 [height2] [ 0 ... 0xF ] |
initiate test pulse | ||||
ampl |
<channelId> [ 1 ... 2 ] < 4 , e.g. 0xA : both channels |
[ amplification1 [amplification2] ] [ 0,1, H,L ] 0,L : low amplification (× 16) 1,H : high amplification (× 32) |
get/set amplification mode | ||||
l/list |
lists all addresses of available ids |
<chipId>
to 0xFF
loops over all avaiable chip IDs
$CMND $command $ADDRESS <dacId>
$CMND $command $ADDRESS
$CMND $command <portId> <sideSelectId>
$CMND $command $ADDRESS <dacId ≤ 4 > <value>
$CMND $command $ADDRESS <dacId > 4> <value>
$CMND $command $ADDRESS <(dummy)> <valueDAC1> <valueDAC2> <valueDAC3> <valueDAC4>
RECV $CMND $command $ADDRESS <dacId> <value>
RECV $CMND $command $ADDRESS <dacId> <valueDAC1> <valueDAC2> <valueDAC3> <valueDAC4>
I | Attachment | Action | Size | Date | Who | Comment |
---|---|---|---|---|---|---|
Decoder.pdf | manage | 812 K | 2015-03-26 - 14:22 | PeterZumbruch | Apfel decode version 1_4 | |
gz | apfel.tar.gz | manage | 33 K | 2014-05-06 - 10:35 | PeterZumbruch | Shell scripts used for testing the basic functionality before APWI implementation |