Pages created and updated by
Terry Sturtevant
Date Posted:
November 20, 2018
When assigning pins in a CPLD or other programmable device, especially ones with several inputs and/or outputs, there are some ways that you can make the external wiring easier to do and follow. Here's an example for a keypad encoding circuit:
There are 16 inputs to the circuit (from the keypad)
and 4 outputs (to the LEDs).
By assigning the pins for the inputs so that they are ordered in the
same way as the pins on the keypad, it means they can be connected by a
ribbon cable 1-to1.
Note the wire colour sequence in the pictures above and below.
(They appear to be reversed left-to-right because the
pictures are taken from different directions.
Red on the top right goes to the bottom left, etc.
)
The outputs follow a similar pattern.
Here's a closer look.
Notice how the ribbon cable connects the outputs above to the LEDs.
Assigning pins this way makes wire tracing very easy, and it also makes
it easy to rewire if a device needs to be replaced.
For example, here is a CPLD board:
It has four connector banks, P1, P2, P3, and P4.
Each bank has two rows of connectors.
Note that the pin numbers on the connectors
are not always consecutive, and so you need
to be careful when assigning them.
P1 layout is as follows:
This connector can be used to get 3.3V to power
other devices.
P2 layout is as follows:
Note that pins 43 and 44
are not the same as other I/O pins, and so should be avoided.
P3 layout is as follows:
P4 layout is as follows:
Since the CPLD is a 3.3V device, you can't have any 5V
devices connected.
This applies to the debugger board.
However, the logic on the debugger board can also operate on
3.3V.
If the debugger board is powered by 3.3V from the CPLD,
then there will be no problem.
P1 has pins for 3.3V and GROUND.
Use P1 pins for +3.3V and GROUND to power the debugger board.
If your circuit only uses part of a CPLD, you may be able to
incorporate input and/or output circuitry inside the CPLD.
You could include a keypad encoder.
You could include a 7 segment display decoder.
This is easy because different circuits can be inside a single CPLD.
Notice that the input and output portions do not have to be
connected to each other in any way.
Wilfrid Laurier University
© 2019 Wilfrid Laurier University