6502 serial interface

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

КОМЕНТАРІ • 339

  • @jason3898
    @jason3898 Рік тому +262

    Sat on the kit for a few years, spent the last 2 weeks finally following through the series, I finally finished 30 minutes ago. How delightful to come back to the playlist and find a new episode! Thanks for waiting for me :)
    This is such a great series. I showed my 6yo the final build, had him plug it in and reset it, his response: "Wow! How did you make it do that!?" Me: *starts explaining* Him (interrupting): "Can you make it say Hello, Arlo!?". I walked him through the whole process of modifying the program, building, looking at his name in HEX, pulling out the EEPROM, programming it and getting it back on the breadboard. When it printed "Hello, Arlo!" I think a new hobbyist was born.
    Then, as I'm typing this, he's in People Playground and calls me over to show me he's put "Hello, Arlo!" on a terminal looking screen you drop into the world. Yeah, he's hooked :)

    • @drivers99
      @drivers99 Рік тому +31

      That’s so cool. Today I was doing the project where you hook up the video card to a monitor and I showed my daughter, and told her about the hex codes of the 64 color palette and the 100x75 pixel resolution. (She’s in a class learning html, css, and JavaScript so she’s aware of RGB codes in hex, and she makes a lot of digital art as a hobby).So she designed a 100x75 png file for me of a frog eating a fly (LOL) and I modified the python program to convert it since she didn’t index the colors, I had the convert program do it for me. Burned it onto the EEPROM and it shows the frog now :) I think this is helping encourage her too. (She’s 13 not 6 though, big difference.)

    • @rayzecor
      @rayzecor Рік тому +7

      That's adorable

    • @Anikin3-
      @Anikin3- Рік тому +7

      playing People Playground at 6 years old

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

      I wonder if people remember those old Radio Shack kid's electronics kits? They were absolutely brilliant. This is kinda like that, but usually for bigger kids. :)

    • @rabidbigdog
      @rabidbigdog Рік тому +4

      Hello Arlo!!!

  • @sefaa4089
    @sefaa4089 Рік тому +666

    Babe wake up! Ben Eater posted another video!! 🎉

    • @pareshmhatre4019
      @pareshmhatre4019 Рік тому +8

      Why Babe is sleeping?

    • @N0Xa880iUL
      @N0Xa880iUL Рік тому +1

      ​@@pareshmhatre4019 She has chronic fatigue syndrome.

    • @totallynotgad
      @totallynotgad Рік тому +17

      babe should always be awake waiting for the new ben video

    • @manishholla
      @manishholla Рік тому +4

      Babe seems distracted.

    • @Raz82000
      @Raz82000 Рік тому +4

      ​​@@manishholla yeah. Seems like babe is having "yoga sessions" with tyrone atm.

  • @fredinit
    @fredinit Рік тому +258

    Ben... You do an excellent job of explaining both the electronic and software side of this. Not that everyone needs to be a bare-metal programmer, but we need more developers that understand what's going on "under the covers" in hardware. It's been a long time since I did 6502 assembler (back in the computer wars (C=64, Apple ][, Atari .. before the IBM PC!).

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

      me, a python programmer, remembering people had to think about memory layouts, when he talks about picking a place to store his little asterisk… 😅

    • @paulmichaelfreedman8334
      @paulmichaelfreedman8334 Рік тому +4

      I've met programmers, good ones too, that have never even had a clue what their computers looked like inside. They'd probably be able to name some components, but that's it.

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

      This guy's the best.

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

      @@paulmichaelfreedman8334 Couldn't have been _really_ god ones though.

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

      @@paulmichaelfreedman8334 That's most of them now.

  • @omgwtfkthxbai
    @omgwtfkthxbai Рік тому +29

    "...and that's what we'll be doing in the next video."
    Aww. Just when it was getting to the GOOD part! Please don't make us wait too long, Ben!

  • @wipoute
    @wipoute Рік тому +111

    "Be conservative in what you do, be liberal in what you accept from others" - Jon Poster
    Man, this is turning into a philosophy channel... and I'm here for it!

    • @renakunisaki
      @renakunisaki Рік тому +9

      This philosophy made sense at the time, but led to the utter mess that was Web 1.0, and all sorts of security issues.

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

      It's Postel's Law, probably auto-correct got you. It's the principle of robustness that all application developers and architects should strive for. TCP is a very robust protocol and has stood the test of time indeed. Application layer protocols are a different thing entirely - HTTP I'm looking at you askance.

  • @somilamaloyi7544
    @somilamaloyi7544 Рік тому +135

    Ben Eater’s videos are too advanced for me now but i still watch because i love watching this whole project form together

    • @MrYerak5
      @MrYerak5 Рік тому +4

      I leart so much in the past years from his videos

    • @hn396
      @hn396 Рік тому +11

      Learn digital logic and computer architecture! It will really change the way you see technology in general, it's more than just educational

    • @ratvibe
      @ratvibe Рік тому +3

      I couldn't imagine a better source to learn the relevant topics than his own videos

    • @jason3898
      @jason3898 Рік тому +3

      I'm certain you can handle this series. I have no previous experience with breadboard builds. I've only soldered 2 pre-made PCB kits which, like Ben says at the beginning of this series, only really taught me how to solder. I sat on the kit for years because, every time I started, I felt the same way as you. But then lately I've been binging the LOOK MUM NO COMPUTER channel (curse the algorithm for not suggest the channel to me years ago), who's tag line is "Don't be afraid to try it". He knowledgeably, yet haphazardly, throws extremely cool stuff together without a single fear of making a mistake. It's incredibly inspiring. He happened to mention Ben's kit in one of the videos and I decided to embrace that mindset and just dive in to completing the kit, ignoring the voice telling me I'm not ready for it. After 2 weeks working on the clock module and this series, I finished today. You can do it!

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

      Same bro. I'm a mechanical engineering student in uni but I've always had an interest in electronics and Ben fills that need perfectly!

  • @MikeF1189
    @MikeF1189 Рік тому +10

    It sure is great to really understand the functions of all the terms and protocols I've been using for almost 30 years.

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

    Literally just yesterday I was trying to hook up a COM port on my headless server to a cheap USB UART adapter. Of course it didn't work and I bet it's because I was trying to interface RS-232 level port with 5V level adapter.
    Great video and great timing.

  • @marianaldenhoevel7240
    @marianaldenhoevel7240 Рік тому +3

    Software person here: I love the order in which you write the code for demonstration. The loop, the if-then-else-logic, and then the body for each case. I vow to steal that when I try to explain stuff.

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

      That was one of the most important things I learned early on. Don't write code like an essay. Write it "from the outside in". First the overall structure (with comments explaining what goes here), then the interior.

  • @drivers99
    @drivers99 Рік тому +5

    I’m finishing up the last kit now (I did the 6502, the 8-bit breadboard computer, and almost done with the video card) and a new kit just came out. Awesome!

  • @FragrantVagrant69
    @FragrantVagrant69 Рік тому +22

    If I tried this, I can imagine there being lots of smoke coming out of the breadboard, but man, I love watching this. Thanks, Ben

    • @SlartiMarvinbartfast
      @SlartiMarvinbartfast Рік тому +4

      MAGIC smoke of course. 🙂

    • @DW-indeed
      @DW-indeed Рік тому +3

      I've learned: Pay attention to your breadboard power rails. I got one that had split rails (The lines tell you! The lines maaan!) which I think meant I somehow created a short loop. The VRMs silently and smokelessly died and were passing 12v straight through into the circuit ("ooh that's a bit warm..."). Fortunately nothing else died, but that genie of the magic smoke is always there, trying to escape!

  • @jeromethiel4323
    @jeromethiel4323 Рік тому +44

    The 16550 UART was an amazing achievement. That one chip replaced entire circuit cards to do the same thing.

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

      What does the 16550 do that the 6850 can't?

    • @jeromethiel4323
      @jeromethiel4323 Рік тому +4

      @@scottlarson1548 It had some cache memory on it, IIRC. So if the processor was busy, you could "ride through" and not miss any data.
      There were several UART type devices out around the same time, all i know is the 16550 ended up being what pretty much every body used.
      Your experience, however, might be different.

    • @scottlarson1548
      @scottlarson1548 Рік тому +6

      @@jeromethiel4323 The 6850 had cache memory: one byte! You better read it quick.

    • @jeromethiel4323
      @jeromethiel4323 Рік тому +4

      @@scottlarson1548 You have exceeded my rather limit knowledge on the subject! ^-^
      Only did a very little bit of breadboarding serial comms, and it was always a 16550. So my experience is extremely limited.
      But i know pretty much every laptop and desktop i owned from the mid 80's on were all 16550's for the serial ports. Don't know why, it's just all i ever saw.

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

      @@scottlarson1548 The 16550 had a 16byte FIFO buffer. That was really something back in the day

  • @RexxSchneider
    @RexxSchneider Рік тому +4

    I wish those chips had been around in 1979 when I faced the task of of interfacing a Commodore Pet to an ICL 2960 (I think it was) mainframe in order to download the 1861 census data for a district of Dudley which the mainframe held on magnetic tape. The Pet had no serial interface, so I had to create one using discrete logic and level shifters, and I ended up making one that ran at 300 baud. The database was 'only' about 600K in size, but that took about a day, if I recall correctly, to successfully download onto two double-sided 8-inch floppy disks, in a dual disk drive which was a custom addon for the Pet because the Commodore disks (on the IEEE interface) didn't have enough capacity.

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

    Man, these videos are something incredible. Thanks so much for taking the time to share your knowledge with the world. I for one truly appreciate it!

  • @quentidoudou6544
    @quentidoudou6544 Рік тому +10

    It's almost like Ben heard i don't know how that i'm on my way to build his 6502 computer using his videos..
    One again, great job Ben! I'll definitely used that in a while!

  • @JustinRCutler
    @JustinRCutler Рік тому +22

    You might want to consider the MAX233 (instead of the MAX232). The MAX233 is similar in price, but does not require external charge pump capacitors.

    • @shaunclarke94
      @shaunclarke94 Рік тому +1

      Oh wow. How did they achieve the same functionality without capacitors? Or is it somehow possible to embed a capacitor in the IC?

    • @DFPercush
      @DFPercush Рік тому +3

      @@shaunclarke94 I'm not sure exactly, but there's a lot of room inside that plastic that's not the silicon die, especially on DIP packages. Most of the space is just for the pins. The caps are probably just potted in there.

    • @tim1724
      @tim1724 Рік тому +6

      The MAX233 is around $11. The MAX232 is around $7, and clones (including high quality ones, such as TI's version) are under $2. Capacitors are a few cents. So unless you are really tight on space, it's significantly cheaper to use the TI clone of the MAX232 with external capacitors.

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

      But I already have a MAX232 in my parts box…

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

    What fortuitous timing! I was literally looking for a good primer on serial protocol last night.
    Keep up the fantastic work, Ben!

  • @DebuggerKnight
    @DebuggerKnight Рік тому +8

    this guy's talent in reading standards absolutely amazes me

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

    I found your channel two days ago and have been glued to the screen ever since! I actually had the book you based your breadboard computer on, and built the mk 2 when I was 15-16 :)
    I just wanted to mention that that you can run timer 1 on VIA in continuous mode to generate a square wave with an arbitrary frequency. Setting it to generate an irq when it restarts lets you run your interrupt handler on every leading edge of that wave. It makes it a lot simpler to handle the read/write timings.

  • @thewhitefalcon8539
    @thewhitefalcon8539 Рік тому +17

    It's worth pointing out that Postel's Law didn't work out so well for the Internet. With every implementation being liberal in what it accepts, it wasn't so easy to spot if your implementation had mistakes in what it sent to others, until certain combinations just didn't work at all. Nowadays, we want to have a clear specification and hold all implementations strictly to the specification.

    • @jasharin
      @jasharin Рік тому +1

      heck, he immediately points out the problem with postel's law in the video!

  • @wChris_
    @wChris_ Рік тому +26

    I believe you can implement send and receive at the same time by using one of the timer interrupts of the VIA chip and handling receive in the Interrupt routine. Sending is done synchronously in the main routine. You can also use the second timer of the VIA for better timing.

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

      Doing that would cause a fair amount of jitter in the send routine. Namely because it's unaware of any timing issues caused by interrupts for the receive. Additionally, send and receive are not necessarily synchronized as to the start of each byte. But since he's gonna use a UART in the next video, there's no need to go extreme low level bit-banging with microsecond level timing and frankly, both send and receive would be well served via interrupts at that point.

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

      @@johncochran8497 If you want full duplex with no jitter, use one timer interrupt running at more than twice the speed (from sampling theorem) you need to keep up with 10 x 104uS (single byte time). It's not exactly high speed even for a 6502 (about 2kHz). Poll receive, and transmit when a byte to send is required, using two buffers. As far as I know, old 8 bit 6502 home computers were only half duplex, and used interrupts for send and receive (at least my Atari 800 worked like that).

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

      @@threeMetreJim Since the hardware is doing pure bit banging, you need that interrupt at twice the bit frequency, not the byte frequency. So call it 52 uS. The Apple // had a clock speed of 1.023MHz, so we're talking an interrupt every 53 clock cycles. There is a 13 clock cycles overhead for taking the interrupt and the rti to return. So you've got only 40 clocks to handle the send/receive plus what ever else you're doing that isn't directly involved with handling the data communications. Not very practical.
      The next video will use an UART so right there the need to handle individual bits goes away and the interrupts happen on xmit empty or recv full. This means that on average interrupts only happen 1920 times per second, or 520 uS which is 533 clock cycles on an Apple // or 520 clocks after excluding mandatory interrupt overhead. Much more reasonable for processing data outside of direct I/O support.

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

      @@johncochran8497 Not bit banging, using the UART. Nowhere near fast enough to bit bang. My mistake of getting ahead as soon as Ben mentioned UART. Apologies for that.

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

      @@threeMetreJim No problem. I assumed that you had read and knew that the context of this subthread was bit banging. And the interrupt frequency of the UART may actually be even lower, depending upon whether or not the UART has any FIFO queues for send and receive. Assuming no FIFO and Apple // clock speeds, I'd estimate the fastest practical RS232 speed would be 38400 baud giving an average of 133 clocks to handle each byte and other processing.

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

    I have no idea why UA-cam stuck this in my feed but I've now watched pretty much every one of these videos and have been fascinated. I have also understood not a thing, but I eagerly await the next video.

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

    Awesome video. Thanks for sharing. The binary code representing * is 00101010 which matches the scope reading with an extra 0 on the end.

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

    Your videos have so much charm and it's hard to explain why. But the fact that I had the following interaction is a good example;
    "The computer only has this five volt supply, but we need to generate this +-10v or so..."
    "Didn't he just put out a video about a really simple way to do that? I think it was even his most recent-"
    "Well in my last video I talked about how a charge pump is..."

  • @sergeyd5777
    @sergeyd5777 Рік тому +4

    How many people are out there now who can do this? I deal with Electrical Engineers and Software Developers a lot at my work. The former cannot design a circuit without a CAD simulator, and the latter cannot write an application without C#...
    Ben, you are a gem! Hope you have a good employer.

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

      That’s wild, my electrical engineering class in school did cover CAD but only after we’d gotten good at laying out circuits by pencil and bresdboard. Like the CAD lessons started by translating a breadboard design into CAD. But that was 13 years ago now. Maybe they’re not bothering anymore

  • @_ab_6490
    @_ab_6490 Рік тому +15

    I hope in future u talk about 8086,8259 PIC,8254 PIT
    Because you are the only person on UA-cam who explains things in a detailed and organized way, you deserve a medal

    • @bayareapianist
      @bayareapianist Рік тому +1

      I don't understand why learning these stuff are so hard? He never explained why there was a negative voltage used for rs232. I don't think he knows.

    • @adrianstovall
      @adrianstovall Рік тому +4

      ​@@bayareapianist you could always say "hey Ben, why does the serial standard use positive and negative voltages?" You know, actually ask.

    • @melkiorwiseman5234
      @melkiorwiseman5234 Рік тому +5

      @@bayareapianist I think it was because that explanation isn't fully relevant to this lesson.
      But to satisfy your enquiry, the RS-232 standard was intended to operate reliably in electrically "noisy" environments. In such an environment, making the voltage "swing" across a larger voltage range makes the connection more likely to reject any interference.
      Or to put it another way, a "pulse" of voltage induced into the communication wiring by electro-magnetism from nearby electrical equipment is less likely to be misinterpreted as being part of the data transmission if you use positive and negative voltages which are widely separated from each other. That is also why the standard allows the voltage swing to go all the way from positive 25 volts to negative 25 volts (a swing of 50 volts).
      TL;DR: It makes the data connection more reliable.

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

      Sounds like "robustness" ;-)

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

      @@adrianstovall I don't think he knew. Otherwise he would have mentioned it.

  • @mikecimerian6913
    @mikecimerian6913 Рік тому +6

    The 6502 is in my opinion the best teaching CPU ever built. People who owned Commodore computers could get into machine language in a few months thank to the kernel built routines. The memory addressing scheme by page memory and offset is simple compared to i386 base address and segment/offset scheme. This is the CPU to experiment and have fun with.

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

      I didn't know about the page memory system in the Commodore. I had an Atari 8-bit that just addressed everything by address directly. Was the Commodore harder to program in 6502 than the Atari ?

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

      @@bjbell52 I don't about the Atari. 8 bit addressing must be closely related. 256 pages each with 256 words (bytes). I really enjoy the symmetry. :)

    • @bjbell52
      @bjbell52 Рік тому +1

      @@mikecimerian6913 I think we're talking about different addressing schemes. I think you're talking about index addressing like (address),y . I'm talking about direct addressing like lda #5 sta address. my bad.

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

    Thank you Ben, your videos are invaluable!

  • @computerkiller1494
    @computerkiller1494 Рік тому +3

    i'm being motivated by all of your videos and i think i'll create my own 6502 computer. thanks for all the expalations and help you give :D (maybe i'll get the kit as a birthday gift)

  • @likebot.
    @likebot. Рік тому +1

    Well! 6502s still available in the marketplace. Colour me happy.

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

    I am pretty happy you put a new video up. Always entertaining and educational.

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

    I have been hesitant to embark on a relatively simple learning project for work where I need to communicate via Modbus over RS485 using a simple microcontroller. I haven't started it due to really having a hard time understanding a lot of this stuff and finding anything on youtube that is straight and to the point was very hard. And now, you come out with this video. While its not exactly the same, it does give me enough to go on to feel a bit more comfortable with my project. I really an looking forward to your next video as it will likely also be very helpful. Thank you, Ben!!!

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

      You should check out Ben's video about RS-232 if you haven't already then

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

    I've always loved Postel's Law. It can solve so many issues, especially around file format support.

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

    Memories... breadboarding 6502 and C64 projects in the early 80's : )

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

    I've worked in computer hardware and software since 1986. The best way to understand how a computer works is to watch Ben Eater's UA-cam channel.

  • @okiedokie9430
    @okiedokie9430 Рік тому +1

    ...and hopefully we'll see the next video before the snow melts 🤗

    • @enjibkk6850
      @enjibkk6850 Рік тому +1

      You mean the polar ice caps 😆?

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

    Awesome video! Thank you for posting it! Looking for UART next 😍

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

    Absolutely amazing! Thank you for the great content Ben!

  • @I.____.....__...__
    @I.____.....__...__ Рік тому +4

    4:22 "TCP Robustness Principal - Be conservative in what you do and liberal in what you accept from others" - That's just good general life advice. 🤔

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

    I'm finally in a place where I can start spending money on fun stuff. I'm so glad your store is still online.

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

    AAAAAAAA YES! love it when there's a new video from you ben!

  • @AJMansfield1
    @AJMansfield1 Рік тому +13

    There's also an intermediate level you can go at for serial communications aside from that sort of "raw bit banging", using interrupts and a generic timer peripheral. The CPU never actually runs a delay loop, it just sets a virtual alarm clock for whenever it needs to next send a bit, and sets an interrupt for any transitions on the recieve line to record splits with a virtual stopwatch.
    This style of programming is one that a lot of people aren't really aware is possible, and it can get you out of a lot of sticky situations when you need to deal with multiple tasks with tight timing and/or less-conventional protocols.

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

      Do you mean protothreading?

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

      @@harveyxing2329 Not quite, though that style of event-loop control is also useful. I'm talking about just a more advanced way of using interrupts and timer peripherals.

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

      Is this scheduling?

    • @harveyxing2329
      @harveyxing2329 Рік тому +1

      @@jeremoisde9928 looks like some form of cooperative scheduling, with the cpu interrupting for a task switch

    • @ZincSpray
      @ZincSpray Рік тому +1

      Problem with interrupts with slow processors like 6502 here, is that in a high speed communication the actual interrupt takes tens of cycles already. Interrupt, saving/restoring registers and returning from there all take their time. So in a worst situation, cpu is 'stuck' at re-firing the same interrupt all the time. It gets even worse if both send/receive are firing their own interrupts. (Have to remember there are only 2 interrupt lines in 6502 chip, IRQ and NMI, and they have priorities.)

  • @sirnukesalot24
    @sirnukesalot24 Рік тому +32

    Ben, sometimes I think your in-video mistakes work out to being great teaching tools. I don't think anyone here will ever forget that 9600 baud works out to 104 microseconds per bit for the rest of our lives 😁

    • @dbuezas
      @dbuezas Рік тому +4

      Haha so true!
      Btw, in case you didn't realize, the 104us comes from 1s/9600 (that's what bauds mean)
      The exact value is 104.16us

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

      @@dbuezas Yeah baud means symbols per second, so if your symbol is a bit then 9600 baud just means 9600 bits per second

    • @dbuezas
      @dbuezas Рік тому +1

      @@vurpo7080 i didn't know it was a generic "symbols per second". I thought it was "bits/s including error detection and control signals". Thanks!

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

      @@vurpo7080 That's a great catch, actually. It's not just that the symbol could be more than one bit, a quick search showed a way in which an entire nibble (one digit of hexadecimal) can be jammed into the space of one pulse using a complex signal. I doubt that's the limit, either.

    • @paulstelian97
      @paulstelian97 Рік тому +1

      @@sirnukesalot24 I believe modern fast Ethernet and Wi-Fi can go as far as one of 2048 options jammed in a single baud (11 bits per baud, though probably 3 of them are error correction)

  • @BrainSlugs83
    @BrainSlugs83 Рік тому +1

    Funny story -- I encountered the same microsecond/millisecond issue recently. -- I found a bit of old Amiga keyboard interface code that worked with Microcontrollers (i.e. to make a bluetooth keyboard out of an [un]dead computer); and something just didn't seem right... like it seemed like it was missing keystrokes at regular intervals... -- I think most people just assumed that's how those keyboards are? -- But it turns out, there was a bit of protocol code that was calling a delay_milliseconds, but it should have been microseconds (according to the data sheet even) -- I changed that bit of code and everything started working great, no more dropped keys! :D

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

    Finally someone worthy, explained like no one ever 🔥❤️

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

    I remember from back in the day, that RS-232 had rise and fall time restrictions. With some cables and some devices you needed to add a tiny bit of capacitance (330 pF would usually do it) between the transmitter output and ground, or you'd be able to hear computer hash on every AM radio on the block. I don't know if Maxim loads the outputs of the MAX232 with an internal cap, and frankly I'm too lazy to pull up the data sheet right now. But it might be something to be aware of.
    Then again, there's probably enough stray capacitance around the breadboard that you don't need to worry.

    • @bob4702
      @bob4702 Рік тому +1

      Yup, slew rate is specified: SR Driver slew rate RL = 3 kΩ to 7 kΩ, see Figure 4 30 V/μs

  • @phrenia7494
    @phrenia7494 Рік тому +1

    Another top quality video. Cant wait to watch it.

  • @AndersNielsenAA
    @AndersNielsenAA Рік тому +4

    Oh Ben, all those newfangled ‘C02 instructions are making me dizzy.. tsb, trb, ror! 1975 called - “that’s not a 6502” 😅

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

      Well, most 6502s had ROR :p just not the very very first ones

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

    You outdid yourself today, Sir thank you so much.

  • @eliotmansfield
    @eliotmansfield Рік тому +3

    and ironically his rs232 interface probably has a max232 inside it converting back to ttl

  • @waltermeerschaert
    @waltermeerschaert Рік тому +8

    I write programs for a living and the projects are all complicated and deep. They are also existing on several layers of abstraction at the same time, from very high level libraries to very low level numeric type implementations (think 128 bit floating point). Even this video (awesome, as always), which feels like bare metal tinkering compared to my daily work, is actually already several steps up the ladder of abstraction. You aren't making logic circuits from discrete components, each chip represents hundreds or thousands of such components. In actual fact, the abstraction goes all the way down, as levels of reality are based on the abstraction of realized properties in emergent realms arising from the generalized increase in complexity at each layer. As far as I know, this doesn't stop until you get to the "spacetime foam", which might itself be some from of reality arising from still more detailed underlayment, and itself is just an effect.
    Whoa.

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

      Upon reflection, I wonder if it goes up forever as well - once the complexity arises, the new level of abstraction emerges from the chaos. Humans aren't the limit, not even on earth. None of this abstraction would be possible if the complex human interactions among billions of us didn't exist first. The abstract layer of the group undoubtedly leads to interactions between groups of humans, and then that complexity leads to further abstraction as long as it keeps being complicated.

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

      Whoa indeed 😳

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

      Upon furhter reflection, it is the groupings of items throuout the universe, then groupings of universes??? then more groupings of shit, then some fat guy sitting in his mothers basement.

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

      Sounds like someone’s been watching PBS Space Time :)

  • @stevedonkers9087
    @stevedonkers9087 Рік тому +3

    I imagine it'll be the WDC version of the 65c51 UART chip. I used it for a bit with my SBC but I've gone with the MAX3100 SPI UART and just bitbanged the SPI which was a great learning experience on it's own, but now I just can't go back to the older chips.. :)

  • @Lampe2020
    @Lampe2020 8 місяців тому +1

    I love the increasingly angry "104 _micro_ seconds" text whenever you say "104 milliseconds" XD

  • @brenocoutinho4512
    @brenocoutinho4512 Рік тому +1

    Looking forward to see a video on I2C someday
    Cheers!

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

    Really appreciate the videos and the level of explanation. Keep it up ❤

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

    Awesome video! Thank you 😍

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

    Thanks again Ben; another great video.

  • @SB-qm5wg
    @SB-qm5wg Рік тому

    Your board designs are so cool.

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

    i dont even know whats happening in this video but i'm always excited for benny boy's new videos nonetheless

  • @FixedUntilBroken
    @FixedUntilBroken Рік тому +1

    That keysight scope is nice. I use a tek mdo3034 at work and have siglent gear at home but it's tempting to go to keysight at home.

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

    Great video, great explanation of RS232 serial. Thankfully I have been able to use "TTL serial" for most of my projects, which is far simpler to imp!cement.

  • @MattyEngland
    @MattyEngland Рік тому +1

    Nice. Always love your vids.

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

    Thank you Ben! 😍

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

    wow.... the "conservative in what you do, liberal in what you accept from others" hit a nerve with me! This reminds me of the ancient Stoic principle and quote from Marcus Aurelius... "Be tolerant with others and strict with yourself." Very cool. Thanks for including nuggets of learning like that!

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

    for the TI-83 and related calculators (expect the newer TI-84s) have a Link port, and the serial protocol across it works no matter how fast either calculator is

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

    Great! Liked the quality of the video.

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

    Awesome video! Thank you

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

    When Ben posts a new video, I feel young again.

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

      When Ben posts a new video, I remember why I love computers (now let's head back to javascript for real life stuff 😞)

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

    Thank You.

  • @BAgodmode
    @BAgodmode Рік тому +1

    Instructions unclear, Cheerios stuck in breadboard. I don’t think it’s interfacing, I might have used too much milk.

  • @paulstubbs7678
    @paulstubbs7678 Рік тому +1

    An easier way is to buy an RS232 interface board with built in level converters, they are kind of targeted at the Arduino fraternity, however that does not matter, they talk 5V for direct connection to your VIA

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

    looking forward to the UART video!

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

    Oh my god!!! Ben Eater's videos drop like Marvel movies!! Blockbusterrrrr!!!!!!

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

    RIP Jon Postel a true pioneer in computing.

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

    This is Excellent.!

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

    TSB and TRB eh? Fancy schmancy new 6502 :D

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

    I'm currently watching this video on my TV and I'm some distance away from the TV.
    When Ben brought the paper in at 4:34, I thought he showed us some APL code, until I realised that it were words some moments later XD

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

    One of the frustrating things in my job is to match a RS-232 to USB serial interface to the equipment I'm trying to interface. My job has many devices, both operational and test equipment, with craft terminals and other old data ports that require it. As Ben stated in the video, manufacturers of the interfaces very often cut corners, both in the adapter and in the equipment.

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

    UA-cam dumped all my recommendations and all so I never got this video on my feed

  • @eanerickson8915
    @eanerickson8915 Рік тому +1

    If you put BASIC on a ROM so that I could use it with the serial port, I would buy this.

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

    Holy I was just catching up on this series yesterday and wanted more can there be more than one video a month please?

  • @N0Xa880iUL
    @N0Xa880iUL Рік тому +1

    The king has returned.

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

    Just when I thought I was done building the 6502 computer.

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

    I use 5V levels using a PIC program to read (with a 10K resistor in series) and talk (with a 1K resistor in series) to RS232.

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

    Parabéns Ben seus vídeos como sempre são magníficos !!

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

    Outstanding!

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

    no way.. i finished watching series on 6502 about a week ago and now there is more

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

    I've been trying to sell a MAX232 like chip on E. Bay for months... I wonder if the release of this video might prompt a sale. ;) Great video as ever.

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

    Great videos. Glad to see a new one. Do you have any information or links describing your camera and lighting setup? I tried to make similar videos but I can’t come near the quality and sharpness of your setup.

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

    That cliffhanger at the end, oof

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

    Ah...the good old days of programming the 6502 for all kinds of embedded applications. Even more enjoyable was developing a Real-Time Executive for the 68HC11 microcontroller. I miss those days.

  • @AK-ep8ok
    @AK-ep8ok Рік тому

    Toady I celebrate 🎉 new video hurrah!!

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

    The legend is back!

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

    Oh yes the content that makes me love engineering

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

    well done

  • @jeffreymorris1752
    @jeffreymorris1752 Рік тому +1

    So do USB to Serial adapters have a charge pump as well? Or are those what you were talking about that abuse the protocol with 5V and 0V?

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

    Yay! He’s back!

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

    Nice, was waiting for this

  • @banedon8087
    @banedon8087 Рік тому +5

    Good video. I wonder if Ben is going to discover the bugs in the WDC 65C51S the hard way.

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

      Yeah ... that bug .... made me waste 6 months of my life because I was looking at the first revision of the datasheet which did not mention it...

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

      @@amiga8737 I thnk there are several. Is the one that you ran into the transmit-register-empty flag one?

    • @argoneum
      @argoneum Рік тому +5

      Third try, apparently YT blocks any mention on 6502 forum. Ordered some of those chips, then started reading the forum, and ended up using different UART chips, out of which PC16552 was the better one. Hope this time the comment goes through :)

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

      @@argoneum Yep this one madee it 😁. I think it's that it's a URL.
      Yes, people seem to go for the PC16552 or the SC28L92 (or TI equivelent).

    • @amiga8737
      @amiga8737 Рік тому +1

      ​@@banedon8087 Yes, as far as I remember there are two bugs, the one you mentioned and also the fact that the chip does not generate parity... I really wonder if they ever tested their chip 🤔...

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

    It will be interesting to see if you come up with a smart way to avoid the transmit bug (Sorry WDC "feature" ) on the W65C51 and to avoid having to use a delay as suggested by their Datasheet.