I came up with a simple I/O board to implement a test user
interface. It is a very basic circuit that will read an 8 position dip switch,
write to 8 LEDs, and write to a 2 character, HEX display. The dip switch and
LED outputs are very basic items. The HEX display is a little more complex. The
display the Steve Ciarcia seemed to prefer was the HP7340. The display had
on-board binary to 7-segment HEX (0-F) display logic. Modern displays available
at Digikey are around $40 these days. To add the "Modern" component,
I used an Altera CPLD to do the decoding and display driving. I ended up using
the CPLD to do ALL the logic for the board. Besides the display driver, it has
the address decoder, switch input buffer, and the LED output latch. The only
other ICs on the board are ULN2804 8-bit Darlington drivers to drive the LED
and display outputs.
The address decoder looks at Address bits 4-7 and goes
active when the 4 bits match the Address DIP switch setting along with a IORQ
signal. Address bits 0 and 1 are used to determine which part of the board is
being addressed; The HEX display (0x00), LED output (0x01), or the DIP switch
input (0x03).
I used the Altera CPLD (EPM3064ATC100) since I've used them
before for other projects and I had a few in the parts bin. I initially decided
to use Altera because of their top-notch Quartus II design environment. I was
able to do the entire design using the schematic capture feature rather than
trying to learn VHDL. If I didn't use a CPLD, I would have been able to use the
same circuit (except for the HEX display driver) with discrete components. What
makes using a CPLD so useful is the ability to change the design of the board
without cut/jumping copper. In fact, I moved various pins around to simplify
the PCB layout. When I programmed the CPLD, the switch inputs were responding
in reverse order (Switch 0 was being read as switch 7). I had forgotten that I
swapped the lines in copper so a simple change in Quartus fixed everything up.
No comments:
Post a Comment