
CCC1 Manual (Version 6.2.90.2) Page 9 of 29
3Programming the CAMAC System
The following provides a brief introduction to the parameters involved in programming a CAMAC system. A more detailed
description is available in the IEEE Standard 583-1975, Molecular Instrumentation and Digital Interface System.
The CAMAC standard provides guidelines for control of the 25-station CAMAC crate by a crate controller residing in station
24 and 25 (or usually the two highest stations numbers in the crate).
Communication between the crate controller and the modules is accomplished via dataway commands. Three parameters
common to the dataway commands are: FUNCTIONCODE, SUBADDRESS and STATIONNUMBER. The commands
can be separated into three major groups: the read commands, the write commands and the control commands. The crate
controller generates the necessary timing signals to execute the commands.
Status information is conveyed from the module to the crate controller via the LookAtMe (LAM) line and the Q response
and command accepted busses. Each station in the crate has a LAM line. The module may use the LAM to asynchronously
inform the crate controller that it requires attention. The Q and X bus are used by the addressed module to convey status
during the dataway command cycle.
There are three common control signals on the CAMAC dataway. These are INITIALIZE, CLEAR and INHIBIT.
3.1 Function Code
The Function code (F), ranging from 0 to 31 (decimal), determines which of three command groups a particular command
belongs to.
The read command group includes commands with F ranging from 0 to 7 (decimal). Execution of a read command initiates
the transfer of data from the addressed module to the crate controller. Data are transferred on the 24 bit read bus (R1-R24).
Modules which do not use the full 24 bit word, such as a 12 bit ADC, will normally use the lower segment of the word, and
the unused segment will be read as zero.
The write command group consists of those commands with F greater than 15 (decimal) and smaller than 24 (decimal).
Execution of a write command initiates the transfer of data from the crate controller to the addressed module. Data is
transferred on the 24 bit write bus (W1-W24).
The control command group function code includes: 7 < F < 16 (decimal) and 23 < F < 32 (decimal). No data are
transferred on the read or write bus during control command executions, however, one bit of status information can be sent
to the crate controller via the Q response line. An example is the F(8) Test LAM command. The addressed module may
return the state of its LAM request to the crate controller via the Q response line. Other commands in this group include the
F(24) Disable, the F(25) Initiate and the F(26) Enable command.
3.2 Subaddress
The subaddress (A), ranging from 0 to 15 (decimal) are used to access different sections of an addressed module. An example
is an eight-channel TDC which is read by the F(0) A(i) command, where i can range from 0 to 7 (decimal). This provides
access to all eight channels data registers with the F(0) read group 1 register function code.
3.3 Station Number
The station number (N) specifies which slot is intended to receive the command being executed. N can range from 1 to 23
(decimal). With the RoentDek CCC1 N can range from 1 to 16 (decimal). Internal features of crate controllers typically use
N=30.
3.4 Status Information
During a dataway command execution cycle, the addressed module uses the Q response (Q) and X command accepted (X)
bus lines to convey status information to the crate controller. X=1 is generated by the addressed module if it recognizes the
command being executed as one that it is equipped to perform. The Q response may reflect the status of any selected feature
in the module.
The LAM signal may be used by a module to inform the crate controller that it needs attention. The LAM signal reflects the
status of the LAM request in the module. The LAM request reflects the state of the LAM status and whether or not LAM’s
are enabled in the module. LAM’s are enabled within a module by an enable command or by setting a bit in a LAM mask
register. LAM requests are disabled at power up.
3.5 Common Control Signals
The Initialize (Z) sets registers or control functions in a module to an initial state, particularly when power is turned on.