Pages created and updated by Terry Sturtevant Date Posted: November 20, 2018

General layout, CPLD conector pins, Debugger board, Incorporating I/O circuitry

CPLD Layout


General Layout

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:

circuit overview

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.
keypad wiring
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. )
cpld keypad input wiring

The outputs follow a similar pattern.
cpld LED output wiring
Here's a closer look.
LED output wiring
Notice how the ribbon cable connects the outputs above to the LEDs.
circuit overview
Assigning pins this way makes wire tracing very easy, and it also makes it easy to rewire if a device needs to be replaced.


CPLD connector pins

For example, here is a CPLD board:
EPM240 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.
connector P1 pins

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.
connector P2 pins

P3 layout is as follows:
connector P3 pins

P4 layout is as follows:
connector P4 pins


Debugger Board

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.
debugger power


Incorporating I/O Circuitry

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.
input and output circuits
Notice that the input and output portions do not have to be connected to each other in any way.


To view pdf documents, you can download Adobe Acrobat Reader .
get Acrobat Reader
If you need to update a browser, you might try Firefox which is Get Firefox!
Since this page uses cascading style sheets for its layout, it will look best with a browser which supports the specifications as fully as possible.

If you are looking for an office package, with a word processor, spreadsheet, etc., you might try LibreOffice which is Get LibreOffice!

Go to the main page for the Department of Physics and Computer Science.

Valid XHTML 1.1

Valid CSS!

WCAG 2.0
(Level AA)

Wilfrid Laurier University