DIGITAL LOGIC: This month, HackerBox Hackers are exploring the basics of digital and programmable logic devices. This Instructable contains information for working with HackerBoxes #0012. If you would like to receive a box like this right to your mailbox each month, now is the time to subscribe at HackerBoxes.com and join the revolution!

Topics and Learning Objectives for this HackerBox:

  • Understand Boolean Logic and the Basic Digital Gates
  • Wire and Test Digital Gate Circuits
  • Understand Latches and Flip-Flops
  • Wire and Test a Digital Flip-Flop Circuit
  • Measure Digital Circuits using a Logic Analyzer Instrument
  • Understand Programmable Logic Devices
  • Implement Digital Circuit Examples in Schematic Capture
  • Implement Digital Circuit Examples in VHDL/Veriog
  • Program Implemented Digital Circuits into a CPLD

HackerBoxes is the monthly subscription box service for DIY electronics and computer technology. We are hobbyists, makers, and experimenters. Hack the Planet!

Step 1: HackerBoxes #0012: Box Contents

  • HackerBoxes #0012 Collectable Reference Card
  • Intel Altera MAX II EPM240 CPLD Development Board
  • JTAG USB Blaster with Ribbon Cable
  • 8 Channel 24 MHz USB Logic Analyzer
  • DuPont Jumpers for Logic Analyzer
  • Grabber Clip Leads for Logic Analyzer
  • Chip Box with ESD-Safe Foam
  • 74HC08, 74HC32, and 74HC74 Digital ICs
  • 7805 5V Regulator (TO-220)
  • 9V Battery Clip with Leads
  • 100 ohm and 10K Resistors
  • Red LEDs
  • Tactile Pushbutton
  • Solderless Breadboard (400 points)
  • Jumper Wire Bundle for Breadboard
  • MiniUSB Cable
  • Exclusive HackerBoxes Digital YinYang Decal

Some other things that will be helpful:

  • One 9V battery

Most importantly, you will need a sense of adventure, DIY spirit, and hacker curiosity. Hardcore hobbyist electronics isn't always easy, but when you persist and enjoy the adventure, a great deal of satisfaction may be derived from persevering and getting your projects working. Just take each step slowly, mind the details, and don't hesitate to ask for help.

Step 2: What Is Digital Logic?

You are probably already at least somewhat familiar with the basic concepts of digital electronics where a binary world is defined such that every signal is either a ONE (high, on, true, 5V) or a ZERO (low, off, false, 0V). These notions are the basis of our modern digital computers and communications devices. We can use the ONEs and ZEROs to represent any other values, data, or signals such as music and video.

With these signals (ZEROS and ONES) in mind, we will explore the basic logic gates. Logic gates allow us to compute outputs given digital inputs according to the rules of Boolean Algebra. While we will test out AND gates and OR gates to start out, other basic gates also include NOT, NAND, NOR, and XOR. Combining these types of gates together allow us to implement combinational logic.

Adding memory (in the form of a Flip-Flop or Latch) allows our digital circuits to maintain state of operate in a time-dependent fashion. Such circuits implement sequential logic.

If you are interested, here are some nice online video and instructional resources:

Step 3: Wiring Up an AND Gate


  • Solderless Breadboard
  • 7805 5V Regulator
  • 9V Battery Clip
  • 9V Battery
  • 74HV08 (Quad AND Gate)
  • 3 Red LEDs
  • 3 100 ohm Resistors (brown, black, brown)
  • Jumper Wires

First let's set up a power supply for our circuit. The 7805 5V Regulator (datasheet) is used to turn the supply of the 9V battery into a nicely, regulated 5V power rail. Note the ordering of the pins for the 7805. With the heatsink down, the left pin is the input (9V here), the center is common (GND here), and the right pin is the output (5V). The output (5V) and the GND are wired to the rails along the bottom of the breadboard.

Next pins 7 and 14 of the 74HC08 (datasheet) chip are connected to 5V and Ground to supply power to the logic chip. Note the orientation of the chip according to the semicircular notch on the left end as illustrated here.

Pins 1, 2, and 3 of the 74HC08 chip are the inputs and outputs for one of the four AND gates in the chip. Each of these inputs and outputs is wired to a 100 ohm resistor, which is in turn wired to a red LED. The resistors can go into the breadboard either way but the LEDs must be oriented such that the shorts of the two pins goes into the ground rail.

