Keyboard interface hardware

3 apr. 2021
127 360 Weergaven

Check out for more 6502 goodness
Support these videos on Patreon: or for other ways to support.


Social media:

Special thanks to these supporters for making this video possible:
Aleksey Smolenchuk, Alexander Wendland, Andrew C. Young, Anson VanDoren, Anthanasius, Armin Brauns, Asherah Connor, Ben Cochran, Ben Dyson, Ben Kamens, Ben Williams, Bill Cooksey, Binh Tran, Bouke Groenescheij, Bradley Pirtle, Bradley Stach, Brent Reusing, Brian T Hoover, Bryan Brickman, Bryan Glezerson, Carlos Ambrozak, Christopher Blackmon, Clint Bridges, Dale Andrew Darling, Daniel Jeppsson, Daniel Tang, dans, Dave Burley, Dave Walter, David Brown, David Clark, David Cox, David House, David Sastre Medina, David Turner, David Worsham, Dean Winger, Dissy, dko, Dmitry Guyvoronsky, Dušan Dželebdžić, Dzevad Trumic, Emilio Mendoza, Eric Dynowski, Erik Broeders, Eugene Bulkin, George Foot, George Miroshnykov, Harry McDow, Ian Tait, Ingo Eble, Ivan Sorokin, James Capuder, james schaefer, Jared Dziedzic, Jason DeStefano, Jason Specland, JavaXP, Jaxon Ketterman, Jay Binks, Jayne Gabriele, Jeremy A., Jim Kelly, Jim Knowler, Jim Van Meggelen, Joe Beda, Joe OConnor, Joe Pregracke, Joel Miller, John Fenwick, John Meade, Jon Dugan, Joseph Portaro, Joshua King, Jurģis Brigmanis, Kai Wells, Kefen, Kenneth Christensen, Kent Collins, Kitick, Koreo, Lambda GPU Workstations, Larry, László Bácsi, Lucky Resistor, Lukasz Pacholik, Marcos Fujisawa, Marcus Classon, Martin Roth, Mats Fredriksson, Matt Krueger, Matthäus Pawelczyk, melvin2001, Michael Tedder, Michael Timbrook, Michael Weitman, Miguel Ríos, mikebad, Mikel Lindsaar, Miles Macchiaroli, moi n, Nicholas Counts, Nicholas Moresco, Nick, Örn Arnarson, Paul Pluzhnikov, Paul Randal, Pete Dietl, Phil Dennis, Philip Hofstetter, Phillip Glau, PixelSergey, ProgrammerDor, Randal Masutani, Randy True, raoulvp, Renaldas Zioma, Ric King, Rob Bruno, Robert Comyn, Robert Diaz, Roland Bobek, sam raza, Scott Holmes, Sergey Kruk, SonOfSofaman, Stefan Nesinger, Stefanus Du Toit, Stephen, Stephen Riley, Stephen Smithstone, Steve Jones, Tayler Porter, TheWebMachine, Tom, Tyler Latham, Vincent Bernat, Vladimir Solomatin, Walter Montalvo, Warren Miller, Wraithan McCarroll, xisente, Yee Lam Wan

  • Will this videos end with the 6502OS?

    Daniel Martinez BonillaDaniel Martinez Bonilla9 uur geleden
  • Thank u man u are an engineering genius...pls keep the videos on youtube...don't remove them🙏🙏👍

    Fenix StormFenix Storm2 dagen geleden
  • We got a GPU, RAM, CPU, Keyboard, Screen, "Mainboard" damn im seeing NVIDIAs worst fear appear

    Fr1dayFr1day3 dagen geleden
  • No matter how complex the systems become. The excitement of knowing the basics will never get away. Thanks for all your videos!

    Martin MendezMartin Mendez4 dagen geleden
  • Hey Ben, can you make a video on EMI /EMC testing of Automobile devices?

    Asresh KurichetiAsresh Kuricheti4 dagen geleden
  • fun fact: commodore 64 uses a 6502

    tcrtylertcrtyler4 dagen geleden
  • Cool! Cant wait for the next video

    Corbin RayCorbin Ray4 dagen geleden
  • Thanks I will never use a keyboard again. It hurt my eyes

    LoiQLoiQ4 dagen geleden
  • Let's see now. Output - Check Keyboard - Check Data Storage - Missing Would be nice if the next project is a SPI interface to drive a SDCARD for data storage.

    John CochranJohn Cochran5 dagen geleden
  • Please make a video in 16 bit microprocessor

    Rinku MajiRinku Maji5 dagen geleden
  • Thank you Ben for all your videos

    Manny SinghManny Singh6 dagen geleden
  • Are there any keyboard interface ic and display interface ic available in market??? Like LCD driver IC you already used...

    Sagar BhaleraoSagar Bhalerao6 dagen geleden
  • this man is going to do something big, but only taking small steps he already made a bad 6502 pc he already made a bad video card AND NOW HE MAKES A WORKING KEYBOARD SYSTEM??

    FrostieFrostie6 dagen geleden
  • Calling it now, shift register to receive the data and it interrupts on the stop bit to read it.

    AIO inc.AIO inc.7 dagen geleden
  • how many bens have you eaten

    Alguien De InternetAlguien De Internet7 dagen geleden
  • Having the 522's interrupt and the latch enable trigger from the same line seems like a risky data hazard.

    iwantagoodnamepleaseiwantagoodnameplease7 dagen geleden
  • I love this, but could you make a RPN programmable scientific calculator kit/tutorial? HP 35s is just too expensive

    Štefan RástockýŠtefan Rástocký7 dagen geleden
  • I wouldn't be surprised if this series will be how to program an OS from scratch in the future

    Alsen 99Alsen 998 dagen geleden
  • Hey, do you think you could show us how to make an EGA-to-Composite adapter? I want to be able to run DOS tech demos and DOS games using CGA graphics on EGA hardware without losing the ability for them to exploit NTSC artifact compression and create additional colors. Also, the only EGA cards with Composite video output will only produce Monochrome over composite :/

    Amaroq StarwindAmaroq Starwind9 dagen geleden
  • I love how whenever Ben runs into something unexpected, he figures out the issue in a really seamless manner, doesn't stumble in his explanations, just keeps recording. I also loved his explanation of how a Schmitt Trigger works.

    Kat the FoxtaurKat the Foxtaur9 dagen geleden
  • Can't wait until we implement GEOS on a 8x8 LED matrix

    stupossibleifystupossibleify10 dagen geleden
  • Thank you ☺️

    Ajay PanchalAjay Panchal10 dagen geleden
  • my bad when I first read your channel name I thought it said bean eater

    PuffelPuffel10 dagen geleden
  • He touches my ego😈

    Mr. ADHILMr. ADHIL10 dagen geleden
  • Wow, so cool

    Sans UndertaleSans Undertale11 dagen geleden
  • Bro you need to make your own computer from scrach

    ??????????11 dagen geleden
  • Extremely low level😍

    Onur KARAKAYAOnur KARAKAYA11 dagen geleden
  • Nice, I didn't understand a thing

    Alejandro NavaAlejandro Nava11 dagen geleden
  • When Ben is done with this computer I nominate it to be named "Apple Eater"

    ijoshuadockeryijoshuadockery11 dagen geleden
  • This is awesome stuff. I am thinking about either the 6502 or 8 bit. What's the main difference in both kits? Also, if I wanted to by a few extra logic IC chips, where do you normally go to buy them?

    John RossoJohn Rosso11 dagen geleden
  • I comment for the algorithm

    snapysnoopsnapysnoop12 dagen geleden
  • Up next: Build your own RTX 3070 graphics card, faster than Nvidia sending you one.

    MilesMiles12 dagen geleden
  • I am very much interested in learning assembly language. Can you make a complete series on assembly language.

    Tech OdishaTech Odisha12 dagen geleden
  • You're one of the amazing guy who teach how actually working inside the computer❤

    Sanjaya AnuradhaSanjaya Anuradha12 dagen geleden
  • i need this keyboard

    Muhammad FaheemMuhammad Faheem12 dagen geleden
  • Hello Sir , I have quick question that is why power is always 5 V, why not 5.5 V or 4.5 V or 6, 7, 8, 9 V etc. ?

    Sabihul HafizSabihul Hafiz13 dagen geleden
  • Hey so we can make a 32 bit conputer with gpu on bread board or a commercial pc if we convert it into pcb ???

    AceAce13 dagen geleden
  • Big noob here, can't you have a capacitor in the output of the 1st inverter to mitigate the bouncing (with a fast charge and little bit slower discharge) ?

    antoine lievreantoine lievre13 dagen geleden
  • In the future he is gonna hook up this keyboard, his graphics card, make operating system and have fully functional everyday-use computer ;)

    Wędrowiec PawełWędrowiec Paweł13 dagen geleden
  • Digital circuits don't like analogue signals. Best use the 74HC14 Hex Schmitt inverter. Same footprint but it will properly amplify the input and clean it up. OOps Jumped the gun there, knew you would cover that. Could probably shorten the RC delay now you have better defined cut off threshold for logic levels.

    Peter DawesPeter Dawes13 dagen geleden
  • WOW. Your videos are great, every single film are very interesting.

    Adam GrzybowskiAdam Grzybowski13 dagen geleden
  • Awesome! Great video! very useful

    Ken LottsKen Lotts13 dagen geleden
  • What do the other two voltage values mean for the inverter spec (16:48) ? Ben was always picking the middle one (for example 3.15V as the minimum HIGH Level input voltage) but the box also lists 1.5 and 4.2.

    bnvdarklordbnvdarklord13 dagen geleden
  • Omg I finally understand what a peak rectifier is. Thanks Ben!

    Jameson401Jameson40113 dagen geleden
  • As a programmer I just kind of accept that the hardware is magic even after watching these videos

    Falxie_Falxie_14 dagen geleden
  • Ben is on track to teach the world how to build a Commander x16 before they actually release one! Love both projects. But love this detail!

    Chris GreenoughChris Greenough14 dagen geleden
  • I admire you sir, please recommend some books to learn about it.

    Khushvir CheemaKhushvir Cheema14 dagen geleden
  • Great video. It would have been a good opportunity to discover the Shift Register feature of the 6522 VIA.

    Alexandre DumontAlexandre Dumont14 dagen geleden
  • Super video! I applauded for NZ$5.00 👏👏

    Clark MillsClark Mills14 dagen geleden
  • Hey Ben Eater, when you finish the project, try to join the worst video card with the computer, with keyboard control making sure that, for the worst video card you do the pcb, for the motherboard you put the control for the keyboard, and as a final touch try to make support for the cpu, so that you make the first pc created by home and free programming by other users to improve either performance or functionality or try to make a nice pc where you can start some game, and make it also become an office PC for small upgrades that have been introduced by YOU and other USERS. Thank you for reading me.

    Snap DragonSnap Dragon14 dagen geleden
  • I've read previously that the IBM Model M uses a slightly non-standard signal that isn't quite the same as other PS/2 keyboards - is that true and do you have any insight into how/why?

    rebmcrrebmcr14 dagen geleden
  • I wonder if he's going eventually program the kernel.

    João MartinsJoão Martins14 dagen geleden
  • great video. thanks a thousand times for putting your time and effort in this project. you have been a great inspiration source to me. I wish you would make a video about memory banking and methods to address memory space larger than 64KB with 16bit address BUS. I have some ideas, which might sound stupid, like splitting a long address into 2 parts of 16its and sending the higher order address followed by the lower order address to a some sort of logic circuit with some counters that keeps track of the larger address since 6502 can only count to 64KB, instead this decoder of some sort or the memory address manager circuit will be able to access say a 128KB, 512KB.. memory using it's larger address bus, say 24bit or more. Or maybe a logic to do bank switching. It would be a really interesting challenge.

    ilgaarilgaar14 dagen geleden
  • Did you switch the LCD screen to 4-bit mode in order to free some ports on the interface adapter? By the way, this series of videos is really great, basically all of what I know now about digital electronics and the passion that has risen in me about it came from here, and I am pretty sure other sources wouldn't have been capable of doing it. Keep doing the work you are doing because it really is the best out there. Right now I'm tackling a little project wich involves reprogramming a flashlight and in semptember I'm gonna start a bachelor in mechanical engineering with focus on electronics and programming, all because of you!

    Tommaso MorandiniTommaso Morandini14 dagen geleden
  • Why no 555?

    Colin AlstonColin Alston14 dagen geleden
  • "Keyboard interface hardware" ?!? Pft. ... by Ben Eater ??!!! Hold my databus.

    Mattias W.Mattias W.14 dagen geleden
  • 26:56: Ahhh, the HP-15C - what a beauty!

    Michael JørgensenMichael Jørgensen14 dagen geleden
  • Excellent video as always Mr Eater. You are a gift to youtube

    Blake ScherschelBlake Scherschel15 dagen geleden
  • The effort you put into explaining is greatly appreciated.

    Ean EricksonEan Erickson15 dagen geleden
  • all of the "things that go wrong" and the process to fix them are my favorite parts of these videos. they would be so much less useful if you just built it perfectly from the get-go

    ridespiralsridespirals15 dagen geleden
  • Super video! I applauded for CA$2.00 👏

    glenn allanglenn allan15 dagen geleden
  • Hi, I made this video using the serial communication between the PS / 2 keyboard and a Z80 microprocessor. Very similar to the 6502, but I used a device for serial communication. I am very curious to see how you will convert from ps/2 to ascii. I did it using the keyboard value to address a table with the ascii data. I love your video, congratulations on the video

    Leonardo PJLeonardo PJ15 dagen geleden
  • I'm reliving my teens as a 1980s era computer geek.

    GnudarveGnudarve15 dagen geleden
  • increments sak

    JAG 0937 EBJAG 0937 EB15 dagen geleden
  • Ben, You Rock.

    Analog DudeAnalog Dude15 dagen geleden
  • ben your equivalent of measuring start stop with the capacitor is like using a pulse extender in minecraft lmfao

    a persona person15 dagen geleden
  • "Hmm, could use a diode to shape that charge / discharge curve, but that seems dumb so I bet he got a better solution in mind" -> Ben adds a diode. "Oh."

    MythriciaMythricia15 dagen geleden
  • Lots of students searching for answers that are missing in school. What's wrong with these teachers.

    robert mccullyrobert mccully15 dagen geleden
  • great idea to use Schmitt inverter to clean up the decaying RC voltage!

    LukeLuke15 dagen geleden
  • This series is right on time for me. I'm about to build an SYM-1 from a new old stock (43 years old!) unused motherboard in the next few months (It's a variant, but it's from Synertek; I believe it's the SM-100 OEM line motherboard). It's 6502 based. I want to build the original KTM2 and/or KTM3 modules for it at some point, but they are much more complicated and pricey to make. I'm looking at possibly modding the KTM design with my own more modern KB interface so I don't have to build my own keyboard, and/or making a simpler KB interface direct to the machine.

    Brianna SchumanBrianna Schuman15 dagen geleden
  • You can take a Monoflop instead of the Inverter to solve the problem

    Viktor HugoViktor Hugo15 dagen geleden
  • Idea for the 6502 project: remove that LCD display and make it compatible with the world’s worst graphics card and viola a fully functional computer

    Elyas gamingElyas gaming15 dagen geleden
    • Didnt he do that in another video?

      PerkyElixir22 YTPerkyElixir22 YT15 dagen geleden
  • I just need another brain to understand your knowledge.

    Sam J. PaulSam J. Paul15 dagen geleden
  • 👍

    Elektronik AtölyemElektronik Atölyem15 dagen geleden
  • That's an interesting approach! I thought about using XORs to calculate parity, then use ANDs to check if the start/stop/parity/my parity combo is correct. That output would be the interrupt trigger. It consumes more hardware, but it is "safer" and easier for the software, since it filters noise and corrupted inputs.

    emcostaemcosta15 dagen geleden
  • Real Life Shenzhen i/o!!

    Michael MaldonadoMichael Maldonado15 dagen geleden
  • Finally. A decent implementation of the ps/2 interface hardware for 8-bit computer. Thanks for video

    Владимир ТатуновВладимир Татунов15 dagen geleden
  • and here i am .... still stuck on the ram implementation. cant figure out why that made it not working anymore. cant have bought 2 defective ram modules...

    DarthZackTheFirstDarthZackTheFirst16 dagen geleden
    • Consider posting on People may be able to help you there if you describe your issue

      Dimitris KaragiannisDimitris Karagiannis15 dagen geleden
  • Is there a link to the previous video building the shift registers that is referenced in this video?

    Paul Anthony VildPaul Anthony Vild16 dagen geleden
    • This is really part 2. Here's part 1:

      BrightBlueJimBrightBlueJim16 dagen geleden
  • Are there any videos explaining easily how some chips do what they do?

    Gabriel PetreGabriel Petre16 dagen geleden
  • Super video! I applauded for $10.00 👏👏👏

    Papa PigsPapa Pigs16 dagen geleden
  • I am soaking this up. What a great installment of a truly great series.

    Alan CanonAlan Canon16 dagen geleden
  • By the time graphics cards are available again, Ben's computer runs Crysis.

    Tommy 'TomTom' TomestiniTommy 'TomTom' Tomestini16 dagen geleden
  • I hate to speculate but I feel like this is going the way of a game of snake using the videocard

    Giorgio ElgarGiorgio Elgar16 dagen geleden
    • @BrightBlueJim Oh yeah I know, mitxela is one of my favorite channels

      Giorgio ElgarGiorgio Elgar15 dagen geleden
    • Oh! You need to look at this, then: This is a game machine based on the Atmel ATmega128 that outputs to an oscilloscope. It plays Pacman, Tetris, Snake, Lunar Lander, and Mario Brothers, each of which was a weekend project.

      BrightBlueJimBrightBlueJim16 dagen geleden
  • Have you managed to accidentally enable extended memory through your keyboard controller?

    Kartik Cating-SubramanianKartik Cating-Subramanian16 dagen geleden
    • Are you referring to the a20 line? I think that joke is perhaps rather specific to people to are interested in x86 operating system or bootloader development

      Emil FriðrikssonEmil Friðriksson16 dagen geleden
  • Finally i understand RC timers! Thanks.

    Karl MKarl M16 dagen geleden
  • You should provide a course for beginners. How to use a breadboard, basic electronics, etc type of thing to go along with these more advanced sessions.

    Collected ReaderCollected Reader16 dagen geleden
  • So in theory with the right rom code you can use this thing to run basic like one of those early 80s portable computers that run on batteries and had a similar display

    piecaruso97piecaruso9716 dagen geleden
    • @BrightBlueJim I remember there was a small Tandy portable computer that had a display similar to the one used here by Ben and that run on batteries, add maybe a cassette interface and basic support and Ben’s machine has similar capabilities basically. I know about the chips but I couldn’t not think about how close this machine is to one of those 80s machines

      piecaruso97piecaruso9715 dagen geleden
    • Not exactly - you need a lot more than a CPU and a ROM to make an early 80s computer. But that's pretty much what Ben is describing, one chip at a time. This particular project is one of several using the 6522 "Versatile Interface Adapter" chip, which was a chip designed specifically to simplify building a system with the 6500 series CPUs. Watch Ben's series on the 6502, which goes into great detail about how to make a full personal computer of the early 80s kind. So far he hasn't gone into such things as operating systems or standalone BASIC systems that don't need an OS, but I expect those will be coming along.

      BrightBlueJimBrightBlueJim16 dagen geleden
  • Ben's projects bring me back 35yrs to when I first started in engineering. Love how the simple, RC/Schmitt-trigger solution fits with the spirit of the projects. Have a slight suggestion for a more "professional" solution. Use a 74LS393 dual counter to make a 7-bit counter clocked off the 1Mhz. Tie the inverted keyboard clock to the CLEAR line. The counter will be reset every 43us by the keyboard clock, and held in reset for 43us. Use the 6th bit of the counter to make a 32us pulse, beginning 64us after the last keyboard clock for the interrupt pulse. Then use the 7th bit (inverted) with an AND gate on the 1Mhz clock to stop the counter, until reset by the next keyboard clock. Again NOTHING against Ben's solution, just offering a different perspective, in the same vein of "teaching". peace out!

    Ron BasqueRon Basque16 dagen geleden
    • I’m sorry it honestly was not my intention to be insulting. And I guess you’re correct professional may have been a poor choice of words. Just thought others would be interested in a digital alternate.

      Ron BasqueRon Basque15 dagen geleden
    • This is not more professional. To be clear, the objective of engineering is to get the desired task done reliably, with the minimum cost required. If you were designing this within a custom chip, where you don't have the option of producing delays by using resistors and capacitors, and where you would likely have a clock input, this might be a valid approach, but for a low cost solution, it is overkill. And sure, there are always alternative ways to do things that present different tradeoffs, but calling your approach "more professional" is a bit insulting, I think.

      BrightBlueJimBrightBlueJim16 dagen geleden
  • Great video... although I was yelling "Schmitt Trigger" repeatedly from the back of the class room... sorry about that..... really looking forward to seeing the software.

    edgeeffectedgeeffect16 dagen geleden
  • Ben, I'd like to tell you that your content is very inspiring and i have the Idea of crating similar content on youtube in Arabic for college students :)

    Ehab AhmedEhab Ahmed16 dagen geleden
  • I need that resistor board, wow!

    My 3D printed lifeMy 3D printed life16 dagen geleden
  • Ben Eater 2025: Building a Computer that runs Minecraft using breadboards

    1997CWR1997CWR16 dagen geleden
    • It could happen!

      BrightBlueJimBrightBlueJim16 dagen geleden
  • Finally an explanation of Schmitt triggers I understand!

    nullplan01nullplan0116 dagen geleden
  • Super interesting! Thanks.

    FrikFrik16 dagen geleden
  • encouraging

    Nicholas KinneyNicholas Kinney16 dagen geleden
  • What's going on with your SNR here? You have 5V signals and have like 1 Vpp of noise on the oscilloscope. That's a ton of noise.

    ChrisChris16 dagen geleden
  • I'm sitting here yelling "no, use a 7414 instead of a 7404" and then I remember Ben's teaching style. Then I sit back and watch for the object lesson. OMG, I wish I had a teacher like Ben many years ago. These videos stand out as some of the finest teaching I've ever seen.

    Pixel SchnitzelPixel Schnitzel16 dagen geleden
  • Eureka. I now understand the symbol for a Schmitt Trigger.

    Julian NichollsJulian Nicholls16 dagen geleden
  • Suggestion, make it so the interface will only trigger an interrupt for the cpu on key press/release and not on key held.

    Gideon Max MerlingGideon Max Merling16 dagen geleden
    • @BrightBlueJim I know, he could add another micro controller that does that

      Gideon Max MerlingGideon Max Merling16 dagen geleden
    • That's quite a bit more complicated, and WAY easier to implement in software than hardware, because in order to detect the difference between an initial press of a key from an automatically repeated key, you have to know whether you have already received a key down code without a corresponding key up code. Or to put it another way, you have to know the current state of the whole keyboard, which is a lot of bits.

      BrightBlueJimBrightBlueJim16 dagen geleden