loading
11Comments

Tell us about yourself!

Complete Your Profile
  • MikeM515 commented on HackerBoxes's instructable HackerBoxes 0012: Digital Logic6 days ago
    HackerBoxes 0012: Digital Logic

    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.

    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.

    View Instructable »
  • MikeM515 made the instructable HackerBoxes 0012: Digital Logic1 week ago
    HackerBoxes 0012: Digital Logic

    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 overreg [25:0] count;always @(posedge clock)if(count == 50000000) count <= 0;else count <= count + 1;// Picked these bits beca...see more »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 overreg [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 lowassign 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 eachwire [31:0] digits;OctoBcd octoBcd(.clock(clock), .carryIn(count == 50000000), .bcdDigits(digits)); // If the clock has counted one second then carryIn a 1reg [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]; endcaseend// Set the dot for the activeSegment to the correct valueassign 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 pinsassign {segA, segB, segC, segD, segE, segF, segG} = sevenSegment;endmodule// OctoBcd is eight UniBcdmodule OctoBcd(clock, carryIn, bcdDigits);input clock, carryIn;output [31:0] bcdDigits;wire [7:0] carryout;assign carryout[0] = carryIn; // Prime the carryIn by setting carryOutUniBcd digit0(.clock(clock), .carryIn(carryout[0]), .limit(4'h9), .bcdDigit(bcdDigits[ 3: 0]), .carryOut(carryout[1])); // Ones second goes up to limit of 9UniBcd digit1(.clock(clock), .carryIn(carryout[1]), .limit(4'h5), .bcdDigit(bcdDigits[ 7: 4]), .carryOut(carryout[2])); // Tens second goes up to limit of 5UniBcd digit2(.clock(clock), .carryIn(carryout[2]), .limit(4'h9), .bcdDigit(bcdDigits[11: 8]), .carryOut(carryout[3])); // Ones minute goes up to limit of 9UniBcd digit3(.clock(clock), .carryIn(carryout[3]), .limit(4'h5), .bcdDigit(bcdDigits[15:12]), .carryOut(carryout[4])); // Tens minute goes up to limit of 5UniBcd 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 2UniBcd digit5(.clock(clock), .carryIn(carryout[5]), .limit(4'h2), .bcdDigit(bcdDigits[23:20]), .carryOut(carryout[6])); // Tens hour goes up to limit of 2UniBcd digit6(.clock(clock), .carryIn(carryout[6]), .limit(4'h9), .bcdDigit(bcdDigits[27:24]), .carryOut(carryout[7])); // Ones days goes to 9UniBcd digit7(.clock(clock), .carryIn(carryout[7]), .limit(4'h9), .bcdDigit(bcdDigits[31:28])); // Tens days goes to 9endmodule// UniBcd is one bcd digit with carryIn, carryOut and limitmodule 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 digitassign carryOut = carryIn & rolledOver; // If there was a carry in and we rolled over then carryOutendmodule

    View Instructable »
  • MikeM515 commented on HackerBoxes's instructable HackerBoxes 0012: Digital Logic1 month ago
    HackerBoxes 0012: Digital Logic

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

    Very nice! Thank you!

    View Instructable »
  • MikeM515 commented on HackerBoxes's instructable HackerBoxes 0012: Digital Logic1 month ago
    HackerBoxes 0012: Digital Logic

    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 ...see more »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.

    View Instructable »
  • MikeM515 commented on HackerBoxes's instructable HackerBoxes 0012: Digital Logic1 month ago
    HackerBoxes 0012: Digital Logic

    This worked for me:https://www.youtube.com/watch?v=glk73wRVQ-c

    View Instructable »
  • MikeM515 commented on HackerBoxes's instructable HackerBoxes 0011: HAX0R TREAT2 months ago
    HackerBoxes 0011: HAX0R TREAT

    My daughters and I worked on this one and had a lot of fun. We plan on making some changes to the eyes and keeping this around for next year too!

    My daughters and I worked on this one and had a lot of fun. We plan on making some changes to the eyes and putting the motion sensor and transmitter in a project box so we can put it on the porch. We are keeping this around for next year too!

    View Instructable »
  • MikeM515 commented on HackerBoxes's instructable HackerBoxes 0010: Phython Pi2 months ago
    HackerBoxes 0010: Phython Pi

    Very fun! My daughters and I put this together. Our calculator currently can only take two numbers, improvements will have to come later maybe.

    View Instructable »
  • MikeM515 followed HackerBoxes2 months ago
      • HackerBoxes Starter Workshop
      • HackerBoxes 0011: HAX0R TREAT
      • HackerBoxes 0010: Phython Pi
  • MikeM515 commented on HackerBoxes's instructable HackerBoxes 0011: HAX0R TREAT3 months ago
    HackerBoxes 0011: HAX0R TREAT

    I found a reference at https://www.arduino.cc/en/Guide/ArduinoProMini that indicated that the Arduino Duemilanove or Nano w/ ATmega328 should be used for 5v, I tried it and it seems to work for me now.

    View Instructable »