Lastly, the two wires illustrated in yellow are the inputs to the AND gate. They are illustrated wires into the ground rail. This represents inputs A=0 and B=0, moving one of the yellow wires from the GND rail to the 5V rail will represent inputs A=1 and B=0 (or A=0 and B=1). What wiring represents the inputs A=1 and B=1? Try all four of the possible input combinations and verify the truth table.

If you would like to watch a video of this circuit being assembled, the folks at PyroEDU have done just that.

Step 4: Wiring Up an OR Gate

This circuit is exactly like the one for the AND gate. Notice that the pinout for the 74HC32 OR gate chip (datasheet) is identical as that for the 74HC08, only the gate inside is different.

Swap out the AND gate chip with the OR gate chip.

Try the four different combinations of inputs and verify the truth table of the 74HC32 OR gate.

Step 5: Sequential Logic - Latches and Flip-Flops

The logic gates that we have worked with so far will always have outputs that are only a function of the current inputs (according to their truth tables). This type of logic (combinational logic) cannot generate outputs that depend upon previous inputs. For example, a vending machine circuit implemented in this way could never get to the "state" of having 50 cents because when the second quarter is inserted it has no way to store the memory of the first quarter being inserted. Being able to remember and apply previous inputs is called having memory, maintaining state, or being time-dependent. This is referred to as sequential logic.

According to the Wikipedia Entry, an electronic flip-flop or latch is a circuit that has two stable states and can be used to store state information. A flip-flop is a bistable multivibrator. The circuit can be made to change state by signals applied to one or more control inputs and will have one or two outputs. It is the basic storage element in sequential logic. Flip-flops and latches are fundamental building blocks of digital electronics systems used in computers, communications, and many other types of digital systems.

Here is a nice video explaining the construction and operation for different types of latches and flip-flops.

Step 6: Wiring Up a D Flip-Flop Circuit


  • Solderless Breadboard
  • 7805 5V Regulator
  • 9V Battery Clip
  • 9V Battery
  • 74HC74 D Flip-Flop
  • 2 10K Resistors (brown, black, orange)
  • 4 Red LEDs
  • 4 100 ohm Resistors (brown, black, brown)
  • Push Button
  • Jumper Wires

This D Flip-Flop circuit is wired up in a very similar fashion to the circuit for the AND/OR gates, but now there is a push button to provide the clock signal. The D input (green wire in the breadboard diagram) can be moved between the 5V rail and the GND rail to change the D input from ONE to ZERO.

This video, again from the folks at PyroEDU, is worth watching in its entirety. More specifically, it has a nice description of the D Flip-Flip at about 3:40 and a demonstration of this circuit being assembled at a about 7:40.

Step 7: Digital Logic Analyzer

A logic analyzer (Wikipedia) is an electronic instrument that captures and displays multiple signals from a digital system or digital circuit. A logic analyzer may convert the captured data into timing diagrams, protocol decodes, state machine traces, assembly language, or may correlate assembly with source-level software. Logic Analyzers have advanced triggering capabilities, and are useful when a user needs to see the timing relationships between many signals in a digital system.

This 8-Channel USB Logic Analyzer is based on a Cypress CY7C68013A-56PVXC (FX2LP) Microcontroller (datasheet). It used an NXP 74HC245 input buffer, an Atmel AT24C02 256-byte I2C EEPROM, and includes a 24MHz crystal oscillator.

The sigrok software is a great choice for use with this logic analyzer. The sigrok project is a portable, cross-platform, Free/Libre/Open-Source signal analysis software suite that supports various device types, such as logic analyzers, oscilloscopes, and many others. The sigrok project is licensed under the terms of the GNU GPL.

Step 8: Programable Logic Devcies

According to Wikipedia, a programmable logic device (PLD) is an electronic component used to build reconfigurable digital circuits. Unlike a logic gate, which has a fixed function, a PLD has an undefined function at the time of manufacture. Before the PLD can be used in a circuit it must be programmed, that is, reconfigured.

Complex programmable logic devices (CPLDs) and field-programmable gate arrays (FPGAs) are two types of larger PLDs that are commonly used in modern digital systems.

