Introduction: HackerBoxes 0012: Digital Logic

Picture of HackerBoxes 0012: Digital Logic

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

Picture of 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?

Picture of 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

Picture of Wiring Up an AND Gate

Parts:

  • 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

Picture of 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

Picture of 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

Picture of Wiring Up a D Flip-Flop Circuit

Parts:

  • 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

Picture of 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

Picture of 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

Picture of 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

Picture of 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!

Comments

DavidH881 made it! (author)2017-01-15

For what it’s worth, here’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 http://altera-guide.blogspot.com/. 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 “Delete the driver software for this device” option. Good to go!

MikeM515 made it! (author)2017-01-04

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:

module MultiplexSevenSegment(clock, segA, segB, segC, segD, segE, segF,segG, segH, seg0, seg1, seg2, seg3, seg4, seg5, seg6, seg7);

input clock;
output segA, segB, segC, segD, segE, segF,segG, segH, seg0, seg1, seg2, seg3, seg4, seg5, seg6, seg7;

// Clock will count to 50000000 which will fit into 26 bits and then roll over
reg [25:0] count;
always @(posedge clock)
if(count == 50000000)
count <= 0;
else
count <= count + 1;

// Picked these bits because it seemed to make the multiplexing not flicker
wire [2:0] activeSegment = count[16:14];

