RS232 interface with the 6551 UART

  Рет қаралды 198,183

Ben Eater

Ben Eater

Жыл бұрын

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, An Dương, Anthony Weems, anula, Ben, Ben Cochran, Ben Williams, Bill Cooksey, Bill Watkins, Binh Tran, Богдан Федоров, Bradley Stach, Brian Haug, Burt Humburg, Carl Fooks, Carsten Schwender, Chai, Chris Anders, Chris Lajoie, Chris Sachs, criis, Cristi Cobzarenco, Daniel Jeppsson, Daniel Pink, Daniel Tang, Darrell Burgoon, Dave Walter, David Clark, David Cox, David Dawkins, David House, David Sastre Medina, David Turner, Dean Bevan, Dean Winger, Deep Kalra, Dennis Henderson, Dennis Schubert, Dilip Gowda, Dirk Sperling, Dmitry Guyvoronsky, Dušan Dželebdžić, Dustin Campbell, Dylan Speiser, Dzevad Trumic, Emilio Mendoza, Eric Dynowski, Erik Broeders, Erik Granlund, Ethan Sifferman, Eugene Bulkin, Evan Serrano, Evan Thayer, Eveli László, EvinSaysMarxWasRight!, Florian Bürgi, fxshlein, George Miroshnykov, ghostdunk, GusGold, Hailey, Hovis Biddle, Humberto Bruni, Ingo Eble, Ivan Esparza, Jacob Ford, James Beldock, James Capuder, Jared Dziedzic, Jason Bowen, Jason DeStefano, Jason Grim, Jason Thorpe, JavaXP, Jaxon Ketterman, jemmons, Jeremy Cole, Jesse Miller, Jim Kelly, Jim Knowler, Joe Beda, Joe Pregracke, Joe Rork, Joel Miller, Joey Murphy, John Hamberger jn., John Henning, John Meade, Jon Dugan, Jonn Miller, Joseph Portaro, Jurģis Brigmanis, Justin Graziani, Kai Wells, Kefen, Ken Paul, Kennard Smith, Kenneth Christensen, Kyle Kellogg, Lambda GPU Workstations, László Bácsi, Lithou, Lord Dorogoth, Lukasz Pacholik, Marcos Fujisawa, Marcus Classon, Mariano Uvalle, Mark Day, Martin Noble, Mats Fredriksson, Matt Krueger, Matthew Clifford, melvin2001, Michael Koreshkov, MICHAEL SLASS, Michael Tedder, Michael Timbrook, Michael Weitman, Miguel Ríos, mikebad, Mikel Lindsaar, Miles Macchiaroli, Muqeet Mujahid, NacOJerk, Nate Welch, Nicholas Counts, Nicholas Moresco, Nick Chapman, Oli Homer, Ori Shamir, Örn Arnarson, Paul Heller, Paul Pluzhnikov, Pete Dietl, Phil Dennis, Philip Hofstetter, ProgrammerDor, Ralph Irons, Randal Masutani, Randy True, raoulvp, real_huitz, ReJ aka Renaldas Zioma, Ric King, Rick Hennigan, Rob Bruno, Robert Diaz, Robert Keown, Robey Pointer, Roland Munsil, Sagnik Bhattacharya, Sam Sturgis, Scott Gorlick, Scott Holmes, Sean Bright, Sean Patrick O’Brien, Sergey Kruk, Shane Mulcahy, SonOfSofaman, Spencer Ruport, Stefan Nesinger, Stephen Kovalcik, Stephen Riley, Steve Jones, TheWebMachine, Thomas Eriksen, Tim Oriol, Tim Walkowski, Tim Wheeler, Tom, Tom Smith, Tyler Latham, Usseod, Vincent Bernat, Warren Miller, Wim Coekaerts, Yee Lam Wan

Пікірлер: 372
@MahBor
@MahBor Жыл бұрын
It's a great day when Ben Eater uploads
@ck84199
@ck84199 Жыл бұрын
What is he eating though?
@dennis8196
@dennis8196 Жыл бұрын
​@@ck84199 chips
@MahBor
@MahBor Жыл бұрын
@@ck84199 Silicon wafers, similar to those used in ICs
@gogs1606
@gogs1606 Жыл бұрын
babe wake up, ben eater posted a video
@Jason62391
@Jason62391 Жыл бұрын
​@@ck84199 bread board
@Jenny_Digital
@Jenny_Digital Жыл бұрын
A word of caution regarding the W65C51S parts. There’s a horrific silicon bug where the transmit buffer empty bit is stuck. Earlier versions of the datasheet mention this but the current version tries to sugar coat this issue. Shame there’s nobody else (that I’m aware of) making this otherwise very very easy to use part.
@NicolasGasnier
@NicolasGasnier Жыл бұрын
That made me scratch my head for a long time until I found that info in forums. If I remember correctly, that makes interrupt driven data transfert useless. We are stuck with polling mode.
@Jenny_Digital
@Jenny_Digital Жыл бұрын
@@NicolasGasnier more precisely, not only is Interrupt driven mode useless, but polling won’t tell you either. You have to wait however long it takes before just going ahead and transmitting the next byte.
@rafalklepinski7372
@rafalklepinski7372 Жыл бұрын
Good to know. Might opt for the USB to UART cable using FTDI components to bypass this issue?
@argoneum
@argoneum Жыл бұрын
And older Rockwell parts didn't have this bug… Hard to find a currently produced chip to replace the W65C51 though.
@eDoc2020
@eDoc2020 Жыл бұрын
@@rafalklepinski7372 That wouldn't help. The problem's with the UART itself, not the level conversion side.
@patrick_jane2164
@patrick_jane2164 Жыл бұрын
Only Ben can make a 20 min video fly by as if it was a 2 min video
@Q1745
@Q1745 Жыл бұрын
This 6502 project series is really taking me down memory lane! I got started with a Heathkit H8 that was completely hand soldered, this was around ‘78 and I was in 7th grade. Me & pops build it over a weekend. My school chums had an Apple II which ran at 1.5MHz and my 8086 based H8 ran at 2MHz. Oh the ribbing they got for their “slow computer!” Lol! I upgraded the H8 with a Z80 and software programmable clock speed of 2 or 3MHz. No video or hard drives, just a vt100 terminal and dual 100K hard sector floppies. Could choose CP/M, HDOS, or UCSD Fortran operating systems. Had to write all of my own software and had assembly, Basic, Fortran and C languages to choose from. Great memories, thanks Ben!
@RogerBarraud
@RogerBarraud Жыл бұрын
The H8 was 8080A-based, not 8086.
@Q1745
@Q1745 Жыл бұрын
@@RogerBarraud my bad, yes 8080. I even tried to make sure I didn’t put 8086 when I posted. 🙄 Funny thing, I could use the C compiler available after the IBM 8086 based PC came out. About 95% success rate.
@erichobbs4042
@erichobbs4042 Жыл бұрын
I really appreciate Ben's teaching style of showing the simple or nieve solution first, and then diving into the more efficient and reliable solution. You get an idea of how the thing can work at a basic level, before showing you the limitations of that implementation and then showing the better way.
@wbfaulk
@wbfaulk Жыл бұрын
I remember dealing with all of these address locations when setting up hardware on pre-PCI, pre-Plug-And-Play PC clones, making sure you didn't have conflicts between your 16550A UARTs and your Adlib sound card and your whatever else. I had a solid _functional_ understanding at the time, but it's fascinating to learn what all of this stuff really meant. I would have loved for these videos to have been available to me back then.
@ivarnordlkken8082
@ivarnordlkken8082 Жыл бұрын
I had the same task when I hooked up 2 6821 to a Z80 via the edge-connector on an Amstrad computer.
@BillySugger1965
@BillySugger1965 Жыл бұрын
Ben the little triangle within the device block more usually means the pin is an edge triggered input.
@RobertMilesAI
@RobertMilesAI Жыл бұрын
Excellent stuff. I kind of wish you'd left the mistake in place and tried to use the system though. I think there's a lot of value in that, for us to look at the weird behaviour and try to figure out what might be causing it, and to see how the process of debugging and troubleshooting this kind of thing works. I can imagine people getting one of your kits, hitting this kind of problem and then being totally stuck and discouraged because they haven't seen anyone successfully work through a situation like that
@iabervon
@iabervon Жыл бұрын
Someone pranked Ben Eater by sending him a Big Endian UART, rather than the standard little endian kind? (Not really, since the status registers would also be backward, but it'd be so tempting to guess the serial data was configured backwards rather than all the parallel lines being wrong.)
@user-yv4ow4ev2b
@user-yv4ow4ev2b Жыл бұрын
I was really looking forward to this! Thank you!
@alanamcdonald5346
@alanamcdonald5346 Жыл бұрын
I always appreciate the little mistakes that are left in, and showing the fixes. Your videos are wonderfully soothing and informative, like Mr. Rogers or Bob Ross teaching electronics.
@MultiPtest
@MultiPtest Жыл бұрын
Thank you so much for clear and valuable lessons.
@angelosnegkas
@angelosnegkas Жыл бұрын
Amazing content as always! Thank you!
@gregorymccoy6797
@gregorymccoy6797 Жыл бұрын
I love these videos. My breadboard routing never looks as good as yours.
@derekzhu7349
@derekzhu7349 Жыл бұрын
Its great seeing you upload again
@anon_y_mousse
@anon_y_mousse Жыл бұрын
I'd love to see how neatly you would solder all of these chips onto a perf board. Clearly your wire game is top notch.
@alexwolfeboy
@alexwolfeboy Жыл бұрын
There is never enough Eater videos!! This series is awesome to see how everything’s built together.
@paulheitkemper1559
@paulheitkemper1559 Жыл бұрын
This takes me back to my computer engineering grad school days back in the early 90's. Good times.
@JohnDrummondVA
@JohnDrummondVA Жыл бұрын
I can't wait to watch this. I knew wayyyy too much about serial connections back in the day. Kermit, SLIP, SLIrP, making clamshell connectors and putting the pin in the wrong place... GOOD TIMES!
@RogerBarraud
@RogerBarraud Жыл бұрын
Null modems, guessing games around DCD, CTS, DTR, DSR... yup, fun and games 🙂
@PeterWillard
@PeterWillard Жыл бұрын
@@RogerBarraud In my early work days, when everything was still RS232 versus Ethernet, I was the goto guy on-site when folks had trouble connecting device 'X' to device 'Y'. Lot of good that skill does me now... lol. Unless you are building a project like Ben's... and then it all comes back. Hmmm... Where is my HP4951C?
@stevedonkers9087
@stevedonkers9087 Жыл бұрын
I hooked up my 6551 to the 6522 chip to take advantage of the IRQ functionality. I've implemented my MAX3100 UART directly though. I understand using the WDC 6551 chip for teaching purposes but I highly recommend looking into other options.
@youcefassou1592
@youcefassou1592 Жыл бұрын
Yes ben keep us mesmerised thank u
@franklimmaciel
@franklimmaciel 11 ай бұрын
I like your videos a lot. It's my zen moment of attention.
@donprefontaine3237
@donprefontaine3237 Жыл бұрын
Finally! Got my hardware working at 0x7000, however the software does not work - not even loopback. My friend and I are looking forward to see how you handle it. Thanks, Ben.
@daviddawkins
@daviddawkins Жыл бұрын
For a moment there, was thinking...that's an expensive kit. I have only just woken up though
@aliceitc8380
@aliceitc8380 Жыл бұрын
​@@daviddawkins me too I was really confused 💀
@MAYERMAKES
@MAYERMAKES Жыл бұрын
​@@daviddawkins hah😂 same.
@starlii10
@starlii10 Жыл бұрын
It says on my app that this was posted 7 days ago, but the video was released 50 minutes ago... KZfaq is broken again. Yay.
@CraigNeth
@CraigNeth Жыл бұрын
@@starlii10 He probably makes it available to Patreon members early.
@artropad-ofc
@artropad-ofc Жыл бұрын
This type of videos need extreme research. Keep it up ben ❤
@blackpanda3771
@blackpanda3771 Жыл бұрын
Finally new video love your vids
@galnetdor
@galnetdor Жыл бұрын
back in the early 80's when my main computer was a TRS80-M1 I got into BBS's and used my cassette port to talk to the modem without a UART. I remember writing my own version of the terminal program (wanted to support more vt100 type codes than the Tandy one did) and it was very eye opening about how tight the timing had to be, and this was for the much slower 300 baud speed, which gave me 'nearly' but not quite enough time to refresh the screen. Figuring a way to scroll the screen in a 'multitasking' manner when you didn't have enough time to move the 1024 bytes that made of up the memory mapped screen, in the 1/300 of a second available. Finding the tech specs on the exact clock ticks each instruction required was a critical part of that project.
@loslos2937
@loslos2937 Жыл бұрын
It's a pity that this channel uploads so few videos, they are of great quality I love them
@nucspartan321
@nucspartan321 6 ай бұрын
Great video
@youssubernfissi5559
@youssubernfissi5559 Жыл бұрын
I was just seeing when you last uploaded and I was like "shit it is only a couple of weeks so he is not uploading anytime soon" but here you are spoiling us with frequent uploads
@kngod5337
@kngod5337 Жыл бұрын
the day ben eater uploads a video is a happy day
@jeffverplancke9568
@jeffverplancke9568 2 ай бұрын
Wish we had this instructional videos when I was playing with my Commodore 64. I got into industrial control in school and PLCs. Which was a good career but never really understood the component level stuff as far as processing goes. Thanks Ben for helping me understand.
@brouwereric644
@brouwereric644 Жыл бұрын
If only I could obtain the different WDC chips locally in South Africa.... With a non-functional post office, importing them are SO expensive via courier services. Great video as usual, thank you Ben.
@Kekimus
@Kekimus Жыл бұрын
I never really fully understand your videos but i try my best to rewatch it until I do
@cleverson_sa_
@cleverson_sa_ 11 ай бұрын
Fascinating!
@JTCF
@JTCF Жыл бұрын
Direct Memory Access is such a big word now for gaming but it probably was so common on these kinds of systems, wow.
@gower1973
@gower1973 Жыл бұрын
I think DMA became a thing in the 16bit era, not 8bit systems like this
@falksweden
@falksweden Жыл бұрын
DMA was a big thing with the Amiga in the 80's
@Stingpie
@Stingpie Жыл бұрын
you kinda got this backwards. DMA was uncommon for cheap microcomputers in the 80's, and nowadays, pretty much every single CPU comes with DMA.
@clonkex
@clonkex Жыл бұрын
DMA isn't Microsoft's DirectStorage API (which is the thing gamers care about), but perhaps DirectStorage makes use of some form of DMA.
@bobbyaremyshoes2233
@bobbyaremyshoes2233 Жыл бұрын
@@gower1973 8bit Gameboy Classic had DMA to transfer sprite data. But this console was released rather late, in 1989
@zvotaisvfi8678
@zvotaisvfi8678 Жыл бұрын
Thanks Again !
@willofirony
@willofirony Жыл бұрын
See guys, just when you thought it was difficult. Now all we need is to get Ben to take a look at our respective economies. This channel is pure paracetamol.
@taltaub
@taltaub Жыл бұрын
You are amazing!
@alberr_b0yyy
@alberr_b0yyy Жыл бұрын
The best thing when I see ben uploading
@Mr.Exquisite
@Mr.Exquisite Жыл бұрын
Not to forget the small 'n' prepended to a pin name also being used for active low pins :)
@spritefun9362
@spritefun9362 Жыл бұрын
YES!! Thank you so much, Ben. I have learned so much about computers through your series, things i just could not wrap my head around before now make perfect sense. Looks like we have a new 65c peripheral chip to play with, I had a nightmare getting the 65c02 and 65c22 in WDC form, had to get rockwell versions instead from ebay.
@YateyTileEditor
@YateyTileEditor Жыл бұрын
I've always found them to a be available on Mouser. Hopefully I wasn't just lucky but they've always been in stock when I checked.
@temp8420
@temp8420 Жыл бұрын
It's odd - technical but therapeutic, could listen for hours. Lyrical bytes
@realbyte2048
@realbyte2048 Жыл бұрын
excited for a new ben eater video
@sajjadanghooty2847
@sajjadanghooty2847 Жыл бұрын
WoW another Ben Eater's magic uploaded
@kevinjensen3056
@kevinjensen3056 Жыл бұрын
Hi Ben. I have been a hobbyist for almost 50 years and a professional electronic engineer for almost 35. I have enjoyed your videos because they go right back to bare bones. I use MCUs these days but I wonder if I would be able to understand embedded issues as well as I do, if I had not been a professional learning through the era of MPUs and discrete peripherals. While I am loathe to make a criticism as small as this one is, I'd like to point out that it is not a good idea to tie two pins of a NAND or NOR gate together to realise an inverter. The reason is that the internal propagation time to each leg of the gate may vary in time, if only by pico-seconds. This can result in a glitch during transitions. Always best to tie one leg of a NAND gate high and use the other as the input to the inverter. That way there can be no race condition. Likewise, when doing the same with a NOR gate, tie one leg to ground and use the other leg as the input to your inverter. I watched your peripheral driver videos for the USB, the I2C & the SPI bus. Having written drivers myself, I felt you explained these very well. If you have have time perhaps you could try the 1-wire bus. I have never had the need to write a driver for these but there are still plenty of peripherals for these such as RTCs, memory devices and sensors such as the ubiquitous DS18S20 temperature sensor. Keep up the good work👍
@kvadratbitter
@kvadratbitter Жыл бұрын
A spurious high/low on the order of ps doesn’t matter in these asynchronous control lines working on chips with 10s of ns hold times on a 1 MHz system. There’s a much bigger timing issue if that’s a worry: some chip select line is direct from address line a15, some other has a 1 gate delay, and another has 2 gate delays. Also the clock signal distribution with different length signals creates a clock skew, perhaps on the order of ns. And of course the whole no-signal-return-path issue. Tying one input to high/low would lower power consumption for CMOS chips though. Ugh, I dislike how snarky I come across writing this, sorry.
@ExitUnknown
@ExitUnknown Жыл бұрын
Wake up babe new Ben Eater video dropped
@mumiemonstret
@mumiemonstret Жыл бұрын
Amazing how many ways there are to notate active low signals... I've never encountered the B but quite often one that you didn't mention: a lower-case n after the signal (like CSn). For "negative", I presume. Also, I think that the triangle that you mention denotes a clock input, or maybe generally any edge-triggered input.
@RogerBarraud
@RogerBarraud Жыл бұрын
'n' is usually a prefix. There's also the '*' convention (usually a suffix IIRC). I usually use the n-prefix for my own stuff... it preloads my mind with the idea that the following thing is inverted... rather than modifying something that I first read as uninverted 🙂 YMMV...
@htyvty9981
@htyvty9981 Жыл бұрын
Fantastic
@abcrtzyn
@abcrtzyn Жыл бұрын
Absolutely perfect timing. I just got the MAX232 chip in yesterday, and was about figure out the the uart on my own today. Super excited.
@joaovitormatos8147
@joaovitormatos8147 Жыл бұрын
If you've posted it tomorrow, would it be Ben Easter?
@desertfish74
@desertfish74 Жыл бұрын
Thanks for the chuckle
@svilen2006
@svilen2006 Жыл бұрын
Thanks
@DMadHacks
@DMadHacks Жыл бұрын
I once had a USB port on my laptop stop working; I think it was because of a serial killer...
@ke9tv
@ke9tv Жыл бұрын
And my wife passed me my breakfast through the pass-through over the kitchen counter. It was a cereal port.
@ivarnordlkken8082
@ivarnordlkken8082 Жыл бұрын
@@ke9tv LOL!!!
@paperstars9078
@paperstars9078 Жыл бұрын
I needed this 3 to 4 years ago, I struggled so much to make something work with uart and rs232
@protocolfree
@protocolfree Жыл бұрын
Hurray! It's a new video
@nimam3530
@nimam3530 Жыл бұрын
He is a legend.
@tonycook3460
@tonycook3460 Жыл бұрын
Great stuff as usual. I cant figure out when the video was posted but looks like recently from the comments. What comes next? Connecting monitor and keyboard?
@dbingamon
@dbingamon Жыл бұрын
They also used to use an asterisk for active low indication.
@Scyth3934
@Scyth3934 Жыл бұрын
yay new video!!!
@visweshbaskaran3169
@visweshbaskaran3169 Жыл бұрын
Hello there! I really appreciate the content you post as a embedded systems grad student, it would be helpful, if you can get some videos on communication protocols!
@up2tech
@up2tech Жыл бұрын
Ben Eater rules!!!
@r0binkanters
@r0binkanters Жыл бұрын
Hey Ben, love the video, built my own computer based on your videos! Are you planning a video on I2C? Would be very interested in that!
@AmaanHasanDilawar
@AmaanHasanDilawar Жыл бұрын
Awesome
@barmetler
@barmetler 4 ай бұрын
With this amount of devices, I would do this: as you described in a previous video, use an eeprom as a logic gate. Input all address lines into the eeprom, and the output data lines all function as chipselect lines for all of your devices. This will scale a little better, and will also prevent situations in which multiple devices are fighting over the bus!
@ke9tv
@ke9tv Жыл бұрын
New videos from Sharman and Eater on the same day, wow! Ben looks too young to remember things like the Western Digital WD1402 or Intersil IM6402 - and should account himself thankful! (Using those was a little squirrely - but certainly beat tweaking trimmers for the LC-controlled receivers and transmitters that preceded them! I remember the Western ad in places like Scientific American: "We uncoiled the data transceiver!" (No inductors in their design...) I did a software UART on one of the smaller Atmel devices not too long ago (short on I/O pins and board space), but simplified things some by using a 9.216 MHz crystal so that the CPU clock divided down nicely to the bit rate. (Still a PITA.) The PIC didn't need to be doing anything else when it was exchanging data, which were just 18-byte messages, so they were pretty quick. (Should probably just have put a CPU core and a UART on a FPGA)
@michmart9261
@michmart9261 Жыл бұрын
Who's Sharman may I ask?
@sirnukesalot24
@sirnukesalot24 Жыл бұрын
James Sharman runs a similar channel where he's been building an 8-bit pipelined CPU from scratch. He also uses surface-mount components on in-home designed PCBs. Ben gets you to where you understand it, James runs the advanced class.
@ciano5475
@ciano5475 Жыл бұрын
@@sirnukesalot24 Also check out FoxTech and his 486 Breadboard Computer.
@sirnukesalot24
@sirnukesalot24 Жыл бұрын
@@ciano5475 Yeah, I saw that. I'm already following FoxTech just like you are. I think most of us knew he was going to need that fourth bus transceiver no matter what.
@david02251
@david02251 Жыл бұрын
This are great video's
@michaelhaardt5988
@michaelhaardt5988 Жыл бұрын
The 6551 appears to be easy to use, but they were made by multiple vendors and each version has different requirements to the clock circuit and often those do matter. Feeding it with an external oscillator resolves that. Its timing requirements are easy to meet when driving it with a 6502, but trying to use a different CPU may be difficult and trigger weird bugs, like a stuck transmitter ready bit. Interestingly it is always stuck for the W65C51N and even documented as such.
@Lampe2020
@Lampe2020 3 ай бұрын
You could of course prevent the 7000-7FFF address waste by checking the two conflicting bits with an AND gate, if it returns 1 you disable both the VIA and the UART to enable another device you may later add into that address space to be enabled on its own.
@hansklaus6860
@hansklaus6860 Жыл бұрын
"RS232 interface with the 6551 UART" ah yes, those truly sound like some symbols I'd enjoy!
@mohamed745600
@mohamed745600 Жыл бұрын
It's actually a vibe whenever you post a new video 😂
@debarjo
@debarjo Жыл бұрын
Wooohooo! Movie day!!!!!!!
@m1geo
@m1geo Жыл бұрын
I like where this is going! 😁
@goofyrulez7914
@goofyrulez7914 Жыл бұрын
I had to work on a microcontroller that we had to "bit bang" serial comms... you're right, it's very touchy.
@gazehound
@gazehound Жыл бұрын
Ben Eater uploads at the same time as James Sharman? Today is my lucky day
@JeremySpidle
@JeremySpidle Жыл бұрын
Memory Mapped I/O, bro!
@futilitymen
@futilitymen Жыл бұрын
You ever plan on covering HDMI? BTW love your content!
@sjair6526
@sjair6526 4 ай бұрын
Thumbs up!
@Mmouse_
@Mmouse_ Жыл бұрын
That mistake in the wiring you caught... Heh. A while ago I mounted a rpi in a cabinet that contained contactors, sometimes when they switched they generated an rf pulse big enough that the rpi would detect it and include it as an input. The damn thing worked fine on my desk, in the cabinet... It went haywire. Eventually rather than trying to add shielding or any of that and since the pulsed were so short in duration I just modified the code not to accept inputs that happened faster than a certain time frame. Biggest head scratcher I've had for a while.
@melkiorwiseman5234
@melkiorwiseman5234 Жыл бұрын
I bought a daisy-wheel printer for a "parts" price because it was continually "blowing" an on-board fuse. I took the fuse wires out to an external fuse holder and began experimenting. After a while, I realised that it was blowing the fuse whenever the AC powered cooling fan switched off after cooling down the print head following a long session of printing. I added a mains-rated 0.01 microfarad capacitor across the fan and suddenly there wasn't a problem. Sold the printer later for a huge profit.
@andybridden1018
@andybridden1018 3 ай бұрын
A great video and very instructive. I have some of the original 6502 books from Sybex. Quick question - the schematics (on the website) have SB140 diodes on the IRQ lines, are these needed?
@Line-Ways
@Line-Ways Жыл бұрын
Hooking my brain up to that would get me fried More seriously we need to discover the max232 max233 max2323 chips and limitations in the next video and hooking up non voltage tolerant devices to rs232
@mimoelectronics1557
@mimoelectronics1557 Жыл бұрын
Super bhai
@garydunken7934
@garydunken7934 Жыл бұрын
Ben's new video out, get the popcorn out. What.. only 22mins? :(
@SomeAndrian
@SomeAndrian Жыл бұрын
This is great. But at this point maybe a decoder for the 4 most significant bits would be the way to go
@TheWeepingCorpse
@TheWeepingCorpse Жыл бұрын
Would it make sense to use a 74ls138 now that the address decoding is getting more complex?
@MrWilliam932
@MrWilliam932 Жыл бұрын
I like how simple it it to do the memory decoding, in the Z80 is a bit harder but it has the advantage that it activates two control signals, one to access memory and one to access IO, In my case for the memory decoding I use a 74HC139
@melkiorwiseman5234
@melkiorwiseman5234 Жыл бұрын
The Z80 has the small advantage that you have 256 I/O ports on top of the 64K memory addresses and they don't share the same memory space. An undocumented feature of all Z80 CPUs (so far as I know it's all of them) means that you can also access up to 64K I/O addresses instead of only 256. The instruction OUT (C), A functions as OUT (BC), A which means that if you load a 16-bit address into the BC register pair and then use the OUT (C), A instruction, it will put the full 16 bits from the B and C registers out on the address bus. The same for the IN A, (C) instruction. Most hardware engineers never took advantage of this feature, either because they didn't know about it or because it was undocumented and they feared it might not be supported in some versions of the Z80.
@MrWilliam932
@MrWilliam932 Жыл бұрын
@@melkiorwiseman5234 Yeah I was aware of this, wich is great, but I don't know why they didn't directly say in the datasheet that user could access 64K IO addresses.
@ketoman4057
@ketoman4057 Жыл бұрын
@ben would you please recommend a course / uni I can attend to get half as smart as you in digital electronics? Second thoughts, I will become a patron and do your courses first, this is likely all the training I will need/want.... :) Brilliant content!
@renakunisaki
@renakunisaki Жыл бұрын
This is basically a simpler, larger version of s modern microcontroller. That's very neat.
@cheaterman49
@cheaterman49 Жыл бұрын
Great episode! I like the parallels that can be made between your simple addressing circuit and the disjointed address blocks it creates, to the same type of addressing when eg programming for NES! (it is a 6502 as well after all, haha) At 20:40 we can see your bus wiring is indeed getting untidy and hard to make sense of (even for you!), perhaps it's time you use the amazing trick with power-rails-as-bus you showed us for your computer-from-scratch series?
@gabecimoch2160
@gabecimoch2160 7 ай бұрын
You could also use one of those ram chips that has two interfaces that can be used at the same time. With it writing to side B while the rest of the system is on side A.
@lucky-segfault4219
@lucky-segfault4219 Жыл бұрын
Great video! The talk about bus arbitration got me thinking: is there a chip that basically halts the 6502 for a couple cycles while other chips request/write to the RAM? Or maybe something can be done with interrupts and a few gates? 🤔 I'm likely missing some edge case that complicates this, but it sounds fairly simple in principle
@wbfaulk
@wbfaulk Жыл бұрын
The 6502 has a Bus Enable pin, which, when low, causes the 6502 to set its address and data buffers and the read/write pin to high impedance.
@chitlitlah
@chitlitlah Жыл бұрын
The Atari 8-bit computers function along those lines, with the Pokey chip (mainly responsible for video) halting the 6502 when it needs to read memory. That's why you can't reliably judge time by processor cycles unless you disable Pokey (giving you a blank screen).
@sa3270
@sa3270 11 ай бұрын
I like the slash in front of the name if an overbar isn't possible. I've never seen the notation with B at the end.
@PhilipSmolen
@PhilipSmolen Жыл бұрын
Such nostalgia. I had to write a UART controller for an embedded system, long, long ago.
@dosnoir
@dosnoir Жыл бұрын
Quick question what, keyboard are you using it sounds amazing.
@meatpockets
@meatpockets Жыл бұрын
I once broke a Cisco router and ended up having to restore the OS over serial @ 9600 bps over xmodem. Man that was painful and it seemed to take all day.
@saberbasre8
@saberbasre8 Жыл бұрын
good sleeping video
@vincentdermience1137
@vincentdermience1137 Жыл бұрын
Ben, did you actually notice the cabling mistake [D0..D7] when you intended to bend the cables and felt they did not bend correctly? Like muscle memory triggered you into checking the order of the connections? It certainly looks this way when watching this (yet again) excellent video of yours.
@rafalklepinski7372
@rafalklepinski7372 Жыл бұрын
Love the series, starting to experiment again because of it! Question: Prolific or FTDI chipset for the USB to RS232 cable, which is 'best'? USB to UART cables are also abundant, 5v, 3.3v and other options. What brands/types are most reliable for using on a Win10/11 machine? My PCIe to breadboard adapter probably ain't coming so aiming for second best :)
@doctorbobstone
@doctorbobstone Жыл бұрын
I'm not familiar with the Prolific chip, but I've seen the FTDI chips get used a lot, both professionally and by hobbyists, so for me, it would be the default answer unless there was something special about the Prolific chip I needed. YMMV, of course.
@rafalklepinski7372
@rafalklepinski7372 Жыл бұрын
@@doctorbobstone Prolific PL2303 is, as the name might imply, everywhere and cheap, which isn't always the right choice. Amazon and my local computer shop carry them in abundance. I'm kind of leaning in the USB to UART direction, but for this particular project that's cheating :) Nonetheless having the UART 'taken care of' inside the adapter would ease design a smidge.
@doctorbobstone
@doctorbobstone Жыл бұрын
@@rafalklepinski7372 the fact that you consider it cheating makes me unsure of I understand what you're planning. I assumed you are talking about using an FTDI or Prolific chip/cable with the USB of your host computer to talk to your 6502 computer using serial. I don't see how that's cheating, hence my confusion... 😁 Anyway, if you've got a reason to use one or the other, go for it. I've just used FTDI cables a lot and seen EEs chose them for use in their designs and places like Adafruit selling them, and so on. Those are just data points, though. You might not find them relevant for your use case.
@rafalklepinski7372
@rafalklepinski7372 Жыл бұрын
@@doctorbobstone Cheating in the sense that the UART is already built into the adapted and outputting TTL voltages, presumably skipping adding the UART chip in the video :) Also now that I read comments down below about the various silicon bugs in the UART used in the video I'm skeptical of using it. In the future might use the UART version to send data from PC to discrete cmos combinational logic circuits to make calculations and return results to PC.
@johnm2012
@johnm2012 Жыл бұрын
​@@rafalklepinski7372 Unless I've completely misunderstood what you're talking about you still need the ACIA or UART chip on the breadboard. The TTL levels used by the FTDI USB cables connect directly to the Tx and Rx pins of the 6551, bypassing the MAX232 charge pump chip.
@doug7180
@doug7180 Жыл бұрын
I would have understood this in half the time if Ben was my teacher.
@cowasakiElectronics
@cowasakiElectronics Жыл бұрын
If you have lots of different IO ports what about using a small eprom to decode? I always planned and wanted to build my own computer (probably a Z80) but so many projects and so little time. So watching you doing it (and others) is the next best thing. Really enjoy your videos
@ke9tv
@ke9tv Жыл бұрын
No need for an EPROM - address decode is pretty simple. Ben just didn't want to spend the board space on a demux and address comparator. In the old-school TTL he's working with, it's still just a 2-package solution.
@ke9tv
@ke9tv Жыл бұрын
@@jayneatkinson2747 Yeah. The people who try to replicate 1970s minicomputers with modern IC's tend to overlook that, but the DEC, Data General and Wang machines all had PALs (no GAL's yet!) here and there. Of course, the simple GALs are all going obsolete fast. I probably need to get tooled up sooner or later on the bigger CPLD's even though they seem like total overkill.
@kvadratbitter
@kvadratbitter Жыл бұрын
A single ‘138 would be faster and use less board space than the current NAND solution, without adding any complexity IMHO.
@vdubjunkie
@vdubjunkie Жыл бұрын
Your passion for this "ancient technology" never gets old. I'm so glad you're seeing this through for/with us!
@TheGrezly
@TheGrezly Жыл бұрын
Dear. thanks for the video.... may I ask what schematic tool you are using to draw those diagrams?
@ReneSchickbauer
@ReneSchickbauer Жыл бұрын
I wonder if you could (at a low baud rate) interface the ACIA with a tone generator and tone detector to create a simple tape interface (or transmit/receive via other audio links like telephone or radio). I think you could do it with a couple of 555 timers.
Fixing a hardware bug in software (65C51 UART)
24:50
Ben Eater
Рет қаралды 190 М.
Arduino Serial Communication using UART
15:33
BINARYUPDATES
Рет қаралды 154 М.
Super gymnastics 😍🫣
00:15
Lexa_Merin
Рет қаралды 99 МЛН
⬅️🤔➡️
00:31
Celine Dept
Рет қаралды 36 МЛН
Cute Barbie Gadget 🥰 #gadgets
01:00
FLIP FLOP Hacks
Рет қаралды 61 МЛН
KiCad 6 STM32 PCB Design Full Tutorial - Phil's Lab #65
1:40:06
Phil’s Lab
Рет қаралды 553 М.
Reliable data transmission
43:54
Ben Eater
Рет қаралды 1,6 МЛН
Hardware interrupts
27:36
Ben Eater
Рет қаралды 588 М.
The RS-232 protocol
26:10
Ben Eater
Рет қаралды 820 М.
How does n-key rollover work?
37:20
Ben Eater
Рет қаралды 237 М.
Running MSBASIC on my breadboard 6502 computer
36:53
Ben Eater
Рет қаралды 197 М.
Hacker's Guide to UART Root Shells
17:40
Flashback Team
Рет қаралды 461 М.
Running Apple 1 software on a breadboard computer (Wozmon)
14:23
Reverse Engineering Game Code from the Neutral Zone
40:59
Retro Game Mechanics Explained
Рет қаралды 532 М.
Super gymnastics 😍🫣
00:15
Lexa_Merin
Рет қаралды 99 МЛН