PLDs can be designed using schematic capture where gates and flip-flops are laid out and connected as a visual schematic representation of the circuit to be implemented. PLDs can also be designed using hardware description languages that are similar to programming languages for implementing software, but are actually descriptions for implementing hardware within the PLD. VHDL and Verilog are popular hardware description languages for CPLD and FPGA design. VHDL borrows many features from the Ada programming language, while Verilog borrows from the C programming language.

It is important to conceptualize that the hardware description language is not a program running on the PLD, it is a mechanism for reconfiguring the logic resources (think gates and flip-flops) within the PLD into a new machine.

You might want to check out this EEVblog Video with a basic introduction to FPGAs, how they work, and why to use them.

Step 9: Altera MAX II EPM240 CLPD Board

Intel's Altera MAX II family of CPLD family is based on a groundbreaking architecture that delivers low power and the low cost per I/O pin. This instant-on, non-volatile CPLD family targets general-purpose, low-density logic and portable applications, such as cellular handset design. In addition to delivering the lowest cost for traditional CPLD designs, the MAX II CPLD drives power and cost improvements to higher densities, enabling you to use a MAX II CPLD in place of a higher power or higher cost ASSP or and standard-logic CPLD.

The CPLD is programmed using the USB Blaster JTAG module.

This site has all of the documentation on the MAX II CPLD family. Along with the Quartus Software.

Quartus Prime Lite Download Page

Quartus Quick Start Guide

This series of videos includes some examples using the older Quartus II software for both schematic capture design as well as VHDL design.

Note that Quartus has native Windows and Linux versions. If you are using Mac OS X and do not have either of those operating systems running under dual-boot or virtualization, you will need to set that up. For example, use Boot Camp or VirtualBox to install Ubuntu. You can also just run Ubuntu from a USB device.

Step 10: Hack the Planet

Hopefully, you are enjoying this foray into digital electronics. If you have enjoyed this Instrucable and would like to have a box of electronics projects like this delivered right to your mailbox each month, please join us by SUBSCRIBING HERE.

Please share your success in the comments below and/or on the HackerBoxes Facebook page. Certainly let us know if you have any questions or need some help with anything. Thank you for being part of the HackerBoxes adventure. Please keep your suggestions and feedback coming. HackerBoxes are YOUR boxes. Let's make something great!