// Depending on the value of the bits above set the active segment pin low
assign seg0 = ~(activeSegment==3'h0);
assign seg1 = ~(activeSegment==3'h1);
assign seg2 = ~(activeSegment==3'h2);
assign seg3 = ~(activeSegment==3'h3);
assign seg4 = ~(activeSegment==3'h4);
assign seg5 = ~(activeSegment==3'h5);
assign seg6 = ~(activeSegment==3'h6);
assign seg7 = ~(activeSegment==3'h7);

// Array of 32 bits for the array of binary coded decimals 4 bits each
wire [31:0] digits;
OctoBcd octoBcd(.clock(clock), .carryIn(count == 50000000), .bcdDigits(digits)); // If the clock has counted one second then carryIn a 1

reg [6:0] displaySegment;
reg [3:0] digit;
reg [1:0] dot;
always @(*)
begin
// The first half of the second the separator dots are on second half they are off
if(count < 25000000 && (activeSegment == 3'd2 || activeSegment == 3'd4 || activeSegment == 3'd6))
dot <= 0;
else
dot <= 1;

// Load the digit for the activeSegment
case(activeSegment)
3'd0: digit = digits[ 3: 0];
3'd1: digit = digits[ 7: 4];
3'd2: digit = digits[11: 8];
3'd3: digit = digits[15:12];
3'd4: digit = digits[19:16];
3'd5: digit = digits[23:20];
3'd6: digit = digits[27:24];
3'd7: digit = digits[31:28];
endcase
end
// Set the dot for the activeSegment to the correct value
assign segH = dot;

reg [6:0] sevenSegment;
always @(*)
case(digit)
4'h0: sevenSegment = 7'b0000001;
4'h1: sevenSegment = 7'b1001111;
4'h2: sevenSegment = 7'b0010010;
4'h3: sevenSegment = 7'b0000110;
4'h4: sevenSegment = 7'b1001100;
4'h5: sevenSegment = 7'b0100100;
4'h6: sevenSegment = 7'b0100000;
4'h7: sevenSegment = 7'b0001111;
4'h8: sevenSegment = 7'b0000000;
4'h9: sevenSegment = 7'b0000100;
default: sevenSegment = 7'b1111111;
endcase

// Map sevenSegment to the pins
assign {segA, segB, segC, segD, segE, segF, segG} = sevenSegment;

endmodule


// OctoBcd is eight UniBcd
module OctoBcd(clock, carryIn, bcdDigits);

input clock, carryIn;
output [31:0] bcdDigits;

wire [7:0] carryout;
assign carryout[0] = carryIn; // Prime the carryIn by setting carryOut
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
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
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
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
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
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
UniBcd digit6(.clock(clock), .carryIn(carryout[6]), .limit(4'h9), .bcdDigit(bcdDigits[27:24]), .carryOut(carryout[7])); // Ones days goes to 9
UniBcd digit7(.clock(clock), .carryIn(carryout[7]), .limit(4'h9), .bcdDigit(bcdDigits[31:28])); // Tens days goes to 9

endmodule


// UniBcd is one bcd digit with carryIn, carryOut and limit
module UniBcd(clock, carryIn, limit, bcdDigit, carryOut);

input clock, carryIn;
input [3:0] limit;
output [3:0] bcdDigit;
output carryOut;

reg [3:0] bcdDigit;
wire rolledOver = (bcdDigit == limit);
always @(posedge clock)
if(carryIn) // We only do something with this digit if it has a carryIn
if(rolledOver)
bcdDigit <= 4'h0; // If we rolled over set digit to zero
else
bcdDigit <= bcdDigit + 4'h1; // If not we increment the digit

assign carryOut = carryIn & rolledOver; // If there was a carry in and we rolled over then carryOut

endmodule

jasper_fracture (author)MikeM5152017-01-10

Hey Mike -

Nice job! I *think* it was blinking too. Ever figure out why bits [16:14] work better?

MikeM515 (author)jasper_fracture2017-01-11

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.

G'lenH made it! (author)2016-11-30

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 "Beeper" to "1" to shut down the beeper in your designs!

jasper_fracture (author)G'lenH2017-01-10

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!

MikeM515 (author)2016-12-01

Long story follows:

I installed Quartus Prime and got the USB driver working on my Windows 10 machine. I followed the "Entering your first design" walkthrough at http://www.hackshed.co.uk/getting-started-with-cplds-index/ (which was pretty clear I thought, well done). Every time I try to program it causes Windows to blue screen.

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?

I'm loving learning and messing with this stuff! Any pointers would be appreciated.

CrashSerious (author)MikeM5152016-12-26

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.

Also, Thanks for the blog jasper_fracture. looks like that will give lots of people a good foundation to start on.

So, since it was a new windows 10 install, I dumped windows 10.

Installed Ubuntu Desktop 16.0.4 LTS and installed the software.

Initially I had issues installing QuartusLiteSetup-16.1.0.196-linux (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-16.0.0.211-linux and it worked like a champ installing. I still haven't tried uploading a program, but I will shortly.

jasper_fracture (author)MikeM5152016-12-01

Set your unused pins to something other than the default "drive to ground".

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: http://jasperfracture.com.

MikeM515 (author)jasper_fracture2016-12-02

Very nice! Thank you!

jasper_fracture (author)MikeM5152016-12-01

Mike -

Clarification - yes, it is normal for everything to turn on if you compile with the default setting "as output driving ground" for "Unused Pins". Compiling like this pulls all the unused outputs low and turns all the onboard stuff on.

If you've got a project open, you can change the setting via the main menu: "Assignments->Device", click the "Device and Pin Options..." button, select "Unused Pins" under "Category". Last, make a selection from the "Reserve all unused pins" dropdown. Something like "as input tri-stated" instead of "as output driving ground".

MikeM515 (author)jasper_fracture2016-12-02

Thank you for the information Jasper! I will give this a try when I get home tonight.

Pete Lefferson (author)2016-12-28

Blaster chain problem.

Using Windows 10.

First circuit compiles ok.

Run programmer but get blank report.

Push auto detect and get error message - "Unable to scan device chain."

Run "test TTAG chain."

Get "Error. JTAG chain problem detected. Error. No device detected."

Device manager has - Altera USB-Blaster

Would you help me. I've spent house on this.

Thanks, Pete Lefferson Lefferson@ieee.org

rob_hunt (author)2016-11-05

Has anyone gotten the Quartus Prime "lite" 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.

ibyte8bits (author)rob_hunt2016-11-13

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?

ibyte8bits (author)ibyte8bits2016-11-29

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?

SuperMechaCow (author)rob_hunt2016-11-06

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.

rob_hunt (author)SuperMechaCow2016-11-11

I just started from scratch. Installed just fine once I had enough space for it.

Vinator (author)rob_hunt2016-11-07

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

Vinator (author)Vinator2016-11-07

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/

jasper_fracture (author)rob_hunt2016-11-06

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.

ruthsarian (author)2016-11-12

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.

MikeM515 (author)ruthsarian2016-11-28

This worked for me:

https://www.youtube.com/watch?v=glk73wRVQ-c

kkunderwood (author)2016-11-16

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).

BS Computer Science

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.

AlexandreS15 (author)2016-11-11

it's a shame you didn't bother to make anything cool past the logic gates yourselves and let people scratchíng their heads on what to do with all this.

DannyM118 (author)2016-11-06

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?

SuperMechaCow (author)DannyM1182016-11-06

http://www.hackshed.co.uk/getting-started-with-cpl...

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

OlafB8 (author)SuperMechaCow2016-11-08

THANK YOU! I Needed to see this tutorial :)

DannyM118 (author)SuperMechaCow2016-11-07

Thanks a bunch! I've downloaded the software. I'll give these tutorials a shot after work today.

OlafB8 (author)2016-11-08

I want to try building a 555 timer circuit on this FPGA, I found a few others who have built working NES & 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.

jasper_fracture (author)2016-11-07

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

RobotFarmer (author)2016-11-03

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.

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.

KatrinaS31 (author)RobotFarmer2016-11-06

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.

jasper_fracture (author)2016-11-06

HB, no header pins for the EPM240?

rob_hunt (author)2016-11-06

found some more information about the board here : https://organicmonkeymotion.files.wordpress.com/2014/01/altera-cpld-learning-board1.pdf

SuperMechaCow (author)2016-11-03

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.

https://www.reddit.com/r/hackerboxes/

munkyutk (author)SuperMechaCow2016-11-03

Thanks for mentioning it. I didn't know there was one!

SuperMechaCow (author)munkyutk2016-11-06

There's a subreddit for everything!

ToddR (author)SuperMechaCow2016-11-03

That's great!

bruster999 (author)2016-11-06

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!

ijm523 (author)2016-11-02

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?

KatrinaS31 (author)ijm5232016-11-06

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.

jasper_fracture (author)ijm5232016-11-03

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.

SuperMechaCow (author)ijm5232016-11-03

7805's are pretty cheap. You can get them for like 20 cents online, or $2 a local radioshack.

HenryK40 (author)2016-11-04

Interesting box... What projects are people doing with this?

SuperMechaCow (author)HenryK402016-11-05

I feel like this is more for learning theory than building cool things.

CudaRavage made it! (author)2016-11-04

First Hacker Box. Followed diagram but didn't read instructions. Spent 20 minutes with multimeter "troubleshooting" and wondering why there was a lead to the + rail. Read instructions; works like a champ. Would novice again.

About This Instructable

12,745views

18favorites

License:

More by HackerBoxes:HackerBox 0025: Flair WareHackerBox 0024: Vision QuestHackerBox 0023: Digital Airwaves
Add instructable to: