DCCC Format Definition

DCCC stands for Digital Command Card Controller. DCCC provides the lowest-level control of digital I/O boards on Anderson Group experiments. The existence of this driver goes all the way back to the SC-1 computer on the LOH Gondola.

DCCC reads its configuration from a configuration file which is specified on the command line. The configuration file syntax is as follows:

    config
      : config_defs port_defs command_defs 
    config_defs 
      : <N_CONFIG_DEFS> config_def ...
    config_def 
      : <ADDRESS> ',' <VALUE>
    port_defs 
      : <N_PORT_DEFS> port_def ...
    port_def 
      : <ADDRESS> ',' <VALUE>
    command_defs 
      : <N_COMMAND_DEFS> command_def ...
    command_def 
      : type ',' <PORT> ',' <MASK>
    type 
      : 'SPARE'
      : 'STEP'
      : 'STRB'
      : 'SELECT'
      : 'SET'

The config_defs are simply a series of address-value pairs which are written out in sequence. The port_defs are also address-value pairs and they are also written out during initialization, but they also implicitly define the addresses associated with each port number, starting with port number zero.

The command_defs implicitly associate specific actions with unique command numbers, starting with command number zero. Each command has a command type, a port number and a mask. The effect of the commands are as follows:

SPARE:
SPARE commands do nothing and will return an error to the caller.
STEP:
a STEP command produces a pulse by setting the masked bits of the port high then low with no defined delay. (This was used on the SC-1 to drive stepper motors, but has not been used since the advent of the indexer boards.)
STRB:
STRB commands also produce a pulse on the masked command line, but the pulse brackets a pulse on the global command strobe line. STRB commands are issued via the call send_dascmd( DCT_SCDC, n, 0 ); where n is the command index.
SET:
SET commands require an additional value argument. If the value is non-zero, the masked bits are set. If the value is zero, the masked bits are cleared. Client applications can use the DigSelect() function to issue commands of this type.
SELECT:
SELECT is similar to SET in that it requires a value argument, but it uses the masked value argument to set the masked bits. This is useful when the mask specifies more than one bit, and you wish to control the bits independently. Client applications use the DigSelect() function to issue commands of this type.

In other dccc/scdc compatible applications (specifically the DMM32 driver), an UNSTRB command type has been added which has the same functionality as SELECT except the value is stored in the driver, allowing the caller to use the simpler send_dascmd() function instead of using DigSelect().


Return to Manuals Guide


last updated: Fri May 7 15:14:06 2004 webmaster@huarp.harvard.edu
Copyright 2004 by the President and Fellows of Harvard College