Next: TTM firmware
Up: RAMBO firmware
Previous: RAMBO firmware source codes
RAMBO F CODE Manual Ver.9.1.1
Nov.23, 1998 M. Hazumi
The main purpose of RAMBO is to monitor various control voltages on REBOs
and read out data from thermisters. For that purpose, each RAMBO
has 4 ADCs (AD7890). Each ADC has 8-channel inputs, an internal
multiplexer, shaper/hold circuitry and a serial output line.
The basic procedure for this ADC is to select the channel
to be readout, send the conversion pulse for AD-conversion,
and readout data.
Fcode Data Description
-------------------------------------
1 X Read ADC1 (channel should be selected with "F 17")
The format of output data is as follows
Bit15 (MSB) 0
Bit14-12 ADC channel (e.g. 011 for channel.3)
Bit11 Sign of ADC data; 0 for positive, 1 for negative
Bit10-0 ADC data. Full scale is 10V.
I.e. Bit10 = 5V
9 = 2.5V
8 = 1.25V
7 = 625mV .....
Care is needed on the timing between the conversion (F 24)
and read (F 1 to 4). The required minimum time between
the end of F 24 to start of F 1 (to 4) is 11.7usec.
Calculation 14.5/ master clock freq. + 0.1 usec
= 14.5/ 1.25MHz + 0.1 = 11.7 usec
2 X Read ADC2 (channel should be selected with "F 18")
3 X Read ADC3 (channel should be selected with "F 19")
4 X Read ADC4 (channel should be selected with "F 20")
7 X Read DipSW on RAMBO
Bit15-8 = 0
Bit7 = 1
Bit6-0 = dipSW (lowest 3bits for slot number)
16 [S] Select Slot
[S] is 16bit data. Bit7-5 of [S] corresponds to
the slot number.
EXMAPLE: [S] = 0x60 for slot 3 (which is for RAMBO)
17 [C] Select Readout channel of ADC1
[C] is 16bit data. Bit15-13 of [C] corresponds to
the channel number. Channel number is from 0 to 7.
Other bits should be 0.
Below is the definition of each bit.
Ch.0 ([C]=0x0000) Thermister on hybrid for REBO slot-1 channel A
Ch.1 ([C]=0x2000) Thermister on hybrid for REBO slot-1 channel B
Ch.2 ([C]=0x4000) Thermister on hybrid for REBO slot-1 channel C
Ch.3 ([C]=0x6000) Thermister on hybrid for REBO slot-1 channel D
Ch.4 ([C]=0x8000) Thermister on hybrid for REBO slot-2 channel A
Ch.5 ([C]=0xa000) Thermister on hybrid for REBO slot-2 channel B
Ch.6 ([C]=0xc000) Thermister on hybrid for REBO slot-2 channel C
Ch.7 ([C]=0xe000) Thermister on hybrid for REBO slot-2 channel D
18 [C] Select Readout channel of ADC2
Ch.0 ([C]=0x0000) Thermister on hybrid for REBO slot-4 channel A
Ch.1 ([C]=0x2000) Thermister on hybrid for REBO slot-4 channel B
Ch.2 ([C]=0x4000) Thermister on hybrid for REBO slot-4 channel C
Ch.3 ([C]=0x6000) Thermister on hybrid for REBO slot-4 channel D
Ch.4 ([C]=0x8000) Thermister on hybrid for REBO slot-5 channel A
Ch.5 ([C]=0xa000) Thermister on hybrid for REBO slot-5 channel B
Ch.6 ([C]=0xc000) Thermister on hybrid for REBO slot-5 channel C
Ch.7 ([C]=0xe000) Thermister on hybrid for REBO slot-5 channel D
19 [C] Select Readout channel of ADC3
Ch.0 ([C]=0x0000) REBO slot-1 MUX1 output (defined with REBO F 2)
Ch.1 ([C]=0x2000) REBO slot-1 MUX2 output (defined with REBO F 4)
Ch.2 ([C]=0x4000) REBO slot-1 MUX3 output (defined with REBO F 8)
Ch.3 ([C]=0x6000) REBO slot-2 MUX1 output
Ch.4 ([C]=0x8000) REBO slot-2 MUX2 output
Ch.5 ([C]=0xa000) REBO slot-2 MUX3 output
Ch.6 ([C]=0xc000) REBO slot-4 MUX1 output
Ch.7 ([C]=0xe000) REBO slot-4 MUX2 output
20 [C] Select Readout channel of ADC4
Ch.0 ([C]=0x0000) REBO slot-4 MUX3 output
Ch.1 ([C]=0x2000) REBO slot-5 MUX1 output
Ch.2 ([C]=0x4000) REBO slot-5 MUX2 output
Ch.3 ([C]=0x6000) REBO slot-5 MUX3 output
Ch.4 ([C]=0x8000) -
Ch.5 ([C]=0xa000) Thermister on the DOCK
Ch.6 ([C]=0xc000) -
Ch.7 ([C]=0xe000) -
24 X Send conversion to all ADCs
A care is needed on the timing between F 17-20
and F 24. After issuing one of F17-20,
you have to wait for 1 usec before sending F 24.
31 X Send reset to the internal state machine
Useful when the data from RAMBO look shifted.
** EXAMPLE **
Suppose you have a RAMBO on slot 3 and a REBO on slot 5.
Here I show a set of commands to read out the output of pin-1 (0 origin !) of
DAC5 on the REBO. This output corresponds to "setbias1"
which can be modified with the command "F 21".
TTM> f 16 0xa0 "select the REBO"
TTM> f 8 1 "select DAC5 setbias1"
TTM> f 16 0x60 "select the RAMBO"
TTM> f 20 0x6000 "select channel-3 (0 origin !) of ADC4 to be readout"
TTM> f 16 0x60
TTM> f 24 0 "do ADC conversion"
TTM> f 16 0x60
TTM> f 4 0 "readout ADC4 channel-3"
** Notice **
Currently it is safer to put "f 16 0x60" everytime.
This is due to a subtlety in the original RAMBO firmware.
(REBO firmware does not have this problem).
Hazumi
2001-06-22