Hardware build: CRC calculation

Поділитися
Вставка
  • Опубліковано 21 лис 2024

КОМЕНТАРІ • 517

  • @benjaminmyburgh6936
    @benjaminmyburgh6936 5 років тому +689

    Watching that complex math boil down to such simple logic operations was the most beautiful thing I ever saw

    • @marshmellominiapple
      @marshmellominiapple 5 років тому +14

      it's really all math, understanding it what makes it beautiful

    • @bonbonpony
      @bonbonpony 5 років тому +7

      Have you seen the punchline at the end though? (51:44) ;)

    • @CMDRunematti
      @CMDRunematti 4 роки тому +2

      you should look into 3blue1brown channel

    • @malcolmholmes115
      @malcolmholmes115 3 роки тому +5

      I feel so sad that his channel is so underrated, but really crappy videos is really popular, bit disappointed in humanity

    • @toquelau5715
      @toquelau5715 3 роки тому +2

      @@malcolmholmes115 Have you seen the movie 'Idiocracy'? Sadly, that's the world we're heading into. Easy and dumb trumping over smart and creative. Looks over substance. The intelligent are becoming a rare bunch...

  • @BigDaddy_MRI
    @BigDaddy_MRI 5 років тому +368

    I have to admit, after 42 years being a MSEE, your videos are truly works of inspiration. You are, most likely, one of the very best in the explanation in hardware and software of complex systems and how they work. Your simplification of concepts is just perfect.
    Thank you for all your videos. Please continue with these videos. I look forward to each and every one.

    • @BillDreisbach
      @BillDreisbach 4 роки тому +4

      Amen! (I'm in the same 'boat' ;-)

    • @MrCool-lo3ls
      @MrCool-lo3ls 4 роки тому +4

      As a 17 year old student who goes to a school, that doesn't really teach technical stuff and electonics, i absolutely love his videos. He explains these concepts, shows how they work and how he sets them up. When people talk about electronics, they often show oversimplified images, that don't really translate to the real world. I watch this in my free time because I'm genuinely interested in the content, so I don't mind if the explanation takes a while, which is weird because my attention span is usually extremely short.
      From the way he explains these topics, they become understandable but he also gets across how complex they are and after watching his videos, I feel a bit smarter because i just learned something complex.
      I live in germany, and technology wise, we aren't that advanced. In schools it's a miracle if we get the projector to work. I don't think any students at my school who can programm, learned it in class. At least not the 5 who do know programming.

  • @ryanmustain6545
    @ryanmustain6545 2 роки тому +7

    I work in an industry where I need to understand CRC, FEC, parity, etc. This is by far the coolest, most thoroughly and concise explanation of this material I have ever seen. It makes me want to grab a breadboard and start exploring this side of the coin. Thanks!

  • @gnpar
    @gnpar 3 роки тому +14

    The explanations are so good that sometimes we don't even realize that the video editing is also superb

  • @richardwilliamjohnson8566
    @richardwilliamjohnson8566 5 років тому +27

    Dude. Do you realise how fucking amazing it is to see maths being used for something useful? Maths teachers can never tell you why you're doing what you're doing. It's just dull processes you memorise to pass a test.
    What a joy it is to see this!! Thanks

  • @junkmail4613
    @junkmail4613 5 років тому +172

    I'm 70. Refreshing AND Breath-Taking..... Oh wait, I still need that.... :-) Thank You So much I can't verbalize it. Keep it up!

    • @shinigamilee5915
      @shinigamilee5915 5 років тому +2

      It's a refreshers course. I used a similar method when testing CRC NAND flash drive testing. It's been about 5 years. It's surprising how much you forget.

  • @m.sierra5258
    @m.sierra5258 5 років тому +150

    Hey! I was just playing around with the CRC generation and found a simpler and faster way that eliminates sending 16 zeroes into the crc generator.
    What you did was:
    1. initialize with zero
    2. feed message[i] into the right side
    3. crc-flip based on crc[leftmost]
    4. repeat until message over, then feed 16 zeros
    If you replace that algorithm with:
    1. initialize with zero
    2. feed 0 into the right side
    3. crc-flip based on crc[leftmost] xor message[i]
    4. repeat until message over, done. no 16 zeros needed.
    This works because you basically skip the 16 first steps of your algorithm, which only fill up the pipeline without any bit flipping.
    You could bypass that step. The message itself doesn't have to get fed through the pipeline.
    This has the advantage that there is no waiting time between the message and the crc sending, after sending the message you can directly send the crc.
    Love your videos, keep making them!

    • @BenEater
      @BenEater  5 років тому +57

      Nice improvement!

    • @xamael1989
      @xamael1989 5 років тому +1

      Thanks alot can you be kind enough to share this on github

    • @chaitanyasindagi1237
      @chaitanyasindagi1237 5 років тому +2

      Well, unless the CRC is calculated as you transmit like in this case and then your CRC is ready when the message is complete

    • @lyingcat9022
      @lyingcat9022 5 років тому +5

      I’m trying to picture what this optimization looks like... but I cannot:( I don’t understand the difference in the steps. I completely follow his original though.

    • @lyingcat9022
      @lyingcat9022 5 років тому +6

      Why init with zeros then shift in a zero?

  • @ricardoboss
    @ricardoboss 5 років тому +280

    Just wanted to say that I'm glad you're making videos again! Love all of them!

  • @tozpeak
    @tozpeak 2 роки тому +2

    I learned field algebra laws in my university on Software Engeneering cource. I might even see a XOR algebra as an example, but matrix algebra took more attention.
    This is the first time I see XOR algebra is applied to a real world problem. And this is such a pleasure to watch how theory you knew is getting common sense to exist.
    Your course about 8-bit PC was inspiring and helped me to fill the gap between adder (summer) from school and assembly from university. Now you remembered me how much I loved math while it was appliable, and I hope inspire to learn some high math again.
    Beautiful channel, thank you for your work!

  • @edmund-osborne
    @edmund-osborne 5 років тому +124

    20:18 This reveal was amazing, seeing the circuit and suddenly realising how elegantly it implements the algorithm. Nicely edited!

    • @BrosBrothersLP
      @BrosBrothersLP 5 років тому +2

      Well as far as i am informed the circuit was kinda there before people started doing it in software

  • @millertime08
    @millertime08 Рік тому +14

    I really loved this series. Once I started, I was on the edge of my seat waiting to see how error detection would get better and better. Really amazing seeing the idea on paper and then transformed into an elegant circuit. Thanks so much for making these videos and explaining every step in such detail!

  • @stevewalston7089
    @stevewalston7089 5 років тому +69

    Absolutely awesome series Ben! This is the way electronics and engineering basics should be in college, breadboarding at its finest with detailed explanation all rolled into a practical example. What a world of difference this could make for the engineer to be that so rarely occurs when in school. I love it, and I haven't had digital classes since 1985! Tip for the kiddies: keep your breadboards on a 2D plane and try not to go full 3D …

    • @xamael1989
      @xamael1989 5 років тому

      Well noted sir

    • @GRBtutorials
      @GRBtutorials 5 років тому +9

      But 3D NAND is all the craze, why can't I do the same and use all the space available on my breadboard? Now seriously, I plead guilty to all charges... my breadboards are a mess.

  • @alpyre
    @alpyre 5 років тому +13

    It would take a couple of days (if not weeks) of re-reading from whitepapers (or books) for me to grasp what CRC is. But in less than an hour, now I have a solid understanding of what it is, how it works, how it can be implemented. And I'm entertained all the way through. If only every college had at least one teacher like you, world would be a different place! :)

  • @mikefochtman7164
    @mikefochtman7164 4 роки тому +1

    I never really understood CRC until I watched your video. I can understand how early days you would calculate CRC in hardware and then send it along after the message.
    But after watching you having to add so many read/write pins for clocking CRC hardware separately, then reading CRC using a read-enable pin, I'm thankful I always got to do the CRC calculations in software (didn't understand them, just 'cookbooked' it) :)

  • @cogwheel42
    @cogwheel42 5 років тому +329

    "Hella, world!" ... could not have planned that

    • @kmacdough
      @kmacdough 4 роки тому +11

      This whole series was just an elaborate setup ;)

    • @abcrtzyn
      @abcrtzyn 4 роки тому +5

      It actually happened in a previous video too

    • @Starwort
      @Starwort 4 роки тому +1

      @@abcrtzyn IMO should have been Hella, word!

    • @techleontius9161
      @techleontius9161 4 роки тому +3

      2019: "Hello, world!"
      2020: "Hella world!"

  • @anno_nym
    @anno_nym Рік тому +2

    This video was the first one, that gave me a deep understanding of how CRC's work and how to compute them.
    I really appreciate that you put this amount of effort into explaining everything and building all up from scratch.

  • @320mb
    @320mb 4 місяці тому

    WOW!! I used 3 breadboards for the TX/RX setup... LED's lined the middle board... I had room for an 74ls08 "AND" chip... it works as advertised, inputs were the READ signal from the Nano, and the last bit from the FF's... the output got fed back into the XOR's........ and it was a flawless CRC.... I put a Picture on my setup on my youtube if anyone is interested in seeing what I built... Thanks Ben, this was a Fantastic Teaching tool...

  • @weirdboyjim
    @weirdboyjim 5 років тому +8

    Always impressed with your skill at explaining things. That simple trick of covering half the XOR truth table was vastly better than my last attempt at explaining it.

  • @joaoornelas1582
    @joaoornelas1582 4 роки тому

    Oh my god. What a journey.
    You state a problem, then go into a wild ride of analysis and by way of complex series of deductions, you arrive at a solution. You implement it, test it, and then when EVERYTHING WORKS (most of the time), while others would be going like "AS YOU CAN SEE, I DO THE VOODOO MAGIC", you're like "oh hey it worked, cool. Moving on...".
    You truly have a gift. I wish I was in a position I could repay you somehow, but at least know that your videos are changing my world. Thank you so much!

  • @giacomo.delazzari
    @giacomo.delazzari 5 років тому +14

    So amazing to see an algorithm I always use implemented in hardware! As a suggestion, you can hook up the FFs clear pins to the Arduino reset pin, that way when you press the reset button the pin will go to GND (that's what the button does on the PCB). You also benefit from the free pull-up that's on the Arduino board :)

  • @tom23rd
    @tom23rd 5 років тому

    I wouldn't have dropped out of EE if my professors took this approach. 20 years later all of this is actually making sense. Kudos for well-thought-out-ness and clarity!

  • @mrday60
    @mrday60 4 роки тому

    Hello Ben,
    I have been researching MANY different ways to calculate the CRC and when I saw yours I was blown away!
    I do NOT have bread boards, but I have A LOT of interest to reproduce the shift register results you had.
    I am not using the same protocol however; my application runs CRC-16 MODBUS.
    I surmised concluded the following steps: 'PLEASE CORRECT ME IF I HAVE IT WRONG."
    1. Assemble all bits into string of binary including CRC initial. "My case all '1's."
    2. Reflect IN, 'TRUE', flip all bits of my initial message. "exclude the crc"
    3. Shift to left most is equal to '1'
    4. Left Most = '1', xor polynomial bits 16-1
    5. Xor complete, repeat steps 3 & 4.
    6. Continue loop until polynom of 16 is at LMB = 1 @ bit 16 or until it can-not fit "so if there is a '1' at bit 14 but the polynom is 16 long, remainder is calculate polynom
    7. After calculation, Reflect output of calutation "TRUE" in my case so I flip the bits in my output.
    8. After I flip the bits I check the xor output requirement which is "0x0000" so i surmise that means do not xor output?
    Then I compare to target value fro ma known calculator source.
    My shift register does NOT produce the target value.
    Please let me know if there is a flaw in my process.

  • @andyonions7864
    @andyonions7864 2 роки тому +1

    Absolutely brilliant. As a Comp Sci graduate I have to say your stuff is like a blast from the (very distant in my case) past. The only thing I'd add about CRCs is that fundamentally although they confer a good degree of confidence in the correctness of a message, they still allow for a 1 in 65536 chance of passing of a mangled message . For a high message noisy environment, this could (and certainly can be) problematic.

    • @kaitlyn__L
      @kaitlyn__L Рік тому

      Yep. When I had a noisy DSL line the CRC error count was through the roof, on the order of 10,000s every few minutes. They were caught and retransmitted, but on top of that about 1% of my TCP packets would still fail their own checks and request a retransmit on the protocol layer. So about 1% of errors were making it through the modem’s own CRC checks!

    • @andyonions7864
      @andyonions7864 Рік тому

      @@kaitlyn__L commercially I'm working on a wireless system. I get duff messages every 10 mins even though their crcs are good.

    • @kaitlyn__L
      @kaitlyn__L Рік тому

      @@andyonions7864 that’s rough. I knew RF was noisier than even a maximum-length DSL run, but oof.

  • @ashwani2910
    @ashwani2910 4 роки тому

    Just amazing!!! I have never seen an complex topic been explained with such simplicity. I read about CRC during my college days but never understood it. Now after 15 years finally I am able to. Thanks a lot sir Ben.

  • @stompreaper
    @stompreaper 5 років тому +1

    It makes a big difference absorbing the information seeing you do this physically. Just on paper or whiteboard doesn't have near the same impact. I know it makes showing the principle a lot longer but it really sticks better. Thanks Ben!

  • @timsmith2525
    @timsmith2525 5 років тому +11

    You are a good teacher. You do a great job of breaking the problem down into logical steps that are easy to understand.

  • @LawrencceF
    @LawrencceF 5 років тому +42

    Your notification is something rare that makes me happy everytime I see it. Keep uploading this content man, your videos are amazing!

    • @shinigamilee5915
      @shinigamilee5915 5 років тому +1

      Agreed. This kind of video takes a lotof time. It's nice to see.

  • @sethperkins1938
    @sethperkins1938 Рік тому

    3 years later and still absolutely the best video for a beginner to learn this topic.

  • @ulyssedurand6810
    @ulyssedurand6810 5 років тому +8

    Can't understand how you do to make people understand electronics that easily, myself I am not particulary focused on the video and still I understand everything you explain. Thanks, keep going (Hello from France by the way)

    • @Skiddla
      @Skiddla 4 роки тому

      Hella from France 0b0101001001111000

  • @heidelbergcellularrepairs8638
    @heidelbergcellularrepairs8638 3 роки тому

    This guy is awesome. How he divides all complicated systems to their simplest logic is marvellous

  • @danielmorrison7579
    @danielmorrison7579 2 роки тому

    If only I had had access to these videos during my college years, life would have been so much easier. My instructor was very good, but these are so much clearer.
    Thanks for the effort.

  • @gandei100
    @gandei100 2 роки тому +1

    Brilliant!
    That XMODEM rings a bell. I reckon I saw it on terminal window when the old 4800bps dial-up modem connected to service provider with that remarkable buzzing sound!

  • @shamanthbv
    @shamanthbv 5 років тому +1

    man your circuit wiring is so neat. i remember when i was using bread board none of my circuits were this neatly wired all of them were so jumbled that retracing my circuit was a nightmare for me. Whatever might be the case please keep up the good work.

  • @cokeforever
    @cokeforever 5 років тому

    Your channel is of very very high quality. I do project lead for living and the more i go thru life, the more i dream younger programmers be taught at least one-year course by you ) Logic and sense of it is what you do really well, and it is great ground to stand on for each programmer. Thank you for your videos and good luck, sir!

  • @noahchristman2077
    @noahchristman2077 4 роки тому +3

    Now we just need a video for how the receiving computer can fix that error. Great video!

  • @micycle8778
    @micycle8778 4 роки тому +2

    One thing I would add here is a "CRC" line. When it's held high, whatever system you have for reading the output would be disabled and the only thing that would read data would be the CRC logic. With that, you could also make a basic frame. On the falling edge of the CRC line, you know a frame has ended and a new frame will begin in some time.

  • @AlejandroHernandez-xi4vl
    @AlejandroHernandez-xi4vl 2 роки тому

    This is the most beautiful video I’ve ever seen. I was struggling to visualize and translate the math from the CRC calculation into digital blocks and then into SystemVerilog, but you explained so perfectly. Thanks a lot!!

  • @gottesman007
    @gottesman007 5 років тому +5

    200 years later... Finally!
    I love your videos, so clear, interesting and actually funny to see

  • @k98killer
    @k98killer 5 років тому +10

    This is inspiring me to build a CRC-16 generator in Minecraft this weekend. This is going to take a while.
    Edit: a shift register with some XOR gates isn't too difficult and took only like half an hour to lay out and test. Making a wireless communication system that generates a CRC-16, however, would take all weekend.

    • @prathamkalgutkar7538
      @prathamkalgutkar7538 2 роки тому +1

      It's been 3 Years now but We would like to know and/or see what's the status to your peoject? :)

    • @k98killer
      @k98killer 2 роки тому +2

      @@prathamkalgutkar7538 I forgot about it after making and testing a bunch of component circuits. Ran into conceptual issues with laying out and connecting all of the parts iirc.

  • @IngieKerr
    @IngieKerr 5 років тому

    This was wonderful. I recently watched the whole breadboard computer build series to get here, after accidentally finding your recent Video Card episode . I was in the lucky 80s Kids-at-British-Schooling bracket of Computer Studies, learning twos compliment and machine level logic of binary maths at school when 13. Did a talk for high school English grades on how the insides of a Sinclair Spectrum [TIMEX 2048 in USA] worked. But I've never seen such a well taught full beginning to end foundation in "how it works - the computer". Your recent ones on error checking have covered things I've never thought of thinking about until now, and the sheer logic of it all is inspiring.
    I shall share this channel with every nerd I meet :)

  • @r_mclovin
    @r_mclovin 7 місяців тому

    Don't know if anyone ever told you this, but with your videos you're carrying so many EE/CS students, you really make the world a better place.

  • @danielclark5385
    @danielclark5385 5 років тому +1

    Amazing error detection series, came here from your 8-bit breadboard computer videos and will continue with that now too!

  • @SJHarper79
    @SJHarper79 3 роки тому

    Thank you Ben, for making all of these amazing videos. I've been in IT for almost 20 years, and I've always wanted to know exactly how does a computer work. All of these videos have given me such a greater understanding of all of this technology. You're awesome. You rock. Keep making awesome videos!!!!

  • @danielmorrison7579
    @danielmorrison7579 2 роки тому

    I can't stop watching your series on this subject. Fantastic. All of this takes me way back, and it is a nice refresher. Thanks for these videos.

  • @Mashimara
    @Mashimara 2 роки тому

    OMG. I am flashing back to my Radio Engineering Days !!! I worked with both Analog and the FIRST Digital Transmitters.

  • @fastundercoverkitgoogle7381
    @fastundercoverkitgoogle7381 5 років тому +1

    Over the years I have found quite a few excellent channels. It's only when I see a notification from your channel that I ABSOLUTELY know I'm in for a wonderful ride

  • @markatherton7848
    @markatherton7848 5 років тому +1

    Nice to see you doing-it-the hard-way, along with your clarity of thought, and explanation. Well done.

  • @Dogwalkeroftwo
    @Dogwalkeroftwo 3 роки тому

    Can't even imagine how long it takes you to bend those wires around to make a neat presentation! Hat's off to you Ben Eater!

  • @lhanger2056
    @lhanger2056 3 роки тому

    Absolutely brilliant description of the maths behind polynomial division made it seem so simple. Then to see how it is implemented in hardware so simply almost seems like magic when it actually works! One thing I noticed in your Arduino code is that you put the echo of the transmit clock AFTER the shift-register clock. Strictly speaking I guess this could cause a race condition where your shift register output starts changing BEFORE you have latched the transmitted data. It is probably never likely to cause a problem unless you were single-stepping through the code but I would have set the transmit clock BEFORE the shift register clock.

  • @ulysses_grant
    @ulysses_grant 5 років тому +3

    Man, it's a real joy to see you uploading again... Thank you Ben!

  • @MrBobi2001
    @MrBobi2001 2 роки тому

    Brilliant! Watched all your video series on the topic within the span of a couple of days and everything is so beautifully linked! Nice work!

  • @Abhinav-tk1bt
    @Abhinav-tk1bt 5 років тому +4

    Always a delight when you upload!

  • @ismaelh256
    @ismaelh256 Рік тому

    I needed to get a grasp of CRC asap for my thesis with DNP and this did it! Thank you !

  • @UpcycleElectronics
    @UpcycleElectronics 5 років тому +35

    IMO it would take a few attempts at making public content for a person to appreciate the weeks of time and effort you've put into this. I don't care how long it takes you to upload something new. Your results are amazing, relevant, and timeless.
    The only thing that should change is how YT categorizes this channel's content. This is relevant to everyone interested in learning electronics, and it will never become dated. These fundamental core concepts will be just as important decades from now as they were decades ago. No one does a better job of breaking up these concepts to create intuitive and easy to follow lessons anyone can appreciate.
    I'm sorry that I feel like I need to watch these uploads with my full undivided attention. This usually means I watch an upload in parts over the course of a day or two. I doubt YT compensates for viewer metrics like this. I'm even worse about skipping around within a video while building some of these circuits myself. I imagine people like myself cause the channel viewer's statistics on the back end to look a bit screwy. I just wanted to say, those numbers are probably not a real indication of how some of us are watching :-)
    I hope you enjoy doing these and can keep them coming for as long as possible. You're a real inspiration, and a talented teacher.
    Many thanks.
    -Jake

    • @Annie_E_P
      @Annie_E_P 3 роки тому

      Perhaps YT needs a "42" classification... If "42" isn't a familiar concept, ask the internet. :-)

  • @sherhy3689
    @sherhy3689 2 роки тому

    It's so satisfying watching the last credit/patreon message CRC check to a 0 understanding what is happening!

  • @pj6366
    @pj6366 5 років тому

    Can't say too much about how I love your content with the degree of clarity and depth that you put into it. Thank you!

  • @RinksRides
    @RinksRides 5 років тому +1

    Though my use case project for the CRC series has evolved beyond needing a robust communication protocol between a raspberry pi 3 and two arduino's over a bit banged I2C bus, perhaps it could still be implemented in the latest revision, in software of course. Thanks for explaining CRC with hardware and blinky lights! Seems to be the way to learn new things.

  • @thesparksplug
    @thesparksplug 5 років тому +1

    I did all these in theory! It would’ve been so great to actually see it in motion. My gosh!

  • @alphadek
    @alphadek 5 років тому +36

    Incredible work :) you really explain things perfectly well

  • @P37R1X
    @P37R1X 4 роки тому

    What an awesome video, although I have to admint this complex math really hurts my brain. I REALLY appreciate this hardware version, seeing the LEDs themselves represent the values and corresponding to the computing/computed value in bits was simply AWESOME. It really did explain a lot.

  • @oscill8ocelot
    @oscill8ocelot 5 років тому +34

    I stopped watching a different video when I saw the notification pop up. :3

    • @oscill8ocelot
      @oscill8ocelot 5 років тому +2

      ♫ Just keep sliding, just keep sliding! ♫

  • @Frisky0563
    @Frisky0563 4 роки тому +1

    I have to saw this is the best explanation ever Ben! I've been struggling understanding the how the shifting registers and XOR Gates interact with one another. I plan to building this experiment

  • @tonybell1597
    @tonybell1597 5 років тому +3

    Excellent work Ben, really wish these vids were available when I was learning computing.... keep up the great work...

  • @dugmeister65
    @dugmeister65 2 роки тому

    Thanks for this great series. The maths were explained so well and so clearly that I understood straight away. I wish all uni teachers had similar skills!

  • @skilz8098
    @skilz8098 5 років тому

    Your videos never fail to impress. Hopefully one of these days when I have the cash flow, I'm planning on purchases your full 8-bit CPU kit. I'd love to try my hand at building it!

  • @junuhunuproductions
    @junuhunuproductions 5 років тому +1

    Your explanations are so clear & effective. You are a great teacher / communicator!

  • @bharadwaj297
    @bharadwaj297 Рік тому

    I have been working on ethernet for 8 years. And written crc computation functions.. but this is truly amazing.

  • @Lorden1516
    @Lorden1516 3 роки тому +1

    Thank you for your explanation of the columns in CRCCalc! I thought it was a bit off-topic for the video at first, but now I've successfully matched my CRC calculator to that website, now that I understand those columns.
    It's unfortunate that CRCCalc no longer shares their source code..
    Also, I'm surprised that your hardware implementation didn't involve a table..! It's that same simple, infinite-length polynomial division.

  • @tylermelton9997
    @tylermelton9997 Рік тому

    This is the best UA-cam channel I’ve ever seen.

  • @patwicker1358
    @patwicker1358 5 років тому

    Very clearly explained, I like your use of paper cutouts and appreciate your effort to make them.

  • @RobUttley
    @RobUttley 5 років тому

    What a brilliant video. I can't imagine how much effort that took to make. Bravo, really interesting and engaging.

  • @MSI2k
    @MSI2k 5 років тому

    What an awesome video! I can see that it must have taken many many hours to make. Just the wire management on a bread-board alone would have been tedious work. Learned a lot from this. Keep up the incredible work.

  • @marc_frank
    @marc_frank 3 роки тому +1

    you could have also used some transistors to only send clk to the shift registers and only connect the crc output to the tx line
    that way there would be no gap in the transmission, although the transistors might distort the signal a bit

  • @markusbergqvist2829
    @markusbergqvist2829 5 років тому

    Thank you for making complex concepts available to everyone. Just brilliant!

  • @jrfoliveira
    @jrfoliveira 4 роки тому

    Excellent explanation/implementation, so simple and effective. Congratulations Ben.

  • @willofirony
    @willofirony 5 років тому

    Junk Mail says it all.... or rather he doesn't say it .... which is the appropriate response when one is in awe. Oh, I am 68. These videos on parity/CRC have left one seriously considering throwing away the PC and buying a crate load of 7400 chips to construct a circuit for each and every algorithm. Such a change from C++!

  • @andy_lamax
    @andy_lamax 2 роки тому

    I finally found a scenario I can use the word. Mesmerized. I have been mesmerized today

  • @KuraIthys
    @KuraIthys 5 років тому

    So... What you're talking about is pretty similar to how you do integer division on computers that don't have hardware divide/multiply functions.
    Division is harder to understand than multiplication, but it still comes down to repeated application of shifts and subtraction.
    The algorithm for a shift + subtraction version of division looks something like this:
    - Shift the 2nd number (divisor) to the left one bit at a time, until you reach a 1, which means you've shifted far enough.
    - Along the way, count how many shifts you did to get here. (depending on how your hardware handles loops, maybe add one more, maybe not)
    - now loop through as many times as you just counted. Each time you shift the left-hand bit out of the 2nd number (divisor). If it's a 1, you subtract the 1st number (Dividend) from the result, and count up by one (typically you need to store a working value for the result, and working values for both the 1st and 2nd number - unless you can safely use the input values directly for this), if it's a zero, you do nothing.
    - Then you shift the 1st number (Dividend) right by one position, and continue until you've gone through everything.
    - your result, since this is integer division consists of the integer portion, and the remainder. The integer portion is the count of how many subtractions were performed, the remained is your working value.
    I've probably made some kind of logical error here, but since I'm working from memory, I'll leave it alone.
    Hopefully you get the general idea.

  • @pdrg
    @pdrg 5 років тому

    Your videos are always so insightful and beautifully paced and detailed. Genuinely thank you.

  • @SyedRizvii
    @SyedRizvii 5 років тому

    Great stuff there Ben, each second was captivating and kept me thinking with all this grade and money making race a lot of top tier institutes are failing to teach all this. Would love to see an FPGA implementation of this...keep it coming sir!

  • @MrSmokyFly
    @MrSmokyFly 5 років тому

    Damn, your videos on data transmission and error checking have been awesome!

  • @LordHog
    @LordHog 5 років тому

    OMG, YT just suggested this video and I saw all the great content you have. Looks like I will be very busy this weekend.

  • @roberteliassen5020
    @roberteliassen5020 5 років тому +1

    If I remember correct (I might be wrong), you don't have to shift in the 16 zeros at the end making a total of 40 shifts. You could get away with only 24 shifts if you modify the CRC circuit. Don't ask how. :-) I do indeed prefer Bens way as it explains the math perfect.

  • @mikepettengill2706
    @mikepettengill2706 5 років тому

    That was artfully delivered. I have dabbled, ever so slightly in circuit design and Arduino programming and I have never worked with logic circuits though I am familiar with what they are and what they do. I was able to follow your explanation and came away with a new understanding of how voltage drops affect circuit function and how clock signals are used. Thank you.

  • @syl20bou
    @syl20bou 5 років тому

    What an incredible teaching talent you have!

  • @justwoofy7990
    @justwoofy7990 5 років тому +1

    Superb video as always, crystal clear explanation. Thanks Ben.

  • @anpier926
    @anpier926 4 роки тому

    Best explanation of howto CRC i've seen!!!

  • @rogerlundstrom6926
    @rogerlundstrom6926 3 роки тому

    I also like the error-correction possibilities of the two-dimensional parity bit solution.. Though I usually try to make it more square by not doing the horizontal lines just the one byte wide.. Also two way communication is fairly important.. If the receiver detects an error doesn't mean the sender know it has to send again.. so I would kind of make use of BOTH methods.. but I use the crc of the corrected bitstream as the response when all as hbeen transmitted and negotiate a re-transmission if it doesn't fit.. that way the error-correction solutions implemented will not only guess whether it's right, but also be able to make a simple question as to "is this right?", so it only gets re-transmitted if the error-correction failed.

  • @RichardVodden1
    @RichardVodden1 5 років тому +1

    This is an amazing set of videos. I wonder if you'd do a follow up introducing the elimination of the clock line. Perhaps using Manchester coding and cover the timing issues with the xor on the generation side and a suitable clock recovery technique?

    • @IronLotus15
      @IronLotus15 4 роки тому +1

      It's not part of this series, but he does cover Manchester encoding in an earlier networking series of his.

  • @mistervoldemort7540
    @mistervoldemort7540 Рік тому

    This educational content is just out of this world !

  • @Rx7man
    @Rx7man 4 роки тому +3

    5:05 "This X^35 got flipped off"
    Yeah, I've done that many times while doing algebra as well

  • @pramitchaudhury1821
    @pramitchaudhury1821 5 років тому

    Thanks for simplifying the subject so much could never understand CRC concept back in my clg days now I get it all.

  • @jdatdeface
    @jdatdeface 5 років тому +9

    It is a bad idea to use Arduino Pin13 for input, because while bootloader is working Pin13 is OUTPUT and this conflict with XOR output. 1K series resistor after XOR is OK, but better avoid connect Pin13 to any push-pull outputs.

  • @alpaslaneldemir6904
    @alpaslaneldemir6904 5 років тому

    Good to see you back Ben.

  • @edgeeffect
    @edgeeffect 5 років тому +1

    That's cool! I've done OR gates with diode logic but never known how and AND wold be done.... thanks for that.

  • @glenngoodale1709
    @glenngoodale1709 5 років тому +4

    I really enjoyed this video, and you gave some really great tips too! Thank you for your hard work, and keep up the great videos.

  • @user-qf6yt3id3w
    @user-qf6yt3id3w 5 років тому

    This is a great presentation on CRCs.

  • @EdwinNoorlander
    @EdwinNoorlander 5 років тому

    Thanks Ben, your videos are always nice to watch and from a hi quality.

  • @tategeiger5317
    @tategeiger5317 5 років тому +13

    Woohoo! A ben video! I saw the bell and knew my homework was going to have to wait ;)

  • @OpenSourcerers
    @OpenSourcerers 3 роки тому

    I was wanting something to go to sleep to. I thought this (and the precursors to this video) would be interesting but dry enough to put me to sleep. Well, now its 2:10am and I'm frantically searching all my boxes for a second shift register.