(A/D)The PA-CP12 provides 16 single-ended
channels, of 12 bit, 200us analog to digital conversion.
The signal connector - The
analog input signal connector is a 37 pin D-type male connector.
A/D channel selection - The
PA-CP12 is configured for 16 single ended inputs only. Writing to
base+2 port selects the channel that is to be converted.
Sample and hold - The PA-CP12
does not provide a sample and hold circuit.
A/D conversion control - The
A/D conversion can be triggered in three ways, they are selected
by programming the command port base+3.
Trigger method 1 : S/W trigger
This method of conversion is very
easy to implement because the software is directly controlling
the A/D conversions. The conversion will be started by writting
any data to the S/W trigger port (base+0).
Trigger method 2 : External clock
The external clock conversion
consists of using an external clock or pulse (coming in from a
jumper) to trigger the A/D conversion. This gives the user great
flexibility in synchronizing the A/D with other devices.
Trigger method 3 : 8254 timer
The 8254 timer conversion method
uses the 8254 timer controller to generate an accurate time
pulse which triggers the start of conversions. An option that
goes with this is to gate the 8254 timer trigger signals with an
external signal. This gives the user external control over A/D
conversions using the 8254 timer.
A/D conversion - When an A/D
conversion takes place, the EOC (End of conversion) line goes
high. Once the start conversion signal is received, conversion of
the voltage at the selected channel is initiated. Once the
conversion is initiated, no other start conversion command will be
accepted until the completion of the conversion. Upon completion
of the conversion, the EOC line goes low (in timer or external
clock trig mode, an interrupt will occur). Next, the least
significant byte (LSB) and the most significant byte (MSB) of the
digital value for the voltage can be read from the data registers,
base+0 and base+1 respectively.
Reading conversion result -
There are two methods to read the conversion result :
Method 1 : Polling the EOC
This method is the simplest method to
do A/D conversions and read the data. However this method ties
up the CPU because one must keeping polling the EOC bit in the
status register so that one can know when an A/D conversion is
Method 2 :
This method is more efficient than
polling the EOC status, because upon a completed conversion, the
PA-CP12 interrupts the CPU to read the conversion result. In
other words, the conversion is done in the background, leaving
the CPU to do more important tasks.
Conversion status - The A/D
status can be read from two ports; The base+3 port contains the
critical information for the setup and condition of the A/D while
the base+2 port contains information on the selected channel.
The PA-CP12 provides one voltage output channel with 12 bit
20us digital to analog conversion.
Data register - The PA-CP12
uses 2 data registers or ports. The ports are base+4 and base+5.
Using 2 ports enables the user to send a 12-bit word to the D/A
converter using an 8-bit bus without getting glitches on the
output. Here is an example of the data register scheme. Say a user
wishes to convert the digital value from 1AFH to 1B0H to an analog
value. Using the standard approach of sending 8 bits at a time
would result in a glitch on the output at these digital values--
1AFH-1A0H-1B0H (sending LSB first, then MSB) or 1AFH-1BFH-1B0H
(sending MSB first, then LSB). However, using the PA-CP12, one
would write the 0H (4 least significant bits) to the temporary
register (base+4). Next the user would write 1BH (8 most
significant bits) to the output port (base+5). Upon writing the
MSB to base+5, the data in the temporary LSB register is
automatically sent to the output, thus, both MSB and LSB arrive at
the D/A simultaneously. (i.e. no glitch)
D/A conversion - D/A conversion
is accomplished using a 12 bit D/A conversion chip. The 12-bit
words are sent from the data bus and a temporary register
simultaneously. This enables a 12-bit word to be sent from an
8-bit data bus without getting odd glithes on the output.
The signal connector - The
connector for the D/A output signal is the same 37 pin male D-type
connector used for the A/D. The A/D and the D/A share the same
The PA-CP12 provides 16 lines of digital I/O; 8-bit digital
output and 8-bit digital input.
Digital output - Digital output
consists of one 8-bit dedicated output path. To write data out of
this path a user simply writes to the I/O ports; base+8 is the
output port for CON1.
Digital input - Digital input
consists of one 8-bit dedicated input path. To read data from this
path a user simply reads from the I/O ports; base+8 is the input
port for CON2.
The digital I/O connectors -
There are two connectors for the digital I/O. Each consists of a
20 pin box header. Connector 1 (CON1) is output and connector 2
(CON2) is input.