Computer Automated Measurement And Control, (CAMAC), is a modular data handling system used at almost every nuclear physics research laboratory and many industrial sites all over the world. It represents the joint specifications of the U.S. NIM and the European ESONE Committees.
The primary application is data acquisition but CAMAC may also be used for remotely programmable trigger and logic applications (LeCroy ECLine family of programmable logic units). The CAMAC standard covers electrical and physical specifications for the modules, instrument housings or crates, and a crate backplane. Examples of crates include the LeCroy Model 8025 with 25 positions and the Model 8007 with 7 positions.
Individual crates are controlled by slave or intelligent controllers. The controllers are tied together with a parallel Branch Highway that ends in a Branch Driver. The Branch Driver is interfaced directly to a data acquisition computer. Alternatively, tree or parallel data acquisition architectures may be created by connecting secondary CAMAC branches via CAMAC Branch Driver Modules.
CAMAC crates may also be connected in a Local Area Fiber Optic Network via the LeCroy Model 5211A Fiber Optic Serial Link and a serial crate controller. Up to 62 crates separated by a maximum of 500 m can exchange data at transmission rates of 45 megabytes/sec.
LeCroy also offers crate controllers that interface directly with the GPIB or IEEE Std. 488-1978 Bus. Therefore, an entire CAMAC Crate may appear as a single instrument on this very popular laboratory instrument bus. The Model 8901A is a GPIB/CAMAC slave interface that operates as a "Talker/Listener".
Timing and protocol specifications permit up to 1 megaword/sec transfers of 16 or 24-bit words for both the Dataway and CAMAC Branch. GPIB timing is usually limited by the host computer and typically runs at 500 kilobytes/sec.
INTRODUCTION
CAMAC is an international standard of modularized electronics as defined by the ESONE Committee of the JRC, Ispra. Its function is to provide a scheme to allow a wide range of modular instruments to be interfaced to a standardized backplane called a DATAWAY. The DATAWAY is then interfaced to a computer. In this way, additions to a data acquisition and control system may be made by plugging in additional modules and making suitable software changes. Thus, CAMAC allows information to be transferred into and out of the instrument modules.
CAMAC modules may be plugged into a CAMAC crate which has 25 STATIONS, numbered 1 - 25. Station 25, the rightmost station, is reserved for a CRATE CONTROLLER, whereas Stations 1 - 24 are NORMAL STATIONS used for CAMAC modules (see Block Diagram). Usually, Station 24 is also used by the controller in that most controllers are double width (#2 CAMAC). The purpose of the controller is to issue CAMAC COMMANDS to the modules and transfer information between a computer (or other digital device) and the CAMAC modules.
Module power, address bus, control bus and data bus are provided by the DATAWAY. The DATAWAY lines include digital data transfer lines, strobe signal lines, and addressing lines and control lines. See Table 3 for a pin allocation chart.
In a typical DATAWAY operation, the crate controller issues a CAMAC COMMAND which includes a station number (N), a subaddress (A), and function code (F), (see Table 1). In response, the module will generate valid command accepted (X response) and act on the command. If this command requires data transfer, the (R) or write (W) line will be used. Note that the terms Read and Write apply to the controller, not the module. For example, under a Read command, the controller reads data contained within a module.
USE OF THE DATAWAY
Communication with plug-in units takes place through the DATAWAY. This passive backplane is incorporated in the crate and links the 86-pin sockets to all stations. The bus lines link corresponding pins at all normal stations and, in some cases, the control station. Individual lines link one pin at a normal station to one pin at the control station. The patch pins have no specified DATAWAY wiring but can be connected to individual points to which patch leads may be attached.
During a DATAWAY operation the controller generates a command consisting of signals on individual Station Number lines to specify one or more modules, signals on the Subaddress bus lines to specify a sub-section of the module or modules, and signals on the Function bus lines to specify the operation to be performed. The command signals are accompanied by a signal on the Busy bus line, which is available at all stations to indicate that a DATAWAY operation is in progress.
When a module recognizes a Read command calling for a data transfer to the controller, it establishes data signals on the Read bus lines. When a controller recognizes a Write command calling for a data transfer to a module, it establishes data signals on the Write bus lines. In addition, regardless of whether there is transfer on the R or W lines, the module may transmit one bit of status information on the Response bus line.
Two timing signals, Strobes S1 and S2, are then generated in sequence on separate bus lines. The strobes are used to transfer data from the DATAWAY into modules (on Write commands) and into the controller (on Read commands). They may also initiate other actions within the controller and modules. Whenever there is no DATAWAY operation in progress (indicated by the absence of the Busy signal) any module may generate a signal on its individual Look-at-Me line to indicate that it requires attention. Three common control signals are available at all stations, without requiring addressing by a command, in order to initialize all units (typically after switch-on), to Clear data registers, and to inhibit features such as data-taking.
Definition of Commands
A command consists of signals on the DATAWAY lines which specify at least one module (by individual station number lines), a subsection of the module or modules (by the four subaddress bus lines), and the function to be performed (by the five function bus lines). The command signals are maintained for the full duration of the operation on the DATAWAY. They are accompanied by a signal on the Busy bus line which indicates to all units that a DATAWAY operation is in progress.
STATION NUMBER (N)
Each normal station is addressed by a signal on an individual station number line (N) which comes from a separate pin at the control station. The stations are numbered in decimal code from the left-hand end as viewed from the front, beginning with Station 1.
SUBADDRESS (A8, A4, A2, A1)
Different sections of a module are addressed by signals on the four A bus lines. These signals are decoded in the module to select one of up to sixteen subaddresses, numbered in decimal from 0 to 15.
FUNCTION (F16, F8, F4, F2, F1)
The function to be performed at the specified subaddress in the selected module or modules is defined by the signals on the five F bus lines. These signals are decoded in the module to select one of up to 32 functions, numbered in decimal from 1 to 31. The definitions of the 32 function codes are summarized in the DATAWAY Command Operations section.
STROBE SIGNALS (S1 AND S2)
Two strobe signals S1 and S2 are generated in sequence on separate bus lines. These signals are used to transfer information between plug-in units via the DATAWAY or to initiate operations within units. In either case the specific action is determined by the command present on the DATAWAY. Both strobes are generated during each DATAWAY command operation, and all plug-in units which accept information from the DATAWAY do so in response to these strobes. The first strobe S1 is used for actions which do not change the state of signals on the DATAWAY lines. All units which accept data from the DATAWAY in a Read operation, or in a Write operation do so in response to S1. The second strobe S2 is used to initiate any actions which may change the state of DATAWAY signals, for example, clearing a register whose output is connected to the DATAWAY.
Data
Up to 24 bits of data may be transferred in parallel between the controller and the selected module. Independent lines (Read and Write) are provided for the two directions of transfer.
THE WRITE LINES (W1-W24)
The controller or other common data source generates data signals on the W bus lines at the beginning of any "Write" operation. The W signals reach a steady state before S1, and are maintained until the end of the operation, unless modified by S2.
THE READ LINES (R1-R24)
Data signals are set up on the R bus lines by the module as soon as a "Read" command is recognized. The R signals reach a steady state before S1, and are maintained for the full duration of the DATAWAY operation, unless the state of the data source is changed by S2. The controller or other common data receiver strobes the data from the R bus lines at the time of the Strobe S1.
Status Information
Status information is conveyed by signals on the Look-at-Me (L), Busy (B), Command Accepted (X) and Response (Q) lines.
LOOK-AT-ME (L)
This, like the N line, is an individual connection from each station to a separate pin at the control station. When there is no DATAWAY operation in progress (no B present) any plug-in unit may generate a signal on its L line to indicate that it requires attention. When B is present each L signal is gated off the DATAWAY line by the unit which generates it.
A Look-at-Me request can be reset by Clear Look-at-Me, initialize, or by the performance of the specific action which generated the request.
DATAWAY BUSY (B)
The Busy signal is used to interlock various aspects of a system which can compete for the use of the DATAWAY. Specifically, it is generated during DATAWAY command or common control operations. Whenever N is present, B is present, and for the duration of B, all L signals are gated off the DATAWAY lines.
COMMAND ACCEPTED (X)
Whenever an addressed (N = 1) module recognizes a command, it must generate X = 1.
RESPONSE (Q)
The Q bus line is used during a DATAWAY operation to transmit a signal indicating the status of a selected feature of the module. On all Read and Write commands the signal on the Q bus line remains static from the time the command is received until S2. For all other commands the signal on the Q bus line may change at any time.
Common Controls
Common control signals operate on all modules connected to them without the need to be addressed separately by a command. In order to provide protection against spurious signals, the initialize (Z) and Clear (C) signals must be accompanied by Strobe S2.
INITIALIZE (Z)
The initialize signal has absolute priority over all other signals or controls. It sets all units to a basic state by resetting all registers, whether data or control, to a defined state, and by resetting all L signals and disabling them where possible. Units which generate Z must also cause S2 and B to be generated. Modules which accept Z gate it with S2 as a protection against spurious signals on the Z line.
INHIBIT (I)
The presence of this signal inhibits any activity (for example, data taking). It must either not change when B is present or have rise and fall times not less than 200 nsec.
CLEAR (C)
This command signal clears all registers or bistables connected to it. Units which generate C must also cause S2 and B to be generated. Modules which accept C gate it with S2 as a protection against spurious signals on the C line.
Private Wiring
PATCH LEADS (P1-P7)
Five pins (P1 to P5) on the 86-way socket at normal stations are not prewired to DATAWAY lines but are freely available for local connections. At the control station, seven pins (P1-P7) are available.
Dataway Command Operations
A Command is composed of signals on the Station Number line or lines, the Subaddress lines and the Function lines. It is accompanied by a signal on the Busy Line. In response to a command, data may be transferred on the Read or Write lines and one bit of status information on the Q line. The two Strobes S1 and S2 must be generated in each DATAWAY command operation to control its timing.
The order in which the commands are described below corresponds to the function codes set out in Table 1. In this table the term "register" is used for an addressable data source or receiver, without implying that it has a data storage property. The function codes allow the registers in a module to be divided into two distinct sets, known as Group 1 and Group 2. Thus it is possible to operate on more than the basic set of 16 registers selected by the four subaddress lines.
A common feature of all commands is that if the module has a Look-at-Me source which requests a specific command, then the performance of the command should reset the Look-at-Me source.
READ COMMANDS (FUNCTION CODES 0-7)
Read commands are identified by the combination F16 = 0, F8 = 0 in the function code. They specify that information is to be transferred from a module to a controller via the R bus lines. Data signals are set up on the R bus lines by the module as soon as the "Read" command is decoded, and the appropriate status signal connected to the Q bus line. The R and Q signals must reach a steady state before S1, and are maintained for the full duration of the DATAWAY command operation unless the state of the signal source is changed at S2. The controller or other common data receiver strobes the data from the R and Q bus lines at the time of the Strobe S1.
In order to facilitate reading by sequential addressing, all registers containing data (as opposed to control information) must have consecutive subaddresses starting at subaddress 0. At each of these subaddresses the module generates Q = 1 in response to the appropriate Read command. At the next subaddress in sequence (where there is not a data register) the response is Q = 0. At all remaining addresses the Q signal may be used to test any feature, subject to the general requirement that the Q signal must be static from the beginning of command until at least S2.
CODE 0, READ GROUP 1 REGISTER
This command selects, by subaddress, one register from the first group in the module and transfers the contents of this register to the controller. The contents of the register remain unchanged.
CODE 1, READ GROUP 2 REGISTER
Same as Code 0, except command selects register from the second group.
CODE 2, READ AND CLEAR GROUP 1 REGISTER
Same as Code 0, except the module register is cleared at time S2.
CODE 3, READ COMPLEMENT OF GROUP 1 REGISTER
Same as Code 0, except command transfers the complement of the contents of this register to the controller.
CODE 4-7
Unassigned at this time.
Control Commands (Function Codes 8-15)
Control Commands are identified generally by F8 = 1 in the function code. They are divided onto two groups by the state of F16, in this case F16 = 0. They specify that information is not transferred on either the R or W bus lines. However, information may be conveyed on the Q bus line in any of these commands. The signal on the Q bus line may change at any time but is strobed into the controller at time S1 and may (except in Code 8) be reset by Strobe S2.
CODE 8, TEST LOOK-AT-ME
This command selects a Look-at-Me source in the module and presents the state of this source on the Q bus line.
CODE 9, CLEAR GROUP 1 REGISTER
This command selects, by subaddress, a register from the first group in the module and clears the contents of this register.
CODE 10, CLEAR LOOK-AT-ME
Same as Code 8, except the Look-at-Me source is cleared at time S2.
CODE 11, CLEAR GROUP 2 REGISTER
Same as Code 9, except command selects register from the second group.
CODE 12-15
Unassigned at this time.
Write Commands (Function Codes 16-23)
Write commands are identified by the combination F16 = 1, F8 = 0 in the function code. They specify that information is to be transferred from a controller to a module via the W bus lines. The controller or other common data source generates data signals on the W bus lines at the beginning of the "Write" operation. The module connects the appropriate status signal to the Q bus line as soon as the command is recognized. The W and Q signals reach a steady state before S1 and are maintained for the full duration of the DATAWAY command operation unless the status of the signal source is changed at Strobe S2. In order to facilitate writing into registers by sequential addressing, all registers which are to contain data (as opposed to control information) have consecutive subaddress starting at subaddress 0. At each of these subaddresses, the module generates Q = 1 in response to the appropriate Write function. At the next subaddress in sequence (where there is not a data register), the response is Q = 0. At all remaining subaddresses the Q signal may be used to test any feature subject to the general requirement that the Q signal must be static from the beginning of the command until at least S2.
CODE 16, OVERWRITE GROUP 1 REGISTER
This command selects, by subaddress, one register in the first group in the module and sets the contents of this register to correspond with the data generated on the W bus lines by the controller.
CODE 17, OVERWRITE GROUP 2 REGISTER
Same as Code 16, except command selects a register in the second group.
CODE 18, SELECTIVE OVERWRITE GROUP 1 REGISTER
Same as Code 16, except a separate "mask" register defines which bits in the selected register are set.
CODE 19, SELECTIVE OVERWRITE GROUP 2 REGISTER
Same as Code 18, except command selects a register in the second group.
CODE 20-23
Unassigned at this time.
Control Commands (Function Codes 24-31)
Control commands are identified generally by F8 = 1 in the function code. They are divided into two groups by the state of F16, in this case F16 = 1. They specify that information is not transferred on either the R or W bus lines. However, information may be conveyed by the Q bus line in any of these commands. The signal on the Q bus line is permitted to change at any time but is strobed into the controller at time S1 and may (except in Code 27) be reset by Strobe S2.
CODE 24, DISABLE
This command selects, by subaddress, and disables a feature of the module; e.g., a Look-at-Me source or a data input.
CODE 25, INCREMENT PRESELECTED REGISTERS
This command adds one simultaneously to the contents of each register in one of 16 groups, defined by the subaddress.
CODE 26, ENABLE
This command enables the feature of the module selected by the subaddress, e.g., a Look-at-Me source or a data input.
CODE 27, TEST STATUS
This command selects, by subaddress, any feature of a module other than a source of a Look-at-Me request and tests it by producing a response on the Q bus line.
CODE 28 - 31
Unassigned at this time.
Digital Signal Standards on the Dataway
The potentials for the binary digital signals on the DATAWAY lines have been defined to correspond with those for compatible current sinking logic devices (e.g., the TTL and DTL series). The signal convention has, however, been inverted to be negative logic. The high state (more positive potential) corresponds to logic "0" and the low state (near ground potential) corresponds to logic "1". Intrinsic OR outputs are thus available from the manufacturers' standard product range, and disconnected inputs go to the "0" state.
It is an essential feature of the DATAWAY that many units may have their signal outputs connected to the Read and Response lines. Outputs onto these lines therefore require intrinsic OR gates. The same principle is extended to other lines (Command, Write, etc.) in order to allow more than one control-line unit in a crate. The inhibit line may be an exception, since its signals are shaped with a slow rise and fall if they change during DATAWAY operations.
VOLTAGE STANDARDS FOR DATAWAY SIGNALS
All DATAWAY Signals must conform to the voltage levels as follows:
Pull-up current sources for all DATAWAY bus lines are located in the crate controller (occupying the control station and at least one other station) so as to insure that there is one and only one current source per line. The minimum pull-up current when the DATAWAY line is at +3.5 V is defined as 2.5 mA. If the controller generated DATAWAY signals at time intervals near the permitted minima, the pull-up current sources should preferably provide not less than 6 mA when the lines are at this potential. The pull-up for the N signals is located in the unit generating the signals, and for the L signals in the unit receiving the signals, so that the individual lines may be joined or grouped within these units if desired.
The N and L lines are effectively individual lines joining two units (a module and a controller). The Q and R lines generally will have many units generating the signals (say 20) with a few units (maximum four) receiving the signals. The remaining lines (W, A, F, S, B, Z, I, C) will have relatively few units generating each signal (often only one) with the possibility of many units receiving the signals.
TIMING OF DATAWAY SIGNALS
The sequence of events during a single DATAWAY operation is shown in the Timing Diagram . The shaded areas indicate the permitted variation of each signal between an ideal square signal and a signal whose transition across the appropriate signal threshold (0.8 V or 2.0 V) satisfies the conditions shown. The signal waveforms for the command and data lines apply to those lines, if any, which take up the "1" state. Other command and data lines may, of course, be in the "0" state during the operation.
The signals on the Busy line and the various signals constituting the command need not occur in exact synchronism, provided their envelope lies within the shaded areas of the diagram. Similar variation is permitted between the signals constituting the data. The broken line indicates the earliest time at which the data signals may change in response to S2.
Key points on these waveforms are indicated by t0 - t9 with the following significance:
Points t0, t3, t6 represent the initiation of the negative-going of the Command, Strobe 1, and Strobe 2 signals, respectively. They are the times at which the signals would be received from an ideal DATAWAY with no capacitive loading.
Points t9, t5, t8 represent similarly the initiation of the positive-going edges of the same signals.
Points t2, t11, are the latest time at which the data source is permitted to initiate the negative-going and positive-going edges of the data signals.
Points t1, t3, t4, t7 represent the latest times at which the received signals are permitted to reach a maintained "1" state, and therefore refer to the last negative-going transition across the +0.8 V threshold.
Points t6, t9, t10, t12 represent the latest times at which the received signals are permitted to reach a maintained "0" state and therefore, refer to the last positive-going transition across the +2.0 V threshold.
Controllers must initiate the negative- and positive-going edges of the command and strobe signals at intervals not less than those defined by t3, t5, t6, t8 and t9. Modules respond to the command within the most adverse value of (t1 - t2); i.e., 100 nsec. The electrical characteristics of the DATAWAY and connections from it into units must allow signals to rise and fall within the minimum times for (t0 - t1), (t2 - t3) etc.
The next DATAWAY operation must not start before t9. The extreme case is shown in the timing diagram below with the next operation starting at t9; t9 - t12 of one operation coincides with t0 - t3 of the next. The command and data signals of one operation may thus be removed while those of the next operation are being established. The Busy signal may be maintained continuously during a sequence of consecutive DATAWAY operations. Under suitable conditions any command or data signals which have the same state during successive operations may also be maintained. In the extreme case of successive operations with the same command and data, there could be a complete absence of signal transitions between t0 and t3.
Power Supplies
The voltage tolerances and current loadings are specified in Table 2. The specified tolerances in voltage refer to the voltage measured at the contacts of the DATAWAY sockets and must be maintained under the worst combination of factors such as AC mains voltage and frequency, the maximum current loadings, temperature and the position in the crate of the socket under observation.
Note that the maximum currents stated in Table 2 are subject to the overall restrictions as follows:
1. The current carried by any contact of the DATAWAYsocket must not exceed 3 A.
2. The total power dissipated in a crate, without forced ventilation, must not exceed 200 W.
3. The power dissipation per single-width station should not, therefore, normally exceed 8 W. Under special circumstances, however, this rating may be increased to a maximum of 25 W, provided suitable precautions are taken to comply with total power dissipation and current loadings.
Pin Allocation at Control Station