

Unzip it taking its directory structure, and open it from the main Quartus II menu with "File" -> "Open Project." selecting the file. The complete Quartus II project can be downloaded from this file: H051117_MultiFun.zip (the file is too big for this site, so it's stored externally). In the "read" mode there is no real register involved, so the SEL_0-2 lines are all "don't care". This one is for the read operation (to check the four USR4-7 buttons status): Where the generic "Digit n" byte used to turn on or off each single segment, is defined as: The "registers map" valid for the write operation is ("Reserved" means here "not used"): Only DATA_0-3 lines are really bidirectional, DATA_4-7 lines are not used in "read" mode and are tied to "1" using internal pull-up resistors.Ī logic "1" in the DATA bits means "led turned on" or "push button pressed". The internal digit registers are now 8 bits wide, because now each single segment can be controlled (plus the "dot"), and there is a 4 bits register for the four leds LED1-4. The input clock for the multiplex comes from the 36MHz clock (from the STM32 MCU), and is divided by two 1:256 dividers (74393). The design is similar to the previous example. The schematic is the following (it is better use the Quartus II schematic editor to view it, opening the project):

To make things easier, in this example it is used the schematic editor and the 7400 devices family library, but note that this is not the best way to use a CPLD (the right way is to use VHDL/Verilog languages.). The behavior is very similar to a SRAM device. The command signals are an active low write signal (WR_EN) and an active low read signal (RD_EN).
ALTERA QUARTUS II COST PLUS
This is a ready to use example of a custom "multi-functional" controller for a 4 digits 7-segments led display (single segment "graphic" drive mode with digits multiplexing), plus 4 status leds, plus 4 push buttons, using a bidirectional data bus (DATA_0-7) and a register selection bus (SEL_0-2). Of course you need two USB on you PC/Workstation, one to connect the Arduino IDE to the. Here is a typical session (using the Quartus II schematic editor for the CPLD): Typically, to program this board you need to use together the Arduino IDE for the MCU and the Quartus II IDE for the CPLD. This is an other unique "feature" of this board.Īll this is shown in the following functional block diagram: It is possible to use the Arduino STM32 "side" or the CPLD "side" as a stand-alone dev board too, with the TEST1-TEST3 connectors acting as normal GPIOs (holding the pins of the other "side" in HiZ). There are also others 25 GPIOs on the CPLD side (GPIO1 and GPIO2 connectors). On this 22 I/O lines there are available various peripherals (e.g. In this way it is possible easily "observe" signals exchanged between them with a scope or a LA.Īs far as I know, there is no commercial product that has this "feature". There are 22 I/O lines that "join" the STM32 and the CPLD, and on every of them there is a pin of three connectors (TEST1, TEST2 and TEST3). On the CPLD side there are also a DEV_CLRn push button to clear all the internal FFs, and a DEV_OE jumper to force all the CPLD pins in HiZ (to use these two functions you must explicit enable them first in the Quartus II IDE).Īn optional on-board 50MHz oscillator is available too (not assembled in the previous photos), and there are also two connectors for external oscillators. There is also a connector for a common and cheap 1602A or 2014A LCD 5V module (that probably you already have got.). To configure the CPLD (an EPM240T100C5 with 240 LEs, enough for some fun.) it is used the Quartus II IDE (free edition) and a cheap " USB Blaster" dongle through the JTAG connector.Ī 4 digit 7-segment led display, four push buttons (USER4-USER7) and four leds (LED1-LED4) are reserved to the CPLD.
ALTERA QUARTUS II COST SERIAL
You need to flash the bootloader first using a cheap " St-Link V2" dongle through the SWD connector (or using a serial-USB adapter on the SERIAL connector. For a short story about the Maple Mini and the stm32duino see here. The STM32F103 MCU side is " Maple Mini" compatible, so it possible to use the STM32F103 Arduino core provided by (more info here).

ALTERA QUARTUS II COST GENERATOR
The STM32F103 MCU is used as "stimulus generator" and as 8/36MHz clock generator for the CPLD, and is easily programmed using the friendly Arduino IDE through the USB connector.įive push buttons (RST, BUT, USER1-USER3) and a led (PB1) are reserved to the MCU.
