Extensive software control of features is the highlight of this digital I/O module featuring 48 digital I/O lines, 3 16-bit counter/timers, and 3 independent PC bus interrupt inputs.
The 48 digital I/O lines on Onyx-MM are based on 2 82C55 ICs. They can be programmed for input or output in groups of 8 lines. Direct as well as strobed (latched) I/O modes are supported, and all I/O lines are connected to 10K Ohm pull-up resistors.
The 3 16-bit counter/timers are based on an 82C54 IC. They are controlled through a configuration register on Onyx-MM (in addition to the standard 82C54 configuration register). The counter inputs can be switched between external signals, the on-board 4MHz clock oscillator, or counter outputs, all under software control. By using one counter's output as another counter's input, you can cascade counters in software to create a 32-bit or 48-bit counter.
Onyx-MM also features programmable interrupt operations. A second software-controlled register on board configures up to 3 interrupt lines on the PC bus. Interrupts can be generated by the counter/timer outputs, digital I/O lines, or an external input line. This allows you to use a counter to generate bus interrupts at a programmed periodic rate, generate hardware interrupts under software control, or generate interrupts in response to an external event.
||Digital I/O Operation
Onyx-MM has 48 digital I/O lines using 2 82C55 ICs. Each chip has 24 I/O lines organized as three 8-bit ports, A, B, and C. All I/O lines are connected to 10KOhm pull-up resistors, and on power-up or system reset, all ports reset to input and are pulled high. A control register on the 82C55 chip allows you to program each port for input or output and for different operating modes, including basic I/O, strobed I/O, and bit set/reset.
Mode 0 operation provides basic input and output operations. No handshaking signals are used. This is the most common method of digital I/O and is useful for reading status signals, turning switches on and off, etc. All three ports can operate in Mode 0.
Mode 1 operation provides strobed I/O on ports A and B with handshaking signals provided on port C. In input mode, one signal acts as a strobe to latch data into the port, a second signal acts as an acknowledge output, and a third signal acts as an interrupt request. In output mode, one signal indicates that the CPU has written new data to the port, a second signal acts as an acknowledge input, and a third signal is used as an interrupt in response to the acknowledge input. This interrupt signal can be routed to one of the PC bus interrupt circuits on Onyx-MM through proper programming of the Onyx-MM interrupt configuration register described elsewhere on this page. Thus you can generate PC bus interrupts in response to new data being latched onto the board.
Mode 2 operation allows the use of Port A as a bi-directional data bus, with port C lines used for handshaking. Port A is normally in tristate mode. When the CPU writes new data to port A, an output signal indicates new data is available. In response, the external circuit strobes an acknowledge input signal, thereby enabling the output buffers on Port A. The external circuit can also latch new data into Port A with an input data strobe signal. Both input and output operations can be used to generate interrupts.
Bit set/reset mode enables individually setting (1) or resetting (0) any bit on Port C without having to read Port C and worry about masking or protecting unaltered bits. Note: The driver software shipped with Onyx-MM allows you to easily perform bit set and reset operations on any bit of any port.
Counter/timer I/O Header
Onyx-MM provides an control register to configure the counter/timers. This register is separate from the 82C54 configuration register. This register allows you to select the source of each counter as shown below.
- S21, S20 Counter 2 input select:
00=In 2, 01=4MHz oscillator, 1X=Out 1
- S11, S10 Counter 1 input select:
00=In 1, 01=4MHz oscillator, 1X=Out 0
- S0 Counter 0 input select:
0=In 0, 01=4MHz oscillator
Onyx-MM is supported by Diamond's Universal Driver programming library for C. Example programs are included to get you started quickly. Some examples of the supported board operations are:
- Digital input, bit, byte, and word
- Digital output, bit, byte, and word
- Interrupt-driven digital I/O with external trigger
- Configure counter/timers and interrupts
- Counter/timer-controlled interrupts