<p>For what it&rsquo;s worth, here&rsquo;s the story of my struggles with the USB-Blaster driver on windows 10 x64. Everything would compile just fine using Quartus Prime v16.1 lite, but when programming the board, I was getting errors about the JTAG chain or a (failed) message or even blue screen. Ultimately, I was able to resolve the issue by installing an older driver (2006) as per <a href="http://altera-guide.blogspot.com/" rel="nofollow">http://altera-guide.blogspot.com/</a>. Yes, I had to disable driver signing and all that. However, I found that I had to uninstall the current driver (2012) first before the new one would be utilized. To do this, you need to go into device manager and uninstall the altera-usb blaster device, but be sure to check &ldquo;Delete the driver software for this device&rdquo; option. Good to go!</p>
<p>I have finally recreated, I think, the counter that was on the board when it arrived. I did not pay super close attention to it at the time, but it seemed to be to be a clock. So, mine has two digits for each of the day, hours, minutes and seconds with blinking dot separators (I think the original did not blink? Can't remember). Here is my code:</p><p>module MultiplexSevenSegment(clock, segA, segB, segC, segD, segE, segF,segG, segH, seg0, seg1, seg2, seg3, seg4, seg5, seg6, seg7);</p><p>input clock;<br>output segA, segB, segC, segD, segE, segF,segG, segH, seg0, seg1, seg2, seg3, seg4, seg5, seg6, seg7;</p><p>// Clock will count to 50000000 which will fit into 26 bits and then roll over<br>reg [25:0] count;<br>always @(posedge clock)<br>if(count == 50000000)<br> count &lt;= 0;<br>else<br> count &lt;= count + 1;</p><p>// Picked these bits because it seemed to make the multiplexing not flicker <br>wire [2:0] activeSegment = count[16:14];</p><p>// Depending on the value of the bits above set the active segment pin low<br>assign seg0 = ~(activeSegment==3'h0);<br>assign seg1 = ~(activeSegment==3'h1);<br>assign seg2 = ~(activeSegment==3'h2);<br>assign seg3 = ~(activeSegment==3'h3);<br>assign seg4 = ~(activeSegment==3'h4);<br>assign seg5 = ~(activeSegment==3'h5);<br>assign seg6 = ~(activeSegment==3'h6);<br>assign seg7 = ~(activeSegment==3'h7);</p><p>// Array of 32 bits for the array of binary coded decimals 4 bits each<br>wire [31:0] digits;<br>OctoBcd octoBcd(.clock(clock), .carryIn(count == 50000000), .bcdDigits(digits)); // If the clock has counted one second then carryIn a 1</p><p>reg [6:0] displaySegment;<br>reg [3:0] digit;<br>reg [1:0] dot;<br>always @(*)<br>begin<br> // The first half of the second the separator dots are on second half they are off<br> if(count &lt; 25000000 &amp;&amp; (activeSegment == 3'd2 || activeSegment == 3'd4 || activeSegment == 3'd6))<br> dot &lt;= 0;<br> else<br> dot &lt;= 1;</p><p> // Load the digit for the activeSegment<br> case(activeSegment)<br> 3'd0: digit = digits[ 3: 0];<br> 3'd1: digit = digits[ 7: 4];<br> 3'd2: digit = digits[11: 8];<br> 3'd3: digit = digits[15:12];<br> 3'd4: digit = digits[19:16];<br> 3'd5: digit = digits[23:20];<br> 3'd6: digit = digits[27:24];<br> 3'd7: digit = digits[31:28];<br> endcase<br>end<br>// Set the dot for the activeSegment to the correct value<br>assign segH = dot;</p><p>reg [6:0] sevenSegment;<br>always @(*)<br>case(digit)<br> 4'h0: sevenSegment = 7'b0000001;<br> 4'h1: sevenSegment = 7'b1001111;<br> 4'h2: sevenSegment = 7'b0010010;<br> 4'h3: sevenSegment = 7'b0000110;<br> 4'h4: sevenSegment = 7'b1001100;<br> 4'h5: sevenSegment = 7'b0100100;<br> 4'h6: sevenSegment = 7'b0100000;<br> 4'h7: sevenSegment = 7'b0001111;<br> 4'h8: sevenSegment = 7'b0000000;<br> 4'h9: sevenSegment = 7'b0000100;<br> default: sevenSegment = 7'b1111111;<br>endcase</p><p>// Map sevenSegment to the pins<br>assign {segA, segB, segC, segD, segE, segF, segG} = sevenSegment;</p><p>endmodule</p><p><br>// OctoBcd is eight UniBcd<br>module OctoBcd(clock, carryIn, bcdDigits);</p><p>input clock, carryIn;<br>output [31:0] bcdDigits;</p><p>wire [7:0] carryout;<br>assign carryout[0] = carryIn; // Prime the carryIn by setting carryOut<br>UniBcd digit0(.clock(clock), .carryIn(carryout[0]), .limit(4'h9), .bcdDigit(bcdDigits[ 3: 0]), .carryOut(carryout[1])); // Ones second goes up to limit of 9<br>UniBcd digit1(.clock(clock), .carryIn(carryout[1]), .limit(4'h5), .bcdDigit(bcdDigits[ 7: 4]), .carryOut(carryout[2])); // Tens second goes up to limit of 5<br>UniBcd digit2(.clock(clock), .carryIn(carryout[2]), .limit(4'h9), .bcdDigit(bcdDigits[11: 8]), .carryOut(carryout[3])); // Ones minute goes up to limit of 9<br>UniBcd digit3(.clock(clock), .carryIn(carryout[3]), .limit(4'h5), .bcdDigit(bcdDigits[15:12]), .carryOut(carryout[4])); // Tens minute goes up to limit of 5<br>UniBcd digit4(.clock(clock), .carryIn(carryout[4]), .limit((bcdDigits[23:20] == 4'h2) ? 3'h3 : 4'h9), .bcdDigit(bcdDigits[19:16]), .carryOut(carryout[5])); // Ones hour goes to 9 unless tens hour is 2<br>UniBcd digit5(.clock(clock), .carryIn(carryout[5]), .limit(4'h2), .bcdDigit(bcdDigits[23:20]), .carryOut(carryout[6])); // Tens hour goes up to limit of 2<br>UniBcd digit6(.clock(clock), .carryIn(carryout[6]), .limit(4'h9), .bcdDigit(bcdDigits[27:24]), .carryOut(carryout[7])); // Ones days goes to 9<br>UniBcd digit7(.clock(clock), .carryIn(carryout[7]), .limit(4'h9), .bcdDigit(bcdDigits[31:28])); // Tens days goes to 9</p><p>endmodule</p><p><br>// UniBcd is one bcd digit with carryIn, carryOut and limit<br>module UniBcd(clock, carryIn, limit, bcdDigit, carryOut);</p><p>input clock, carryIn;<br>input [3:0] limit;<br>output [3:0] bcdDigit;<br>output carryOut;</p><p>reg [3:0] bcdDigit;<br>wire rolledOver = (bcdDigit == limit);<br>always @(posedge clock)<br>if(carryIn) // We only do something with this digit if it has a carryIn<br> if(rolledOver)<br> bcdDigit &lt;= 4'h0; // If we rolled over set digit to zero<br> else<br> bcdDigit &lt;= bcdDigit + 4'h1; // If not we increment the digit</p><p>assign carryOut = carryIn &amp; rolledOver; // If there was a carry in and we rolled over then carryOut</p><p>endmodule</p>
<p>Hey Mike - </p><p>Nice job! I *think* it was blinking too. Ever figure out why bits [16:14] work better?</p>
Originally I had it picking bits that had a higher index, I figured it really did not matter which three bits I picked because they could be evaluated as a value between 0 and 7. The higher index though was higher order bits and would change less frequently. So the activeSegment would be active for longer which caused the flicker I think. So I moved away from the higher order bits of count to essentially increase the number of times the activeSegment changes. I changed it a few times to get the refresh rate at which I could not detect the flicker. I probably could have figured it out with math but just adjusting it a few times seemed faster.
<p>True random number generator, based on ring oscillators. All done with Quartus Prime, graphical entry. The kit is excellent, very clean and no useless extras :) Remember to set Pin 50 &quot;Beeper&quot; to &quot;1&quot; to shut down the beeper in your designs!</p>
<p>Late response, but I missed this somehow....anyway that's awesome G'lenH! I wasn't entirely sure what you had done, and I just read some more about it - very interesting. I'd love to see the schematic for that!</p>
<p>Long story follows:</p><p>I installed Quartus Prime and got the USB driver working on my Windows 10 machine. I followed the &quot;Entering your first design&quot; walkthrough at <a href="http://www.hackshed.co.uk/getting-started-with-cplds-index/" rel="nofollow">http://www.hackshed.co.uk/getting-started-with-cplds-index/</a> (which was pretty clear I thought, well done). Every time I try to program it causes Windows to blue screen.</p><p>Installed Ubuntu on a VM and then downloaded the Quartus Prime software and installed it. After some work I was able to walk through the instruction again. Compile, pick pin, compile and then program. Now all the development board LEDs and buzzer are going. Worried that I busted something I turned it off. Is this normal? Did I just not do something that I should have known to do? Anyone have a working Quartus Prime project I could download and study?</p><p>I'm loving learning and messing with this stuff! Any pointers would be appreciated.</p>
<p>Did anyone ever get a solution for the blue screens MikeM515 mentioned in Windows 10 above? I've got a brand new install of Windows 10, and when the USB Blaster is connected, it randomly bluescreens.<br><br>Also, Thanks for the blog jasper_fracture. looks like that will give lots of people a good foundation to start on.</p>
<p>So, since it was a new windows 10 install, I dumped windows 10. </p><p>Installed Ubuntu Desktop 16.0.4 LTS and installed the software.</p><p>Initially I had issues installing QuartusLiteSetup- (and 200 with the update) where the window would stall (Gray out) after about 50%. Not installing ModelSim like someone else mentioned didn't seem to help. (I let it run over night installing). So I downloaded QuartusLiteSetup- and it worked like a champ installing. I still haven't tried uploading a program, but I will shortly.</p>
<p>Set your unused pins to something other than the default &quot;drive to ground&quot;. </p><p>My son and I have been working on our hobby site, and the first few posts we did were some basic tutorials (block schematics, blinking led, binary led counter, etc.) for the Altera board: <a href="http://jasperfracture.com."> http://jasperfracture.com. </a> </p>
<p>Very nice! Thank you!</p>
<p>Mike -</p><p>Clarification - yes, it is normal for everything to turn on if you compile with the default setting &quot;as output driving ground&quot; for &quot;Unused Pins&quot;. Compiling like this pulls all the unused outputs low and turns all the onboard stuff on.</p><p>If you've got a project open, you can change the setting via the main menu: &quot;Assignments-&gt;Device&quot;, click the &quot;Device and Pin Options...&quot; button, select &quot;Unused Pins&quot; under &quot;Category&quot;. Last, make a selection from the &quot;Reserve all unused pins&quot; dropdown. Something like &quot;as input tri-stated&quot; instead of &quot;as output driving ground&quot;. </p>
<p>Thank you for the information Jasper! I will give this a try when I get home tonight.</p>
<p>Blaster chain problem.</p><p>Using Windows 10.</p><p>First circuit compiles ok.</p><p>Run programmer but get blank report.</p><p>Push auto detect and get error message - &quot;Unable to scan device chain.&quot;</p><p>Run &quot;test TTAG chain.&quot;</p><p>Get &quot;Error. JTAG chain problem detected. Error. No device detected.&quot;</p><p>Device manager has - Altera USB-Blaster</p><p>Would you help me. I've spent house on this.</p><p>Thanks, Pete Lefferson Lefferson@ieee.org</p>
<p>Has anyone gotten the Quartus Prime &quot;lite&quot; software running on linux yet? I started downloading in on Ubuntu running in an VM, but had to abort the download when I realized that the 12GB(!) file wasn't going to fit in my 8GB vm.</p>
<p>I have Quartus working on Fedora 23 sort off. I don't seem to be able to connect to the Blaster. The Blaster is seen on usb, but Quartus does not see it. I tried to build the driver, but it says the kernel is too new. Anybody get the driver to compile and load with ndiswrapper? </p>
<p>Well I was able to program the MAXII using my Fedora 23 distribution. I did a few examples and want to reload the time counter that came loaded on it. But I can't find the program. Anybody smart enough to have downloaded it off the MAXII? Also I program the thing, but the program does not take unless I turn the MAXII off for quite a while. Anybody got any ideas on this?</p>
<p>You can expand the size of your VM's virtual disk. Might be faster to create a new virtual disk and either dd your current virtual disk to it or just reinstall from scratch.</p>
<p>I just started from scratch. Installed just fine once I had enough space for it.</p>
<p>I was able to install this under Mint17.3, but I had to deselect the ModelSim package from installing. The installer would just hang for some reason. I think it's only for simulating other FPGA packages in memory. I don't think it's necessary, otherwise I have it installed. Trying to figure out what to do with it now...</p>
<p>Just a follow up for anyone using Ubuntu or an Ubuntu based distribution, I couldn't get it to actually recognize my board (via the USB Blaster JTAG) until I followed these steps: http://www.fpga-dev.com/altera-usb-blaster-with-ubuntu/</p>
<p>Yes, it seems to run fine under Ubuntu 16.04 so far, although I had a few hiccups getting permissions setup properly for the Altera USB Blaster.</p>
<p>Anyone with Windows 10 able to use their USB Blaster? Every time I try to use it my machine crashes. I'm using the drivers that came with Quartus 16.0.</p>
<p>This worked for me:</p><p>https://www.youtube.com/watch?v=glk73wRVQ-c</p>
<p>I see a common but unfortunate mistake. Do not arbitrarily equate a low or high voltage with true (1) or false (0)! There are two different logic conventions: positive and negative. For example the 74x00 family data sheet states that this is a Quad Two Input Positive Logic NAND gate. This also means that it can be described as a Quad Two Input Negative Logic NOR gate. In positive logic a high is true (1) and a low is false (0). In negative logic a high is a false (0) and a low is true (1).</p><p>BS Computer Science</p>
<p>You're right, but I just usually call it active low...unless you meant something different. All the LEDs, buzzer, switches, 7 segments, are all a good example of this on the CPLD included with this last box. </p>
<p>it's a shame you didn't bother to make anything cool past the logic gates yourselves and let people scratch&iacute;ng their heads on what to do with all this. </p>
<p>I don't really know what I'm supposed to do with the Logic Analyzer or the CPLD. Can anyone point me to a project that I can use to learn what these do hands on?</p>
<p><a href="http://www.hackshed.co.uk/getting-started-with-cplds-index/" rel="nofollow">http://www.hackshed.co.uk/getting-started-with-cpl...</a></p><p>Use the logic analyzer to see what your inputs and outputs are on your projects. For example, try doing the discrete logic projects without any LEDs</p>
<p>THANK YOU! I Needed to see this tutorial :)</p>
<p>Thanks a bunch! I've downloaded the software. I'll give these tutorials a shot after work today.</p>
<p>I want to try building a 555 timer circuit on this FPGA, I found a few others who have built working NES &amp; games on FPGAs, im wondering what the limits are on this project. I just wish there was some tutorial for building a digital circuit on the FPGA that we could test out even if we are only cut and pasting code.</p>
<p>HB - Just wanted to say how much I am enjoying the CPLD . This is the first time I have used one, and the ability to create circuits from such a high level is amazing to me. One of the first things that I did was hook up the oscillator and use several 7456 blocks to divide the frequency down to flicker an LED. I know, no real practical use, but it was a lot of fun for a first foray into playing around with CPLDs. Nice box! Would have liked some header pins for the CPLD though... </p>
<p>Hi. First off. Thanks to all who have worked so hard putting this project together. I know that I'm lacking in the imagination department but what can I use all this in. Last months project I was able to use it for a scouting project. I understand the circuit well enough but I go back to what can I use it in. Can I incorporate into a circuit to count up or down? Maybe some sort of a clock? I don't know. Any ideas or help would be great. Thanks again to the folks who put it together. </p>
<p>With just these ICs it will be difficult. What you want to search for is how to build a JK flip flop (using additional discrete logic ICs or the CPLD). Build several, and put the output of one into the clock input of the one after it. You can control the first flip flop's clock with a 555 timer. In the end you will will have a binary counter/clock.</p>
<p>You can. I took this sort of thing in a Digital Circuits class in college (engineering school) and it is a solid foundation for much, much bigger things. We went on to build things like Analog to Digital converters, built a 'telephone' on circuit boards, and more. Hope this helps.</p>
<p>HB, no header pins for the EPM240?</p>
<p>found some more information about the board here : https://organicmonkeymotion.files.wordpress.com/2014/01/altera-cpld-learning-board1.pdf</p>
<p>There's a subreddit for hackerboxes. There's not many of us there. Would be nice to have more people. Seems like the best place to just talk in general.</p><p>https://www.reddit.com/r/hackerboxes/</p>
<p>Thanks for mentioning it. I didn't know there was one!</p>
<p>There's a subreddit for everything!</p>
<p>That's great!</p>
<p>Same here regarding DHL. It took 7 days to go from FL to NC, an 8 hour drive. I could have ridden my bike to pick it up faster than that. Dump DHL!</p>
<p>I think my voltage regulator is broken... I wired the AND/OR gate circuits as shown in the diagram and they didn't work when plugging in a 9V battery, but it did work when using a separate 5V power supply... can i get a new one shipped to me?</p>
<p>Sometimes VRs do get damaged. If you have a separate power supply you're fine. In all my circuits classes I've never had a VR and I've built some digital circuits that require multiple breadboards together.</p>
<p>I'd check the voltage on the 1st pin of the 7805 while you have the 9V battery hooked up.....make sure you actually the V you should have and not something like a broken connector. Might get lucky and save you a trip to RS or ordering another,. SuperMechaCow is right thought, I just ordered some from Mouser a month ago, and they were very inexpensive.</p>
<p>7805's are pretty cheap. You can get them for like 20 cents online, or $2 a local radioshack.</p>
<p>Interesting box... What projects are people doing with this?</p>
<p>I feel like this is more for learning theory than building cool things.</p>
<p>First Hacker Box. Followed diagram but didn't read instructions. Spent 20 minutes with multimeter &quot;troubleshooting&quot; and wondering why there was a lead to the + rail. Read instructions; works like a champ. Would novice again.</p>

About This Instructable




More by HackerBoxes:HackerBoxes 0018: Circuit Circus HackerBoxes 0017: Power Maker HackerBoxes 0016: Cellular Metal 
Add instructable to: