The RS-232 protocol

This video explores the electrical and timing characteristics of the RS-232 protocol.
Support these videos on Patreon: / beneater or eater.net/support for other ways to support.
------------------
Social media:
Website: www.eater.net
Twitter: / ben_eater
Patreon: / beneater
Reddit: / beneater
Special thanks to these supporters for making this video possible:
Adrien Friggeri, Aleksey Smolenchuk, Alex, Alex Black, Andrew Van Gerpen, anula, Ben, Ben Cochran, Ben Kamens, Ben Williams, Bill Cooksey, Binh Tran, Bradley Stach, Burt Humburg, Carl Fooks, Carsten Schwender, Chai, Chaitanya Bhatt, Chris Lajoie, Chris Sachs, criis, Daniel Jeppsson, Daniel Pink, Daniel Tang, Dave Burley, Dave Walter, David Clark, David Cox, David Dawkins, David House, David Sastre Medina, David Turner, Dean Bevan, Dean Winger, Deep Kalra, Dennis Schubert, Dilip Gowda, Dušan Dželebdžić, Dustin Campbell, Dzevad Trumic, Emilio Mendoza, Eric Dynowski, Erik Broeders, Erik Granlund, Ethan Sifferman, Eugene Bulkin, Evan Thayer, Eveli László, Florian Rian, fxshlein, George Miroshnykov, ghostdunk, GusGold, Humberto Bruni, Ingo Eble, Isaac Parker, Jacob Ford, James Capuder, Jared Dziedzic, Jason DeStefano, Jason Dew, JavaXP, Jaxon Ketterman, jemmons, Jeremy, Jeremy Cole, Jesse Miller, Jim Kelly, Jim Knowler, Joe Beda, Joe Pregracke, Joe Rork, Joel Miller, John Hamberger jn., John Meade, John Phelan, Jon Dugan, Jonn Miller, Joseph Portaro, Jurģis Brigmanis, Justin Graziani, Kai Wells, Kefen, Kenneth Christensen, Kyle Kellogg, Lambda GPU Workstations, Larry, László Bácsi, Leo K, Lukasz Pacholik, Marcos Fujisawa, Marcus Classon, Mark Day, Martin Noble, Mats Fredriksson, Matthäus Pawelczyk, melvin2001, MICHAEL SLASS, Michael Tedder, Michael Timbrook, Michael Weitman, Miguel Ríos, mikebad, Mikel Lindsaar, Miles Macchiaroli, Muqeet Mujahid, Nate Welch, Nicholas Counts, Nicholas Moresco, Nick Chapman, Oli Homer, Ori Shamir, Örn Arnarson, Paul Heller, Paul Pluzhnikov, Phil Dennis, Philip Hofstetter, Porus, ProgrammerDor, Ralph Irons, Randal Masutani, Randy True, raoulvp, real_huitz, ReJ aka Renaldas Zioma, Ric King, Rick Hennigan, Robert Diaz, Robey Pointer, Sagnik Bhattacharya, Scott Gorlick, Scott Holmes, Sean Patrick O’Brien, Sergey Kruk, solderspot, SonOfSofaman, Spencer Ruport, Splashtwist, Stefan Nesinger, Stefanus Du Toit, Stephen Kovalcik, Stephen Riley, Steve Jones, TheWebMachine, Thomas Eriksen, Tim Oriol, Tim Walkowski, Tim Wheeler, Tom, Tom Knowles, Tyler Latham, Vincent Bernat, Walter Montalvo, Warren Miller, Wim Coekaerts, Wraithan McCarroll, xisente, Yee Lam Wan

Пікірлер: 1 400

  • @paradox9551
    @paradox9551 Жыл бұрын

    I'm so glad the Bob Ross of Computer Engineering is back.

  • @marred2277

    @marred2277

    Жыл бұрын

    Perfect description

  • @markgreco1962

    @markgreco1962

    Жыл бұрын

    Second that

  • @wmjowls

    @wmjowls

    Жыл бұрын

    It’s taken this long because he’s been uploading the video with a serial port, one byte at a time

  • @grillpig3860

    @grillpig3860

    Жыл бұрын

    Same. :D

  • @DW-indeed

    @DW-indeed

    Жыл бұрын

    "there's nothing wrong with having a port as a friend" ...officer.

  • @tiesetsomatsipa5402
    @tiesetsomatsipa5402 Жыл бұрын

    Thank you for coming back sir, it really means a lot for us your viewers. 🙏

  • @lucasrem

    @lucasrem

    Жыл бұрын

    RS 232, nobody needs crap, old people understand it, noobs need it too ?????

  • @NobodyYouKnow98

    @NobodyYouKnow98

    Жыл бұрын

    @@lucasrem Rest assured, people like you don't need RS232. Go back to Minecraft.

  • @Hugh_I

    @Hugh_I

    Жыл бұрын

    @@lucasrem Well I doubt your assertion that young people don't understand RS 232. Probably some just learned about it by watching this video. And luckily so, because "nobody needs crap" is just wrong. RS-232 is still widely in use. For example for serial consoles in servers or appliances, or just hobbyists toying with microcontrollers. But if you prefer to not know anything, nobody forced you to watch this video.

  • @DavesGarage
    @DavesGarage Жыл бұрын

    I just wrote a bunch of 6502 serial code for our "C64 Spectrum Analyzer" video and I still learned stuff from this :-)

  • @TR3A

    @TR3A

    Жыл бұрын

    Dave, your videos are great. Really nice to see you watching and appreciating Ben’s videos.

  • @bardofhighrenown
    @bardofhighrenown Жыл бұрын

    Leaving in the bit with the error made this video so much more interesting rather than skipping over it and doing it all correctly, I feel like I learned a lot more about how the system functions than if it had be a straight shot to it functioning properly

  • @Ed_Stuckey
    @Ed_Stuckey Жыл бұрын

    As a former employee of Teletype Corporation, the description of the signal (mark, space, start, stop, bits, etc.) brought a smile.

  • @rty1955

    @rty1955

    Жыл бұрын

    Agreed. Peoole forget that it was a synchronous motor with a wiper that would engage a clutch to make the wiper rotate around a plate with pads on it. The start bit would engage the clutch and begin the rotor spinning that was in sync with the line voltage. Each bit would land on a pad and either current or no current on a 20ma current loop line (remember those days?) The stop bit would release the clutch and the char. Would be printed. Ever wonder why you HAD to send a carriage return BEFORE the line feed character? Its because the print drum would be traveling back to the beginning of the line WHILE the platen advanced with the LF character which would arrive DURING the CR. I still have a ASR-33 with repair manuals & spare parts. Amazing mechanical device!!

  • @rogervanbommel1086

    @rogervanbommel1086

    Жыл бұрын

    I also recognize them, because I use RTTY a lot(RadioTeleTypE)

  • @michaeldavison9808

    @michaeldavison9808

    Жыл бұрын

    Mark, space, start and stop, parity ..... the days when my 1983 Computer Science degree meant more than just 'software engineering'.

  • @rty1955

    @rty1955

    Жыл бұрын

    @@michaeldavison9808 back in 1983 I was doing lots of RS232, SLDC, BISYNC. I still have my breakout boxes and protocol analyzers. That came in handy for BISYNC & SDLC

  • @jslcom

    @jslcom

    Жыл бұрын

    My first job (late 70's) was at a company that sold printers based on the Teletype Model 40. My first experience with RS-232 was with the EIA/current loop interface on the Model 40. Teletype built great hardware.

  • @zorinlynx
    @zorinlynx Жыл бұрын

    Seriously, I've been using RS232 my entire life and I figure I knew more or less how it worked, but your video just raised my understanding of it to a whole new level. Thank you for this.

  • @haraberu

    @haraberu

    Жыл бұрын

    It's amazing. Even on microcontrollers, we've gotten used to writing UART.init(9600, 8, None, 1) and having the hardware take care of the timing. How does it work? It works just fine, thanks for asking.

  • @iancrone2906

    @iancrone2906

    Жыл бұрын

    Can't think of a good reply, something about protogens?

  • @phyphor

    @phyphor

    Жыл бұрын

    I've always known "9600, eight, none, one" as the mantra to make things work without knowing *what* each thing was for so I, too, have enjoyed this video.

  • @davidconner-shover51

    @davidconner-shover51

    Жыл бұрын

    @@phyphor these days, 115200 is pretty common, though not absolute 9600 always seemed to run in that happy, Bob Ross range, from really old dayz when the processors couldn't handle it, quite, to the modern times, 96-- doesn't seem to want to die

  • @KurtisRader

    @KurtisRader

    Жыл бұрын

    Same here. I'm a grey beard who started programming in 1976 (more than four decades ago) and one of my first college classes was programming a Motorola 6800 computer in assembly language much like this series of videos. I'm fairly certain I had to write similar code for that course but thank dog those days are long past.

  • @IceMetalPunk
    @IceMetalPunk Жыл бұрын

    You're alive! I'm so happy, not only that you're alive, but that you're continuing this series. It's one of the best computer science series on KZread, and I come away from each video both more educated and more fascinated than I started. Thank you, Ben, for all you do! Seeing you do all the summation to create a delay makes me glad for higher-level modern functions like usleep() 😁

  • @ZeroPlayerGame

    @ZeroPlayerGame

    Жыл бұрын

    I think the I/O interface he uses actually has programmable timers, it's just easier for such a small example to make a little loop. In a more real application, you'd probably set up proper interrupts so you can do other stuff while the data is coming in.

  • @xboxbrocko

    @xboxbrocko

    Жыл бұрын

    im also glad hes alive

  • @TS6815

    @TS6815

    Жыл бұрын

    seeing the 'funny meme username' from that years-old Computerphile AI generated comments video in the replies here gives me a warm fuzzy feeling .. this little community of tech-y people is a bit smaller than I thought

  • @IceMetalPunk

    @IceMetalPunk

    Жыл бұрын

    @@TS6815 The world is a small place when we can all share ideas with each other :)

  • @debbiebernhardt5406

    @debbiebernhardt5406

    Жыл бұрын

    The serial port/parallel port was used for cars obd 2 for programming/complex Dtc record check for cars

  • @shabybarel7666
    @shabybarel7666 Жыл бұрын

    Ben is one of the best teachers i have ever seen on the topics of computer and hardware engineering. He always starts by explaining fundamentals at the perfect pace and builds the complexity step by step. I have both BSc and MSc EE degrees and i still wait for his videos to learn something new every time. Ben, you deserve to lead your own hardware engineering lab in one of the top universities. Keep making more fantastic content, people are waiting for this.

  • @lucasrem

    @lucasrem

    Жыл бұрын

    Shaby Barel therapy you need? understand bidirectional serial communication ? Webb, who need to understand it here, or is this just nerdy entertainment ? To lazy to be willing to understand it, eyeballing and wonder.....

  • @EmersonCapuano

    @EmersonCapuano

    Жыл бұрын

    I agree.

  • @berntolovhellstrom8891

    @berntolovhellstrom8891

    Жыл бұрын

    @@lucasrem I wonder who needs therapy? Why are you watching and derogatory commenting things yourself are "fully" understanding? It it just to drop BS comments because you got 63 subscribers and Ben got 1 Million? Ben brings an extraordinary educational value to the whole world - Do you?

  • @Wazzaps
    @Wazzaps Жыл бұрын

    Welcome back!

  • @briankimathi5033

    @briankimathi5033

    Жыл бұрын

    Wait, this video was uploaded 5 minutes back. How did you comment on it 2 hours prior??

  • @NoobHuman

    @NoobHuman

    Жыл бұрын

    @@briankimathi5033 prob patreon

  • @mashrien
    @mashrien Жыл бұрын

    Holy crap. I thought the rona got him. Glad to know you're still alive man. Thank you for coming back and uploading the content we all love- My kit's been sitting on the shelf gathering dust ; ;

  • @kmonyt
    @kmonyt Жыл бұрын

    While admittedly less used on consumer grade equipment, the full 25 pin connector was certainly popular for network equipment in the 1990s and 2000s. Routers w synchronous serial connections would come off as DB25, and connect to CSU/DSUs that would then connect to 64K or T1 circuits to go over a WAN. Often to a remote office or ISP. The flow control signals aren't optional or unused, quite the contrary, they were essential to a proper setup. Console ports are much simpler, but the full interface was used regularly for certain applications.

  • @benjaminkeebler4218

    @benjaminkeebler4218

    Жыл бұрын

    This brings back memories of conference calls with network vendor support while on-site with a telco rep, trying to figure out why the *insert nsfw-language here* circuit wouldn't come up.

  • @chrishartley1210

    @chrishartley1210

    Жыл бұрын

    And well before the 1990's too. Clock speeds in the 70's were not sufficiently reliable to allow asynchronous transmission at anything above about 300 bits/s (and 75 bits/s reverse). That was enough for a teletype console and keyboard since that was considered faster than the teletype could print or anyone could type, but for serious communication speeds synchronous comms was a requirement. I never saw any equipment that used the secondary channels though.

  • @devMashcom

    @devMashcom

    Жыл бұрын

    All my 80's retro gear uses 25 pin connectors too. I never really saw 9 pin connectors on anything except joysticks before the 90's!

  • @loudej

    @loudej

    Жыл бұрын

    @@chrishartley1210 fascinating! I've never heard of slower than 300 baud before, but esp if flow control was optional on those devices it would make sense. At 7-10 characters per second were those teletype physical printers?

  • @chrishartley1210

    @chrishartley1210

    Жыл бұрын

    @@loudej There were a lot of different styles of teleprinter, Teletype was probably the most successful and was a division of AT&T. 10cps was typical so they were slow and quite noisy, but they were a fraction of the cost of the early video terminals. I remember using one of the early graphics terminals (a Tektronix 4010 if I remember correctly) around 1974. The university only had one, it probably cost a small fortune but paper costs for the Teletype 33 terminals would not have been insignificant.

  • @bDub779
    @bDub779 Жыл бұрын

    Never knew RS stood for recommended standard. Those little knowledge nuggets just add value to these videos. Thanks!

  • @BlackHoleForge
    @BlackHoleForge Жыл бұрын

    I can't believe I went my whole life without realizing that RS stood for recommended standard.

  • @ohasis8331

    @ohasis8331

    Жыл бұрын

    You're not Robinson Crusoe.

  • @BlackHoleForge

    @BlackHoleForge

    Жыл бұрын

    @@ohasis8331 I don't know what that means, but we used to make up random words for those standards when we were kids. And the sillier the better. My favorite one was RS 232 which I thought stood for robot servicing. I even went to school later for networking, and that never came up.

  • @ohasis8331

    @ohasis8331

    Жыл бұрын

    @@BlackHoleForge Robinson Crusoe from classic literature, lost on a deserted island, means all on your own, by yourself, the only one etc. though from ancient memory, he may have had a manservant at some time. Or maybe I am mixing stories but you should get the drift :)

  • @mariojoia1337

    @mariojoia1337

    Жыл бұрын

    "The best time to learn something was 10 years ago, the next best time is now." I remember hearing this somewhere, but can't remember where.

  • @jgharston

    @jgharston

    Жыл бұрын

    We have RS Components in the UK, and initially thought is must have been something related to them.

  • @luqdude
    @luqdude Жыл бұрын

    The production quality of these vids is amazing, glad that you're back

  • @lucasrem

    @lucasrem

    Жыл бұрын

    just a home job, web cam, final cut skills ! your channel ? play games ...? need quality channel, stop playing !!!!

  • @luqdude

    @luqdude

    Жыл бұрын

    @@lucasrem huh?

  • @vyking1972
    @vyking19725 ай бұрын

    That ignited my neurons. Thank you for your wonderful presentation.

  • @lynch-mob
    @lynch-mob Жыл бұрын

    We've missed you Ben! Glad to have you back!

  • @marcel151

    @marcel151

    Жыл бұрын

    The Spambots are also back. 😅

  • @lynch-mob

    @lynch-mob

    Жыл бұрын

    @@marcel151 Of course - it wouldn't be KZread without SpamBots!

  • @ohasis8331

    @ohasis8331

    Жыл бұрын

    @@marcel151 Just keep reporting them, yt gets something done when they get flooded with reports.

  • @munzeralseed
    @munzeralseed Жыл бұрын

    "A while ago I built this breadboard computer..." This is like your father who went out to get milk, but he is back after 23 years with a carton of milk in his hand, asking why the breakfast isn't ready yet.

  • @Ozhull

    @Ozhull

    Жыл бұрын

    How is it like that in any way, even remotely?

  • @andrewwmitchell
    @andrewwmitchell Жыл бұрын

    Great to have you back, Ben. I used to use RS-232 all the time in the 80s and 90s but I never needed to learn it at this level; so this was fascinating for me. Looking forward to the next ep.

  • @Eclipsed_Archon
    @Eclipsed_Archon Жыл бұрын

    It's so very satisfying to see all that work translate into actual text transmission and show on the screen! Reminds me why I started to learn programming 15 or so years ago, and really has me wanting to do more work with physical parts like this again. I really love this channel

  • @lucasrem

    @lucasrem

    Жыл бұрын

    Nothing changed the last 15 years, we still use the same code here as in 2005, not needing to update the systems. non secure bidirectional communications, the old days was crap! anyone can get in !

  • @Hugh_I

    @Hugh_I

    Жыл бұрын

    @@lucasrem What do you mean "same code as 2005 here"? Ben just wrote his assembly code in 2022 for this educational example, not to deploy a control interface for a nuclear reactor. This has nothing to do with whether people update outdated insecure infrastructure or not. But if you're really concerned about someone hooking up a listening device to your serial cable, you can always send encrypted data. That is a question of whatever "protocol" you make up in software on top of your serial communication, not a question of how old your physical transport layer is. USB, Thunderbold, Ethernet or whatever you think is not "old days crap" is by itself "non secure bidirectional communication" as well.

  • @markm0000
    @markm0000 Жыл бұрын

    Bro you got to keep regular updates on the community tab because I was genuinely concerned for a while.

  • @Eddy0042
    @Eddy0042 Жыл бұрын

    Saturday afternoon - raining outside, wait - get me a fresh cup of tea, I'm about to learn how the RS232 interface works! Feels like sunshine...

  • @GrantMcLean
    @GrantMcLean Жыл бұрын

    Great video as usual Ben. It took me back to my days as a data communications technician. When you talk about the clock pins not being widely used, remember that RS232 supports two different modes of operation. Asynchronous communication works as you described and was commonly used with terminals and printers. Synchronous mode used the clock signal and was more efficient because it didn't need a start and stop bit for every character. Synchronous mode was commonly used on higher speed lines which used multiplexers, data concentrators or protocol converters. For example X.25 packet switched data links or SDLC communications to an IBM mainframe used synchronous mode, and the modem would supply a clock signal.

  • @lucasrem

    @lucasrem

    Жыл бұрын

    What did you do in the market ? sentimental reasons, why you watched it ?

  • @GrantMcLean

    @GrantMcLean

    Жыл бұрын

    @@lucasrem Heh, yeah maybe sentimental reasons 😄. I always enjoy Bens explanations of things I'm not too familiar with. I thought it would be interesting to see his take on a topic I was familiar with.

  • @Zhixalom
    @Zhixalom Жыл бұрын

    Ever since I encountered my first DB25 RS-232 serial port back in the '80s, I have wondered about this... Just brilliant! ❤

  • @iMentox
    @iMentox Жыл бұрын

    Thank god you're alive, I was worried. Great to see you back!

  • @Aurora12488
    @Aurora12488 Жыл бұрын

    Thank goodness you're back!! We've missed you and your incredible computer engineering videos. :)

  • @paulisfrench3316
    @paulisfrench3316 Жыл бұрын

    This channel is a beautiful dance of computer science and electrical engineering

  • @GrenYT
    @GrenYT Жыл бұрын

    Great video! Few improvements that could be possible: 1. Use a conditional jump subroutine to get a 3 cycle delay instead of 2 NOPs for 4 cycle delay, to allow getting the more exact 104us delay 2. Half bit time routine wasn't exactly half a bit time. Would be closer to 69-70us when half bit time is 52us. But not super important here. 3. Could be cool to parameterize your delay subroutine so you have the same sub routine for 1 cycle and half cycle, but that's just for overachieving:)

  • @leong108

    @leong108

    Жыл бұрын

    He is just doing bitwise ttl receive for this video ? I think it will fail when he has a longer cable .. more capacitance... he will show you then show how a UART handles it still.

  • @Zarazaize

    @Zarazaize

    5 ай бұрын

    I was also concerned about half bit timer :)

  • @Gunbudder
    @Gunbudder Жыл бұрын

    The negative voltage requirement of RS-232 is why some ATX power supplies still provide a negative voltage reference on one of the pins. The power supply manufacturers want to provide it in case the end user has a motherboard that uses on board RS-232 (some industrial motherboards still use it). usually the available current for the negative voltage reference is pretty small though (around 1 amp or less).

  • @stevedonkers9087

    @stevedonkers9087

    Жыл бұрын

    Yes, most of the power supplies I have seen have -12v at around 300 milliamps. For a comparison I don't think I've seen a +12v rail lower than 10amps.

  • @eDoc2020

    @eDoc2020

    Жыл бұрын

    @@stevedonkers9087 +12v capable of less than 10 amps is pretty common on older power supplies before the 24-pin connector. Even my old P4 system with the 4-pin CPU connector only does 8.5 amps.

  • @petevenuti7355

    @petevenuti7355

    Жыл бұрын

    Is this why USB to rs232 adapters don't work?

  • @eDoc2020

    @eDoc2020

    Жыл бұрын

    @@petevenuti7355 USB to RS232 adapters use a chip like the MAX232. This chip uses a charge pump to create positive and negative from a single 5 volt input. It only generates around +-7 volts instead of the 12 volts RS232 devices are supposed to output but it still works fine with most devices.

  • @MattOGormanSmith

    @MattOGormanSmith

    Жыл бұрын

    Some old sound cards used it too, for proper op-amp IO without DC offset. Old BIOS EPROMS also used the -5V IIRC

  • @somilamaloyi7544
    @somilamaloyi7544 Жыл бұрын

    i’ve beeen waiting for a new Ben Eater video😭😭❤️‍🔥 keep up the hard work Ben 💪🏽💪🏽

  • @milk-it
    @milk-it Жыл бұрын

    Assembly programming interacting with hardware. Love it! More, please! Very well explained!

  • @Controllerhead
    @Controllerhead Жыл бұрын

    Incredible video quality and technical explanation! So glad you're back!

  • @volodimirkun
    @volodimirkun Жыл бұрын

    WOW~~~!!! Here we go, Sir~~~!! THanx for coming back with a video!!

  • @scrimpysquare1485
    @scrimpysquare1485 Жыл бұрын

    the legend has returned

  • @smellysam
    @smellysam Жыл бұрын

    In the Subsea sector, RS 232 and 485 are still relevant on ROVs. They work very well in high noise environments (shielding can only go so far with multiple 3000V AC motors in close proximity). The systems are usually 3 pin...

  • @squelchedotter

    @squelchedotter

    Жыл бұрын

    They're relevant for almost anything industrial. Lots of things like Modbus (used to control basically anything industrial, including probably your buildings AC) run over RS 485.

  • @brianmiller1077

    @brianmiller1077

    Жыл бұрын

    Card access controllers talk to subpanels via 485.

  • @Elitekross

    @Elitekross

    Жыл бұрын

    Aircraft too!

  • @johannesgaida3137

    @johannesgaida3137

    Жыл бұрын

    With the NMEA standard? Because we use NMEA 0183 a lot with glider avionics.

  • @Elitekross

    @Elitekross

    Жыл бұрын

    @@johannesgaida3137 it depends on the simulation

  • @Rukkus333
    @Rukkus333 Жыл бұрын

    Thanks Ben. These videos have immense value to the world.

  • @SirKenchalot
    @SirKenchalot Жыл бұрын

    So glad you're back as your videos are fantastic. I still think your series on building your own 8 bit computer Is one of the best on KZread.

  • @DoctorMikeReddy
    @DoctorMikeReddy Жыл бұрын

    It’s been too long! Glad you’re back. Please don’t make us wait so long again

  • @sonovoxx
    @sonovoxx Жыл бұрын

    Whaaaattt!!! He's alive! Sooo good to see you back! Literally trawled the web occasionally for mention of your name in the hope to hear you were ok. Delighted to see a video! 💪👏👏👏

  • @ludovicfrochot5774
    @ludovicfrochot5774 Жыл бұрын

    Hi Ben, glad to find a new video from you! Very clear and inspiring as usual. Thank you!

  • @gregorymccoy6797
    @gregorymccoy6797 Жыл бұрын

    Always impressed at the quality and information density of your videos.

  • @Hiphopasaurus
    @Hiphopasaurus Жыл бұрын

    Nice tight loop, gone are the days (at least in PCs) that you have a known fixed clock rate and execution time, but so awesome to see that in action! Have you ever thought about getting a ZIF socket adapter for that EEPROM on the breadboard? I always get so nervous watching you pry out and insert the chip with all those wires around it! :) Fantastic video as always!

  • @CraigBrideau

    @CraigBrideau

    Жыл бұрын

    I thought the same thing about the ZIF socket. So many bent DIP pins doing this over the years...

  • @WolfePaws

    @WolfePaws

    Жыл бұрын

    Hah, yes, absolutely - I've been thinking this since the start of the project. Alternatively there has to be a way to program it in place.

  • @CraigBrideau

    @CraigBrideau

    Жыл бұрын

    @@WolfePaws PIC and AVR have ICSP (In-circuit serial programming) where you just leave a pin header attached to the programming lines on the chip. A cable connects from your programmer to the header and you can program whenever you want without having to move the chip.

  • @richardbanks2669

    @richardbanks2669

    Жыл бұрын

    I tried this once, but typically ZIF sockets themselves have legs which are too fat to fit into standard solderless breadboard :(

  • @Hiphopasaurus

    @Hiphopasaurus

    Жыл бұрын

    @@richardbanks2669 Very good point. The ZIF sockets I have do have very stubby leads too and I don't recall ever trying to put them on a breadboard. Though I think the reason he doesn't is just because of the way he explains things so clearly and non-distracting way, like only using what you actually need to do this. Just like he shows the assembly and EEPROM writing steps each time, so it's absolutely clear what is happening.

  • @thegerbus
    @thegerbus Жыл бұрын

    The legend is back!

  • @danielhoven570
    @danielhoven5709 күн бұрын

    Hey! If you are curious what the clock pins are used for, in some applications (I work in optical sensors) you need to have very precise timing associated with each data packet. The Clock and Ref_clock pins can be used to connect a very precise oscillator (at 1 kHz for example) to the device you are getting data from. This is helpful if you need to integrate the results you get (and thus need exactly defined dt.) This is an alternative to a synchronous serial interface, which comes with it's own problems. It is very nice to be able to use an asynchronous interface with precise intervals defined for specific data packets. to get a little weedier, what matters more than the time a packet is sent/recieved is the time a packet was GENERATED. this often involves numerical calculations (in an FPGA for instance) where you need to know exactly when the communication RTL logic is "sampling" a normalizer or shift register for instance.

  • @colonelbarker
    @colonelbarker Жыл бұрын

    So happy to see you're alive and well. We've missed you greatly.

  • @khoda81
    @khoda81 Жыл бұрын

    Yay, Ben Eater is back!

  • @-UPH-KRISHNAM
    @-UPH-KRISHNAM Жыл бұрын

    Great to see you again Ben 😍

  • @xmcblxck
    @xmcblxck Жыл бұрын

    Ben you are a genius! Seriously, I love your videos they are very informative and I am learning a lot. I think we are all happy when a new video from you comes online 👍

  • @soundspark
    @soundspark Жыл бұрын

    I had a lab in community college where we scoped out RS-232 protocol, bit-banging the UART with ASM. We didn't have digital storage oscilloscopes and as such we wrote a simple program to repeatedly send a single character. When the PC was on Windows 98 the timing was all over the place, much more stable when booted to plain DOS.

  • @MRgrouponline
    @MRgrouponline Жыл бұрын

    Great to see you back man

  • @GiveAcademy
    @GiveAcademy Жыл бұрын

    Glad to see more content, I hope all is well! This was a fantastic video!

  • @moshesakajo
    @moshesakajo Жыл бұрын

    as always, it is a great pleasure to watch your tutorials. It is good to have you back in business

  • @theoneandonlymeshe9174
    @theoneandonlymeshe9174 Жыл бұрын

    One of the few channels I have the bell turned on for and stop whatever I’m doing when a new video comes out. Thank you Ben 💞

  • @ThirdInLine
    @ThirdInLine Жыл бұрын

    I was just thinking how it had been a long time since is seen anything from you! Thank you for all your amazing content!

  • @danielhermanus6909
    @danielhermanus6909 Жыл бұрын

    Been waiting for this!

  • @maksudulhaque3227
    @maksudulhaque3227 Жыл бұрын

    I am glad I subscribed to this channel. This is the most informative channel and the time and energy put on to these videos are amazing. The quality is beyond best. I love it.

  • @jengelenm
    @jengelenm Жыл бұрын

    As a service tech, i use RS233 for 20 years and ongoing. It is still very much used in industrial PC’s and PLC’s today. Finally i understand why i always have to set baudrate equal for transmitter/receiver!

  • @AsmodeusMictian
    @AsmodeusMictian Жыл бұрын

    Fantastic to see a new video posted from you, sir! Thank you, as always, for educating me a bit more. It's always something interesting :)

  • @Mr_ToR
    @Mr_ToR Жыл бұрын

    haven't watched it yet, just got the notification for the new video. so anxious to go home and watch. we're so lucky to have you on youtube ben eater! you're the best teacher!

  • @glitchy_weasel
    @glitchy_weasel Жыл бұрын

    Glad to have you back! Not only did I learned about the 232 serial protocol, but also about transistors and real time programming too. Fantastic video!

  • @gustavogushiken4256
    @gustavogushiken4256 Жыл бұрын

    This is insane! One of the greatest videos on the internet about this theme. Thank you very much for sharing so much knowledge...

  • @EdgeGaming
    @EdgeGaming Жыл бұрын

    This is so interesting. Out of my depth and you lost me at times but still fascinating. I've never seen bits on an oscilloscope like that!

  • @chicken_punk_pie

    @chicken_punk_pie

    Жыл бұрын

    If this interests you enough you can go back and watch his older videos and learn exactly what all of it means. This channel is amazing.

  • @leong108

    @leong108

    Жыл бұрын

    Just watch for RTS and CTS ... and cross over (DTE to DTE , or DCE to DCE ) connections.

  • @ohasis8331

    @ohasis8331

    Жыл бұрын

    @@chicken_punk_pie And it is well worth doing, you can do it at leisure rather than force it. I took months but got the whole lot.

  • @75slaine
    @75slaine Жыл бұрын

    Welcome back Ben, great to see you making videos again.

  • @lithou4689
    @lithou4689 Жыл бұрын

    Glad to see you back making videos. As someone who works troubleshooting both old and new tech, your videos have helped me gain a huge insight into how things work. We infact still put RS232 on new products we make for backwards compatibility with older equipment.

  • @blaze9872
    @blaze9872 Жыл бұрын

    I'm so glad you're back!! These videos help me so much!!!

  • @MohammadAlmeqdadi
    @MohammadAlmeqdadi Жыл бұрын

    This video made this day so much better! You're a great teacher, and I enjoy your videos, and learn so much even though I know I would likely never be this capable, but brings a smile to know that at least I understand how things work. I always had those questions as a kid and it feels good to finally 'get it'. All the support :)

  • @draggonhedd
    @draggonhedd Жыл бұрын

    You always do such a good job of explaining these concepts in a clear and understandable way. I feel like I understand this in a way I haven't before.

  • @andychess
    @andychess Жыл бұрын

    Great video, wonderfully explained. Thank you!

  • @alec1575
    @alec1575 Жыл бұрын

    Your knowledge on this is amazing.

  • @sunipmukherjee2130
    @sunipmukherjee2130 Жыл бұрын

    Hey glad to see you back man! Hope everything is alright with you. Great content as always.

  • @tiger12506
    @tiger12506 Жыл бұрын

    Had to do a lab in college using a similar architecture to create a musical tuner. So had to precisely measure freq, ex: 440hz. Your clock cycle counting and nop to balance both sides of a branch brought a smile to my face. Someday I'll go back to playing with those types of things again.

  • @JimHenderson19
    @JimHenderson19 Жыл бұрын

    Awesome. Explained very well. I will watch this again. I esp. enjoyed how this was put together. Thank you.

  • @MangoJones139
    @MangoJones139 Жыл бұрын

    Great to have you back! Very interesting video as always. Worth the wait.

  • @64jcl
    @64jcl Жыл бұрын

    Great tutorial on RS232 ! Btw you could simplify a couple of things in your code. Use Y index register for delay countdown instead of X to avoid the phx plx. Also reuse same delay routine by setting Y to either #13 or #6 before calling the wait routine depending if you want to wait a full bit or a half bit. Btw, an interesting thing about the Commodore 64 was that they never did a real RS232 implementation as part of the hardware but delegated that to the CPU so the machine actually had to this identical bit fiddling to transfer or receive a byte. However they did make use of a timer triggering a NMI (non maskable interrupt) so that the read bit was done quickly and a return from interrupt passed control back to the program running. However, the max speed you could use was 2400 baud with this method, and even then they messed up the timing table for PAL computers so it is in fact broken on all machines made! However, one could code this yourself and get as high as 9600 baud like you do here on your 6502, but then have no time to do other stuff while you were sending or receiving. A hack was done to enable this though by simulating a clock signal to trigger an interrupt as all transfers always started with a 1 but required a hardware hack for the receive signal.

  • @oneeyefpv
    @oneeyefpv Жыл бұрын

    Great video. Also great to see someone programming in assembly so fluidly!

  • @rty1955

    @rty1955

    Жыл бұрын

    Ive been programming in assembly for over 50 yrs Best Language ever

  • @ivarnordlkken8082

    @ivarnordlkken8082

    Жыл бұрын

    @@rty1955 Me too. Both 6800 and Z80.

  • @rty1955

    @rty1955

    Жыл бұрын

    @@ivarnordlkken8082 I had began my work on IBM unit record equipment like the 407 using plugboard wiring then the IBM 1401 and then the IBM 360/30 ans on up. I played with the Intel 4004, and found it to be a toy. I built my own processor built around 7400 chips that mimicked the IBM mainframe instruction set. When the 8080 came out, I used it for an S-100 bus microcomputer. Coming from a mainframe environment, I found the instruction set to be VERY limiting. And could not grasp a SP register, as mainframes don't use that. I wrote major applications in assembly lang on mainframes with only 48k of memory. I was always amazed on what i can do with such limited memory. I would watch a tape sort on a mainframe (which was way faster than using disk) and was in awe. After it read alp the input data, it would print out how many passes of the data it would have to make before final output. You could even tell it which tape drive you wanted the output on even though it used that drive as a work drive! The instruction set was VERY powerful in mainframes and I missed that when I wrote for the Intel platform. For example I could clear 16meg of memory with just ONE instruction. Also the absence of 16 general purpose registers boggled my mind! Who would design such a limited processor! To me, the processors in a PC will always be a toy. They never matured. I now code on TI processors like the MSP430 and PIC type decixes8

  • @andrewbarnard3229
    @andrewbarnard3229 Жыл бұрын

    love and have enjoyed all your uploads for years, thank you for continuing to provide content for our entertainment

  • @James_Knott
    @James_Knott Жыл бұрын

    I started as a tech overhauling Teletype machines over 50 years ago. Back in those days, a lot of companies didn't pay strict attention to the "standard". Also, you will see the clock signals used with synchronous devices. I used to come across it with basic rate ISDN. Even back when I started in telecom, there were synchronous modems that used the clock signal. Also, there were 2 stop bits at 110B and 1 bit at faster speeds. Then there was the Baudot code, where a stop bit was usually 1.42 bits long, though with UARTs 1.5 was used. BTW, many years ago, I designed and built an 8 port serial card (3 ports populated) for my IMSAI 8080 computer. It used the 8250 UART. I wrote all the software for it in 8080 assembler code, including a terminal app for use with amateur radio. I could send & receive in both Baudot and ASCII, as well as printing to my M35 ASR teletype and many other functions with it. Back in those days you knew your computer inside and out!

  • @clooskey
    @clooskey Жыл бұрын

    Okay, I have to let it out. I missed your videos so much that I started looking for another places where you might have had been doing... anything 😂 Also made sure that there is no rumours anywhere saying that something bad happened. I was thrilled to discover the Ben Ben and Blue podcast, oh, that was a great listen! The 'origins of Ben Eater' are so inspiring. I love your story and keep learning so much from your videos. I'm glad they're back 😀 Actually I'm using a lot of industrial RS-232 speaking devices (barcode scanners, measuring equipment) at work and still learned new things from this video 😀

  • @LogansBench
    @LogansBench Жыл бұрын

    We literally started serial comms in my embedded systems course yesterday, this is perfect timing

  • @markm0000

    @markm0000

    Жыл бұрын

    Do good in school. Always remember where you are and where you’re going. Build a portfolio of your own projects and every small thing you do in class that’s difficult to figure out. I strongly recommend a basic personal website to make it easier for people to find you. Never let it slide always update it even when you’re several years into the field. You might get near retirement and an incredible opportunity comes along to make a massive improvement in this tech world.

  • @marc_frank

    @marc_frank

    Жыл бұрын

    @@markm0000 did you do so?

  • @Hiphopasaurus

    @Hiphopasaurus

    Жыл бұрын

    Perfect timing. I see what you did there.

  • @markm0000

    @markm0000

    Жыл бұрын

    @@marc_frank I learned all I should have known years after being frustrated from the College_Degree™ fantasy. They make it seem so incredibly easy to just pass each course, get the fancy slip of paper, and land a six figure IT job for the rest of your life. I drank the Kool-Aid from a young age and believed all of it. I was quickly faced with reality and it didn’t work out. Thankfully I went to go work with my dad as a blue collar. I since switched careers again and now I’m doing alright as a mechanic with tech knowledge in my back pocket. There’s a whole lot more wires in equipment than nuts and bolts nowadays and I see a good future for myself. I’m thankful that I have good parents to fall back on, while I figured out what I was doing wrong during those years. Life goes on. Stay hungry, stay foolish.

  • @tomgoff8670
    @tomgoff8670 Жыл бұрын

    Glad you’re back, great video

  • @shaunclarke94
    @shaunclarke94 Жыл бұрын

    Glad you're back! Love your videos. I've learned so much from them.

  • @hh-yz8nw
    @hh-yz8nw Жыл бұрын

    Great Ben thanks to have you are back after this "pandemic" period. Wish I could have learned all this from you in my early days. Best Regards from Hans in the Netherlands.

  • @pa1855
    @pa1855 Жыл бұрын

    Finally a new video!

  • @bluedreaminsomniferum3137
    @bluedreaminsomniferum3137 Жыл бұрын

    Awesome work, man. Love your vids!

  • @bharadwaj297
    @bharadwaj297 Жыл бұрын

    Fanstastic !!! I am very glad that there is channel which is doing fundamentals so eloquently.

  • @the1spyderryder
    @the1spyderryder Жыл бұрын

    In RS232 there are 10 bits sent 1 START bit followed by 8 data bits and a stop bit so ten bits also there can be one or two parity bits sent before the stop bit. Also there can be seven data bits and one parity bits. So the maximum number of bits sent before resyncing the data is eleven or possibly twelve then when the next start bit is sent the clock is resynched. The start bit is longer than a regular data bit that is why in some devices the receiving device can calculate the baud rate just from timing the start bit and set its own baud rate from that.

  • @the1spyderryder
    @the1spyderryder Жыл бұрын

    It has bee. A while since i wrote assembler and it was mostly Z80 and 8051 code. But i have done 6502 a very long time ago on the VIC 20 and the C64...lol it was a joy watching someone else coding in assemler! Great Video.

  • @LongTran-em6hc
    @LongTran-em6hc Жыл бұрын

    This video teaches me more in 30 mins than 3 of the 45 mins lecture in university Thanks a lot!

  • @alexandermaasland3494
    @alexandermaasland3494 Жыл бұрын

    So nice to see you back with a new video Ben! Thanks a lot :)

  • @sylpisophia5612
    @sylpisophia5612 Жыл бұрын

    i used to be so patient and diligent in doing stuff like these. now, my attention got diluted by so much stuff. I'm glad to see videos like this. I could at least feel the excitement without needing to commit to another project 🤣

  • @davidwyatt6907
    @davidwyatt6907 Жыл бұрын

    I have been waiting for your next video. Welcome back and keep it up!

  • @RicardoOliveiraRGB
    @RicardoOliveiraRGB Жыл бұрын

    YOU'RE BACK! 👏👏👏👏👏👏👏 Hugs from Brazil!

  • @GuildOfCalamity
    @GuildOfCalamity Жыл бұрын

    It was nice to see you address the rising edge/falling edge timing. It's wonderful when you don't have enough ICs to be concerned with fan-out and de-bounce. Would love to see a follow up on flow control or half vs full duplex.

  • @SuperMurrayb
    @SuperMurrayb Жыл бұрын

    Interesting video. Thanks for posting it. For the IBM PC there was a LAN that used the 25-pin RS-232 connectors joined in a ring configuration. The LAN did not require a network card only a 25-pin serial port on each machine. Zero-slot LANs were fairly popular until affordable Ethernet cards became available.

  • @Chris-ib8lw

    @Chris-ib8lw

    Жыл бұрын

    These were the original token-ring protocol networks correct? I remember reading about this many, many years ago in a MCSE class I took.

  • @SuperMurrayb

    @SuperMurrayb

    Жыл бұрын

    @@Chris-ib8lw Token Ring was IBM's system with real expensive cards connected using heavy coaxial cable we called "frozen yellow garden hose". It used an expansion slot. All I recall was there was a zero slot LAN for up to seven workstations that used a 25-pin RS-232 connector for each machine. For each connector there was one cable connected to one transmit and receive pair of pins and another cable to the other pair. One cable went back to the previous machine and the the other went on to the next machine. A small TSR (Terminate and Stay Resident) program in each station would receive each packet and use it or forward it to the next machine. I do not remember anything else because I never worked on any zero-slot LANs. They were quite slow at 115 Kbaud, or so, and were only used for tiny networks.

  • @johnjohnson5401
    @johnjohnson5401 Жыл бұрын

    Great, excellent description of computer technologies! Thank you!

  • @hashtagPoundsign
    @hashtagPoundsign Жыл бұрын

    Very satisfying to watch.

  • @joeglens
    @joeglens Жыл бұрын

    This reminds me of my days doing assembly programming on a PIC16F84. I had implemented a bit-bang UART driver that drives an rs232 interface. Also a 232 interface using a simplified ttl level voltages is prevalent in embedded programming for debug purposes

  • @saitamapreetsingh3057

    @saitamapreetsingh3057

    Жыл бұрын

    git ?

  • @TheWeepingCorpse

    @TheWeepingCorpse

    Жыл бұрын

    I also used the PIC16F84. The program memory was so small that I had to write a single bit bang routine to handle rs232, i2c and rs485 for an amusement arcade machine monitoring system, I remember using an interrupt pin for the rx line, causing the start bit to trigger an ISR . Now we have atmega328 its a different world. LOL.

  • @supergreatlifewithgames1080
    @supergreatlifewithgames1080 Жыл бұрын

    I learned more from him in a day than my entirety of schooling years.

  • @marshallgrads
    @marshallgrads Жыл бұрын

    Thank you for making this so easy to understand.

  • @m1geo
    @m1geo Жыл бұрын

    Excellent, Ben. So elegantly explained. :)

  • @austinscott4695
    @austinscott4695 Жыл бұрын

    Welcome back ❤❤