Тёмный

Build an Arduino EEPROM programmer 

Ben Eater
Подписаться 1,2 млн
Просмотров 1,6 млн
50% 1

In this video, we'll use an Arduino Nano to make programming EEPROMs (e.g., 28C16) much easier. For more info on these EEPROMs, check out the previous video: • Using an EEPROM to rep...
Support me on Patreon: / beneater
All the code is available here: github.com/beneater/eeprom-pr...
Parts list for the programmer:
- 1x Arduino Nano (or most any other kind)
- 2x 74HC595
- 1x 28C16 EEPROM (should also work for 28C64 or 28C256)

Опубликовано:

 

4 мар 2017

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 1,1 тыс.   
@grhmsmth
@grhmsmth 7 лет назад
Excellent video but one minor comment on the code. Currently in the write eeprom routine you set all the arduino pins to outputs and then set the address and turn the output enable off. If you had previously read the eeprom then the output enable would be active and for a very short time the eeprom's data lines would be driving the bus and the arduino pins would be as well causing contention on the bus and possible damage. It would be better to turn off the output enable before switching the arduino pins to be outputs to avoid this.
@BenEater
@BenEater 7 лет назад
Good catch! You're absolutely right; that's something I overlooked. I just updated the code here to fix that issue: github.com/beneater/eeprom-programmer
@adamtoakley
@adamtoakley 7 лет назад
What are the negative side effects of doing that?
@grhmsmth
@grhmsmth 7 лет назад
Hi Adam, the problem is that if the output enable on the EEPROM is still active when you set the arduino pins to be outputs then both the EEPROM and the arduino will be trying to drive the bus at the same time. If one of them is trying to drive a zero on a particular bit and the other is trying to drive a one then you will effectively have a short from the positive power rail, through the output driver of (say) the EEPROM onto the bus and then down through the output driver of the Arduino to the ground rail. The output impedance of the devices can be quite low and so quite a large current can flow, this can cause the output drivers of both devices to be damaged. In the program this would only happen for a very short time (nanoseconds) and so the devices probably would be ok as there wouldn't be time for heat to build up, but if, for example, you were single stepping through the code, it could be in that state for quite some time and damage could easily occur. Best practise is to ensure there is only one device driving the bus at any one time.
@psyxodolby08
@psyxodolby08 6 лет назад
Hi Ben, Hi guys! I connected the LEDs to 74HC595. When I switch power ON or upload a sketch onto the microcontroller, the diodes light up (like running lights) for a short time and go out - is this normal? I added the OE (CE) control pin and set it to HIGH, but anyway led's light up, in this case as was expexted like a flash, not running lights
@zlac
@zlac 6 лет назад
Did you put resistors in series with LEDs? 74HC595 has balanced output and LEDs are basically short circuits for this chip.
@amber1862
@amber1862 7 лет назад
The Bob Ross of electronics returns.
@swyftwulfcoding1460
@swyftwulfcoding1460 7 лет назад
Just Browsing definitely
@SpentaofWater349
@SpentaofWater349 7 лет назад
There are no mistakes, just happy accidents. *burns 5 chips*
@ab0tj
@ab0tj 7 лет назад
Haha, I was thinking Bob Ross as well. So calming, and makes it look easy.
@Tadesan
@Tadesan 7 лет назад
"let's just put a transistor... right... there... that looks nice."
@WisdomVendor1
@WisdomVendor1 5 лет назад
That is a high level well fitting compliment.
@clearpath100
@clearpath100 4 года назад
Im a house builder and for years I have been trying to get my head around basic programing and electronics. I have collecting machine parts and pieces. I have many little projects that require electronic control. Every machine I have built required manual control. I really get it now and all my learning has suddenly come togeather. Thanks so much for putting such a good learning video togeather. Dale
@greenaum
@greenaum Год назад
Dude, build me a house and I'll help you with as many Arduinos as you want! Glad it's all clicked though, I think construction workers have to have logical, systematic minds, and that's all that's really needed to understand computers. If you can figure out in your head whether a structure is built properly or not, you likely have the faculties that develop into programming.
@cheesecake667
@cheesecake667 7 лет назад
I have never seen anybody putting dry Theorie better to life than you in ur Videos. It Shows me that the Things I get thaught in uni are actually relevant and thats the best Motivation there is. Cant wait for ur next Video! Greetz from Germany
@runforitman
@runforitman 5 лет назад
therealnightwriter I love how that’s all you noticed
@HelloKittyFanMan.
@HelloKittyFanMan. 4 года назад
You really like random capitals, don't you?
@uklu
@uklu 3 года назад
@@HelloKittyFanMan. In German all nouns get capitals
@HelloKittyFanMan.
@HelloKittyFanMan. 3 года назад
@@uklu: This isn't German, though, is it? So your point is...?
@uklu
@uklu 3 года назад
@@HelloKittyFanMan. he said he is from germany
@xZise
@xZise 7 лет назад
I'm currently watching through your playlist on building the breadboard computer and I have to say I really (!) like the style with the continuous commentary over the speed up parts. There are videos of people speeding up parts but they'll first finish the comment and then speed it up without any commentary then. Your style is more compact and fluent! If I had the endurance I would probably try to recreate your breadboard computer, because it actually has taught me a lot on how CPUs internally work. Sure modern CPUs are way more complicated but in their essence they work like yours, but in yours you can see how everything is ticking along!
@MrMikeHawkey
@MrMikeHawkey 5 лет назад
I really love the way that you explain the workings of the digital electronics. The progression from the d-flip-flop to the shift register was awesome. You make me feel like I can do this stuff myself.
@Tannerlegasse
@Tannerlegasse 7 лет назад
I love it! I imagine that programming EEPROM can get pretty complex with larger storage spaces, but this implementation really beats dropping 50 + dollars on a read / writer. AND you learn a lot. So thank you, from a beginner,
@systemred0944
@systemred0944 3 года назад
It’s ASMR, for computer nerds
@Allstreamer_
@Allstreamer_ 3 года назад
He really is great background noise
@NayaSapphire
@NayaSapphire 3 года назад
I sleep to him...
@NayaSapphire
@NayaSapphire 3 года назад
It actually is gibberish if you're not paying attention
@WistrelChianti
@WistrelChianti 3 года назад
I was going to post something along these lines
@yubakrarai
@yubakrarai 3 года назад
Asynchronous Master Reset?
@wizardpb
@wizardpb 2 года назад
Brilliant stuff, Ben, thank you so much - I can't imagine the effort all these videos took. For an older EE/CS engineer (like me!) they totally take me back to my roots. Especially this one: in 1978 I was in my last year as an undergrad at the Univ. of Sussex in the UK. My 3rd year project was - an EEPROM programmer. It took me a whole semester, mostly because I had to build the hardware from scratch (Z80 on wirewrap boards) and write the code in Z80 assembler (assembling it on a 64K Z80 CP/M machine!). Watching you do it in an hour or so really brings home just how far things have progressed. And yet - the principles of processor architecture are not so very different.... Thanks again!!
@leggo0
@leggo0 5 лет назад
It’s 2:30 in the morning as I watch this video and never have I been more excited for my last year as an EE undergrad to start
@phelie78
@phelie78 4 года назад
Fantastic video Ben, I’m only discovering it today... I wish I watched it - and the whole set of your videos - when I was building my first projects in the 80’s ! Keep up the great work !
@puspamadak
@puspamadak 3 года назад
Honestly speaking, I have never yet seen anyone else to explain these concepts in such minutely detailed way. Thanks a lot for all your hard work and time.
@JerryEricsson
@JerryEricsson 6 лет назад
Funny how computing has changed so much, yet this takes me back to my old C=128 days when I used to subscribe to COMMODORE and RUN magazines, each came with programs in machine code that you had to type in using a machine code monitor program (which you had to type in the first time you used it as well). I never really understood how that worked until now, but I spent many a day typing these codes in as my good wife set dutifully beside me reading the code as I poked them into the old machine, then saved them to a 5 1/4 inch floppy. I am loving this whole series, you make a wonderful teacher, I always thrived in college when the instructor showed, hands on how things worked, even studying the law, it was the hands on paperwork that drilled down into my brain to leave the data permanently written to my memory core.
@larrybud
@larrybud 2 года назад
My first computer was in 6th grade, a TRS-80 in the "computer lab" at school. This would have been 1980 or so. When we first got the thing we didn't even have a way to save any programs, so you'd just have to type it in again. My dad brought in a cassette recorder which we got working (most of the time) to save code.
@gregclare
@gregclare 6 лет назад
Hi Ben. Good educational stuff. But just thought I’d point out that the issue you saw with your incorrect read following write, is because you didn’t implement the (not)DATA POLLING, outlined in the 28C16 data sheet. ie. "The AT28C16 provides DATA POLLING to signal the completion of a write cycle.” DATA POLLING uses the inversion of the most significant bit (when a post write read is performed) to indicate the write busy state. Please also note that the other read bits (other than MSB), are indeterminate during the data polling busy state. So when you saw two subsequent reads of 0x81 after writing 0x2A, you’ll note the byte you wrote (0x2A) has a 0 MSB, and the read value (0x81) has a 1 MSB (ie. inverted 0 indicating busy state). The remaining bits of the 0x81 byte being indeterminate. By the third byte read, the busy state was complete, and the 3rd address data byte, and onwards, were then correctly retrieved. Likewise, the same can be seen with your second attempt to write 0x00, where you then read 0xAA bytes. Again, note the MSB is inverted from 0 to 1, to indicate data polling busy state. In summary: Although the Write Cycle Time is spec’d as max 1ms, you really shouldn’t just assume a 1ms delay will do the trick. The correct implementation would be to perform a read loop after a write, to poll for a non inverted MSB of the byte just written, to await busy state completion.
@BillAnt
@BillAnt 5 лет назад
Just wondering, instead of a read after a write, would writing the same address/byte twice back to back satisfy the timing requirement of the 1ms busy threshold? Basically use a second write cycle immediately after the first write as a timing padding instead of waiting for the MSB inversion, which as an added benefit would write every address/byte twice for reliability. Or waiting for the busy MSB inversion explicitly neccessary?
@melkiorwiseman5234
@melkiorwiseman5234 5 лет назад
@@BillAnt I'm only guessing but I'd say that all you'd do would be to reset the write cycle and you'd still have to wait just as long after the end of your second write cycle. Also, these EEPROMs automatically implement the correct write cycle timing internally so doing a second write would not make the data any more reliable than a single write. I'm guessing that if you hold the write pulse for much more than the maximum specified time, you will cause a second write cycle. All this would do is wear out the EEPROM a bit faster.
@BillAnt
@BillAnt 5 лет назад
Melkior Wiseman < Got ya... I was just thinking by sending multiple write cycles quickly back to back it would "pad" the timing threshold long enough, but if you're saying that will only reset the cycle, then that's probably not going to work (boo!). On the other hand holding the write pulse just a little longer might yield a a more reliable write (if anyone cares about it at all). I really love these "simple" digital circuits, since modern computers rely on the same basic principles, but of course vastly more complex.
@ZeroPlayerGame
@ZeroPlayerGame 5 лет назад
Came here for this comment, was not disappointed. Glad to see someone took the time to figure the spec out as well!
@jimmydansbo7847
@jimmydansbo7847 3 года назад
I changed my writeEEPROM function. I added a local copy of the data variable that is used for shifting the data to the pins on the arduino and instead of the last 'delay(10);' I now have 'while (readEEPROM(address)!=data) delay(1);' This speeds up the writing considerably and I have yet to see any sideeffects.
@PirateFunk
@PirateFunk 5 лет назад
This is the most engaging channel I've ran into in a long time. Not only because I'm interested in the content but because everything is explained so concisely and intuitively.
@talk2azs
@talk2azs 3 года назад
These videos are GREAT for the beginner Electronics learners! We did this kind of stuff back in the late 80's when I was enrolled in college! Only thing then is that we did not have the convenience of using an Arduino since they did not exist back then. But we did breadboard a manual EPROM programming circuit similar to the one in the previous video in this series for educational purposes. For larger data size programming, we actually used an EPROM writer that plugged into one of the slots of an Apple II Plus computer. All you younger folks out there won't even know what I am talking about here! Kind of sad the young ones have no clue about how fast and how far technology has come in such a short amount of time. Thanks for taking me back and bringing back memories of a simpler time in life!
@May-sy9jk
@May-sy9jk 7 лет назад
Thank you Ben,we love you!
@narayanbandodker5482
@narayanbandodker5482 5 лет назад
Pro tip: You can use the analog pins of the Arduino as Digital GPIO pins :)
@1kreature
@1kreature 5 лет назад
Was about to say. The only difference is analog pins have analog capability as well. I wish Arduino had done this differently and given all pins a labelled digital io address. Then they could have added an analog number to em as well. Would have saved so much trouble for a lot of beginners.
@lucasoliveirasaintrain4298
@lucasoliveirasaintrain4298 5 лет назад
Yeah, except for pins A6 and A7 in the Arduino Nano: You can use A0 through A5, but not A6 and A7
@iforce2d
@iforce2d 5 лет назад
@@1kreature Multiple names for the same pin seems to me like a more confusing thing for beginners. It can also lead to annoyances such as needing to keep track of which digitals are also analogs, when designing a circuit that requires analogs, so that you don't end up using the dual-use pins when a digital-only pin would do, and then need to swap them around later. I already find myself doing having to be mindful of which pins do PWM out so I don't waste them. As long as beginner knows the analog pins can also do output, they can use analogWrite to get a 'high' value.
@charlottelondyn805
@charlottelondyn805 4 года назад
@@lucasoliveirasaintrain4298 the reason being that A6 and A7 are unique to that package of the ATMEGA328P, they aren't available on the DIP package, meaning that the Nano is significantly better than the Uno.
@ZomB1986
@ZomB1986 4 года назад
That's where the macros PIN_A0 through PIN_A5 come in. They map to 14..19
@commanderlabs
@commanderlabs 3 года назад
This is extremely calming, and not only is fascinating in its own right, but also makes lovely background noise. I actually listened to this while putting together a website of mine
@steveeb00
@steveeb00 5 лет назад
Your videos are very cool. It takes me back to my college years when I used to build circuits like this. I still have one on a breadboard that I made in the mid 80’s. I have to say, your wiring is much cleaner than mine.
@kindpotato
@kindpotato 4 года назад
I used to do minecraft redstone when I was like 12, and these videos are much easier to understand because of it. The most complicated stuff I made was a full-adder. Anyway nice videos you make computers seem so easy to understand!
@markgeorge447
@markgeorge447 2 года назад
Same here bro 👍
@DasSchwarzePhantom
@DasSchwarzePhantom 8 дней назад
Nice, I built the Scott CPU in Minecraft plus a whole 64 byte RAM but looking back at it I'm pretty sure there is lots of optimization possible
@krzsit25
@krzsit25 Год назад
Great video not only for electronics but also programming. Thanks.
@stefandobrucky599
@stefandobrucky599 Год назад
As usual, excellent content. Humble, to the point, clear. Ben, your work helps to quickly understand things, which are not so clear when reading datasheet. I wish you all the best!
@adumont
@adumont 3 года назад
Another video of Ben I loveto watch. As always very interesting, I'm learning so much. I had no idea how an Eeprom programmer worked and Ben, you make it so simple to understand. And honestly even your code is elegant and it real pleasure to watch you write it.
@forbiddenera
@forbiddenera 5 лет назад
This video is awesome & very well done, keep it up. Best shift register explanation ever too, you could chop that up into its own video even!
@NoahWL1
@NoahWL1 5 лет назад
IdealSound & Performance : Mobile Agreed, I’d love an entire video of Ben explaining bitwise operations. I haven’t worked with them too much but I have a tough time understanding them sometimes.
@forbiddenera
@forbiddenera 5 лет назад
@@NoahWL1 No doubt. As much as you know about EE, cool tricks like this are always good to know. Who thinks of using an eeprom as a 7seg decoder? It may not be the most "practical" in some peoples eyes but damn cool.
@ahmedgaafar5369
@ahmedgaafar5369 5 лет назад
If Ben is improvising during the video, then he is a super star indeed and if he really plans each step on the way then he is a super super star ....really unbelievable great tutorial ....well done young man.
@markkeilys
@markkeilys 4 года назад
@7-Minute Crafts it's both.. he's already built all this he's just re-building it in the videos and is stealing the wires (and components?) from the origional build.
@thephysicsguy181
@thephysicsguy181 7 лет назад
So nice to have these kinds of channels as an engineering student! Not all the science channels have to appeal to the general public, and the educational value on these videos are just immense!
@michaelomiccioli4646
@michaelomiccioli4646 7 лет назад
Ben, excellent video very informative and well laid out. Great starting point for people that want to venture into this area. I wish had something this clear a few years ago when I started playing around with eeproms. Keep up the good work looking forward to to your next videos.
@maxim25o2
@maxim25o2 5 лет назад
Exelent tutorial. Now I know how shift register is working.
@MadManMarkAu
@MadManMarkAu 7 лет назад
If you read the datasheet carefully, it says if you read from the chip, and the write cycle is not yet finished, the MSB of the data will be the INVERSE value of the data you are writing. The other data outputs are undefined at this time. After pulsing the /WR line, you should enable the chip output and monitor the value of IO7, waiting until it matches the MSB of the byte you wrote. That way you're not stuck inserting arbitrary delays in your code, and you can never enter in to a race condition with the write cycle, like you are here. This is the reason you get funky data when reading the chip, directly after writing to it.
@jsmythib
@jsmythib 4 года назад
(just checking myself). The complete cycle time is 1000ns. As long as I stay >1ms I should be fine. To squeeze out the last of the spec speed would require the polling. Am I far off? :)
@solidhit2
@solidhit2 7 лет назад
Your videos are impressively clear to comprehend. Please, keep making them!
@gapadad2
@gapadad2 6 лет назад
Wow. First video I've seen using shift registers for a purpose instead of just explaining how they work. Good Job!
@ryanavery7980
@ryanavery7980 5 лет назад
This is great. I'm new to Arduino so I really I like seeing random chips that I've never seen before like that shift register and how it works. Could you do a series showing more random things like that? There's projects in the past that I would have used a shift register if I had known about it but I didn't at the time!
@AJMansfield1
@AJMansfield1 6 лет назад
To get rid of the delay(10) in the writeEEPROM function, you could take advantage of the inverted data polling feature of those EEPROMs that lets you directly determine when the write cycle has completed. After clocking the write enable pin, switch back to reading that address and wait until the data you wrote appears on the output pins. A few other possible enhancements I thought of while watching that I might try - Speeding it up by cycling the addresses in a De Brujin sequence rather than incrementing the address. That way only a single bit has to be shifted in for each write. - Using the SPI perhiperhal to write to the shift registers much faster than doing it in software. The 74HC595 is rated for up to 25 MHz, significantly faster than even the CPU clock speed for the arduino. Hook the shift register data pin to MOSI, the shift clock to SCK, and then you only need to use a single digital pin for the latch. - Re-wire the data pins to be in the correct order in the GPIO pin registers, so that the byte can be reassembled more quickly: read the two pin registers, mask off the relevant bits, and just or them together.
@stumbling
@stumbling 5 лет назад
I have never heard of De Brujin sequences before but from your description I tried creating some and this is my favourite one I found: | 0000 | 0 | | 0001 | 1 | | 0011 | 3 | | 0111 | 7 | | 1111 | 15 | | 1110 | 14 | | 1100 | 12 | | 1000 | 8 | | 1010 | 10 | | 1011 | 11 | | 1001 | 9 | | 1101 | 13 | | 0101 | 5 | | 0100 | 4 | | 0110 | 6 | | 0010 | 2 |
@stumbling
@stumbling 5 лет назад
Hmmm, a neater way to show the sequence is a series of digits showing the number of the bit that is flipped. So the above sequence would be: 0123 0121 0123 0121 Another sequence I found that can be extended for any number of bits: 2-bit: 0101 3-bit: 0102 0102 4-bit: 0102 0103 0102 0103 5-bit: 0102 0103 0102 0104 0102 0103 0102 0104 etc.
@ZackLeath
@ZackLeath 3 года назад
Jesus you’re so smart man. Seriously a lifetime of knowledge it seems like. You explain things so well and simply, too. I just graduated college last year and I have so much to learn. I love watching your videos and learning things I’ll probably never do but I still enjoy learning about it. Thank you man and please keep it up. Great work
@jjr56991
@jjr56991 6 лет назад
Thanks for posting your videos, very well done. They answered many questions I've had as to exactly how data can be stored and used by a computer. I hope your able to keep producing more videos in the future.
@Stabby666
@Stabby666 3 года назад
You could have used the analogue pins as outputs also. Pns A0 - A5 are on PORT C which can be used as normal IOs 😁 A6-A7 are only connected to the ADC MUX though.
@melkiorwiseman5234
@melkiorwiseman5234 5 лет назад
This is a wonderful video with everything clearly explained so even a newbie can understand it. Thanks, Ben. If anyone is wondering, this circuit can be used to program any EEPROM with similar programming characteristics up to 32K by 8 bits (256 bits) without any substantial modification to the circuit (just make a few more connections between the shift registers and the EEPROM address pins) and with only minor changes to the control program. This circuit could be used as the basis for programming even larger EEPROMs by simply adding more shift registers, although there would need to be more extensive changes made to the program to account for sending the extra address bits.
@joaopaulo0903
@joaopaulo0903 Год назад
hi, i've made this circuit with a 28c256, a 32k eeprom, but the there are missing bytes, like : 00 5e 00 b4 00 88 00 3d 00 ff 00 79 00 aa 00 99. do you know how i solve this?
@melkiorwiseman5234
@melkiorwiseman5234 Год назад
@@joaopaulo0903 It sounds like you're counting by twos instead of by ones. One possibility is that address line 0 (zero) is not properly connected which would make that pin "float" high so that it appears to always be set to 1. That would produce the symptoms you're describing since it would cause the programmer to program the same byte twice while also missing programming one byte. Another possibility is that you may have mixed up the address wires between the shift registers and the EEPROM. In particular, address line 1 (the second address line when counting from zero) may be switched with a different address line. Check which pin of the shift register that address line is connected to and my guess is that you'll find it's the wrong pin. Then you just need to find which pin it was switched with and fix it.
@joaopaulo0903
@joaopaulo0903 Год назад
on really i dont connected the 5v jumper on protoboard haha. sorry and thank you
@melkiorwiseman5234
@melkiorwiseman5234 Год назад
@@joaopaulo0903 No Problem. I've often found that re-checking my work will lead to me discovering a mistake. I'm glad it worked for you.
@maximebeaudoin4013
@maximebeaudoin4013 6 лет назад
WOW just found this chanel and i'm in love. So much knowledge. Thank you very much for taking your time and making these videos and keeping em commin.
@tobortine
@tobortine 7 лет назад
I've used these shift chips many times but not entirely understood how they work. Your excellent explanation has enlightened me, many thanks.
@markusrohner9452
@markusrohner9452 5 лет назад
Just FYI Arduino Nano's Pins A0 to A5 (not A6 nor A7) can also be used as digital Pins D14-D19
@machmar
@machmar 5 лет назад
I was just about to point that out
@nadircatalkaya5011
@nadircatalkaya5011 5 лет назад
By selecting Arduino nano you can use A6 and A7. They defined in board definition file. nano.name=Arduino Nano nano.upload.tool=avrdude nano.upload.protocol=arduino nano.bootloader.tool=avrdude nano.bootloader.unlock_bits=0x3F nano.bootloader.lock_bits=0x0F nano.build.f_cpu=16000000L nano.build.board=AVR_NANO nano.build.core=arduino nano.build.variant=eightanaloginputs
@l.t.c8.1.46
@l.t.c8.1.46 4 года назад
@@nadircatalkaya5011 and that gives exactly the 21 pins needed for the eeprom. Funny how that works!
@jacquesy2520
@jacquesy2520 6 лет назад
Instead of using the 'bool outputEnable', you can convert an analog pin to digital pin. Say we wanted to make A0 go high then low, we would do it the same as a normal digital pin: pinMode(14, OUTPUT); digtalWrite(14, HIGH); delay(1000); digitalWrite(14, LOW);
@pararera6394
@pararera6394 6 лет назад
Wait, it's possible to use analog pins as digital outputs? 😨😨
@albertogiraldo4691
@albertogiraldo4691 5 лет назад
what about current constrains
@brainndamage
@brainndamage 5 лет назад
@@pararera6394 yes, the analog input is an alternate function in the chip anyway. Read the datasheet.
@Bravo4Whiskey
@Bravo4Whiskey 3 года назад
Thank you so much for explaining how old EEPROMs work :-) I plan on building a nixie tube clock with 7-segment nixie tubes and really appreciate your efforts to explain
@kirkallen83
@kirkallen83 4 года назад
I've been a Software Engineer for 15 years. Your videos are the first I have found the explains how software works at a hardware level. I've recently decided to learn assembly language and your videos help me understand how code is translated into byte code and how processors operate. Thank you for your videos. They are a great contribution to EE and Software Engineers alike. They have helped me reestablish my curiosity in computing.
@yutubl
@yutubl 3 года назад
Are you interested for book? Tietze/Schenk explains also how microprocessor electronic circuits work, and also starts with basic analogue electronics
@byronwatkins2591
@byronwatkins2591 4 года назад
You should disable the EEPROM's outputs BEFORE you change the data lines' pinModes to OUTPUT to avoid the potential for microseconds of conflict.
@MrWilliam932
@MrWilliam932 7 лет назад
Maybe you can do a similar circuit from the pushbutton to limit the pulse of the switch with the arduino. I don't tried it yet but if you put the 680 resistor in series with the arduino pin and the capacitor, and the other leg of the capacitor to a 10k resistor and then to ground, when the arduino sends a 1uS pulse the capacitor will charge via the 680 Resistor, and while is charging you should have a logic one in the other part of the capacitor, when you set the pin to low then the capacitor discharges via the same resistor as before, so it shoul work as the pushbutton, if you want to get the low pulse just change the 10K resistor to VCC and the Arduino pin to High, and it should do the job :/ I repeat, I dont tried it yet, but it should work
@cabbageman
@cabbageman 6 лет назад
this video is so well made, i have no idea how you did it. keep up the flawless content ♡
@SpeccyMan
@SpeccyMan 2 года назад
Hardly flawless!
@AirandEnergy
@AirandEnergy 5 лет назад
This is a great tutoral. I wish that they would have done Lab work like this in Digital Electronics at Ivy Tech State College. It makes things so much easier to understand and you rolled 4 days of lessons into a half hour thats understandable. Keep up the good work.
@Mau365PP
@Mau365PP 5 лет назад
44:01 I think you could use the RC circuit you made before with the delay to be more precise when writing on ROM
@eriknestaas2270
@eriknestaas2270 4 года назад
agreed
@mikedelosier95
@mikedelosier95 7 лет назад
Hello Ben, Nice Arduino EEPROM programmer I was hoping you were going to use a cheap simple microcontroller to program EEPROM with the Binary to 7 Segment decoding data.
@jamesgoacher1606
@jamesgoacher1606 4 года назад
I did not follow all (most) of that but as good a tutorial as I have ever seen, well presented. Took me back to my Nascom days when I had much more understanding. This old fella is going to trawl through this vid quite a few times more yet. Many thanks.
@jeffnay6502
@jeffnay6502 7 лет назад
Hallelujah !!! That was a tough one for me. I had my ups and downs with this one, but never gave up. After finishing the project, I looked though your updated code and added the Erasing EEPROM, which helped, as the first time I ran it, it did not appear to be doing anything, but I guess that is because it takes a little while to fully erase. Anyway, thank you for the video, it was FUN !!! Even though I do have a simple($40) programmer, that I could use. It is always fun learning new ways of doing things. Thank you
@FlashManinSpace
@FlashManinSpace 7 лет назад
This channel is soooooo relaxing 😏😏😏
@BillAnt
@BillAnt 5 лет назад
ASMR comes to mind.
@kangalio
@kangalio 7 лет назад
You don't have to convert the truth table binaries to hexadecimal, you can just write them as binary literals in C: '0x4C' is equal to '0b01001100'.
@BillAnt
@BillAnt 5 лет назад
I've always thought that "0x" was the only hex prefix available, then comes "0b" along ... learned something new today :)
@ExtantFrodo2
@ExtantFrodo2 5 лет назад
@@BillAnt 0x, 0b, 0d, 0h, Oh My! 😵
@barmetler
@barmetler 5 лет назад
Well he prints it out in hexdec, so in order to check if it works, he would have to do the conversion at some point. Or just print out in binary, but that's a bit too long to read easily.
@ExEBoss
@ExEBoss 5 лет назад
There’s also `0o` for octal values.
@skmgeek
@skmgeek 4 года назад
@@ExEBoss But is there 0wo?
@BamYazi
@BamYazi 5 лет назад
This is a great video - Thankyou for making content like this - One of the best videos i've found on a personal journey trying to build a Z80 based computer from scratch (with very little previous electronics experience) just to learn new things (I currently have an Arduino faking memory) - i've learned so much watching this, you explain things clearly and simply , i'm pretty sure i can go away now and implement a lot of what you've explained because i actually understand it, rather than just copying it.
@HenryLetting
@HenryLetting 7 лет назад
Man you are great! I get goosebumps while watching each episode. Good stuff.
@Inquire98
@Inquire98 5 лет назад
"Thank You", thank you very much 😀 This is a REALLY good tutorial 😎
@HelloKittyFanMan.
@HelloKittyFanMan. 4 года назад
Haha, are you quoting yourself, or...?
@Inquire98
@Inquire98 4 года назад
@@HelloKittyFanMan. I'm not understanding your response 🙄 PLEASE explain 🤔
@HelloKittyFanMan.
@HelloKittyFanMan. 4 года назад
@@Inquire98: In other words, why are there quotation marks around the first "thank you"? Another possibility to ask about is: Is that a fake " thank you"? No, likely not. Right? So what are they there for?
@Inquire98
@Inquire98 4 года назад
@@HelloKittyFanMan. My use of the characters may be a mistake 🙄 doesn't mean I am not sincere 😉 So, PLEASE accept my apologies for my use/wrong use of quotations marks 😉
@HelloKittyFanMan.
@HelloKittyFanMan. 4 года назад
@@Inquire98, you don't have to apologize to me; I was just curious. So do you know how to use the editing tool here to remove them then (without removing the whole post, of course)?
@valuedhumanoid6574
@valuedhumanoid6574 5 лет назад
*sigh* I already know all this. When are you going to teach me something I don't already know? (lol this was as sarcastic as I could muster. I bow in the presence of a Master) This was brilliant. So clever.
@codingwithsam4992
@codingwithsam4992 2 года назад
Can not believe you putting so much effort for explaining. Thank you
@MrFukyutube
@MrFukyutube 4 года назад
I'm building up something like this- but for mine, I went with counter chips, 74HC163s with their Qn outputs wired to their Dn+1 inputs - Since count enable is active high and load is active low, I just connect them together as a mode bit, no need for glue logic. Effectively it works as either a counter or a shifter, depending on the mode bit- so I can shift in an address, flip the mode bit, then step through further addresses with just one clock cycle each. I was originally planning on having the data pins do double duty and use a '138 to address which counter to load with 4 bits at a time, but watching this video inspired the shift register configuration, and it just happened to work out really nicely.
@cmuller1441
@cmuller1441 6 лет назад
The main problem is that he is using the wrong datasheet. The -25 after the device name is the speed grade and this is very slow. I didn't find the good datasheet too be I saw some -20 that had a 10ms write cycle... The cleanest solution would be to implement the data polling test that checks if the write cycle is finished. This way you can adapt the write speed to the actual performance of the eeprom whatever grade or brand you use.
@bilalarain4632
@bilalarain4632 4 года назад
Yes You are Right . the Chip calculate if it has finished the last input data and continues to 2 input.
@darthglobe4285
@darthglobe4285 6 лет назад
This is one of the most amazing channel here on RU-vid! For GEEKs!!! BTW, from where did you got all this knowledge of electronics and computer architecture? Salute to you👍👍
@orainblack6145
@orainblack6145 7 лет назад
more excited about the video drops than favorite TV show. thanks man
@user-wn4nl7bp9h
@user-wn4nl7bp9h 3 года назад
Before I found your channel the best thing I could do is program a tiny 45 with my arduinos. Thank you so much for making me understand that I can program so much more!
@ClydeShaffer
@ClydeShaffer 6 лет назад
for some reason this made me want to build an electromechanical EEPROM programmer that reads punched cards, or even those scantron cards from school that require a #2 pencil
@LordPhobos6502
@LordPhobos6502 7 лет назад
Thankyou for posting this! :) This is extremely helpful as I'm about to embark on making my own microcomputer :) One thing though - noticed you used D13 as the write enable - this pulses everytime a new program is uploaded to the arduino, I believe that would cause data to be lost from the EEPROM? Would it not be better to use one of the analog lines as a digital output?
@TheCustomFHD
@TheCustomFHD 4 года назад
Actually it blinks while booting not uploading, while uploading rx and tx blinks
@evertspies3345
@evertspies3345 3 года назад
I enjoyed the video very much, helped me to recap on some of my rusty digital principals.Your command of C is really good. With reference to so many viewer asking why not just use a 7 segment driver chip...that was not the intention of this exercise. It is a great tutorial on the making of an eeprom programmer. It is not only to program a 7 segment display. If you follow the further you will notice how this programmer is used to change code in the MCU.
@siewcazonierzyzagady2799
@siewcazonierzyzagady2799 5 лет назад
This is the best video about shift registers what i see on yt, i learn a lot from this film. I watched more of Your video and i learned a lot from them. You are excellent teacher!
@danielrhouck
@danielrhouck 6 лет назад
On code style, usually you'd make the condition on the for loops use < instead of
@patrickdoyle4581
@patrickdoyle4581 2 года назад
Using < is no less prone to off-by-one errors than
@danielrhouck
@danielrhouck 2 года назад
@@patrickdoyle4581 I did say “usually”. Because C is zero-indexed in most cases, < usually makes more sense; you go from 0 to n-1 inclusive, or while it’s < n. That isn’t always the case.
@patrickdoyle4581
@patrickdoyle4581 2 года назад
@@danielrhouck Again, it depends on how you'd explain it to a colleague. I'd pretty much always use < if looping through an array, or with the idiom "for (i=0; i
@kose2ik
@kose2ik 7 лет назад
tanx, for note with (chip datasheet): delay(10); (45:45 add delay(5); (5ms?)) 49:06 "ups?" (reading wrong 51:26) 51:55 (what datasheet say AT28C16 / AT28C16E (write cycle time)) (Typ 0.5ms , Max 1.0ms ) (how Arduino get 0.5ms or 100us or 200us?)
@johnyoungieyoung123
@johnyoungieyoung123 Год назад
Brilliant. I was just about to build this from scratch using an ATmega 2560 for 16 digital pins. This saved me loads of time.
@tpage8051
@tpage8051 5 лет назад
This series is awesome! Im a total beginner but im hooked. Keep it up!
@SlykeThePhoxenix
@SlykeThePhoxenix 6 лет назад
What is the wire you use for this? Your cable management is awesome.
@naikrovek
@naikrovek 7 лет назад
Ok, I know I'm not crazy, now. There need to be breadboards with rows that have more than 5 pins.
@dentakuweb
@dentakuweb 6 лет назад
Someone needs to make good quality breadboards with more than 5 rows per column, power rails that line up with the columns (some do some don't depending on the brand) and aren't split by a blank spot every 5 holes PLUS have two extra power rails running down the middle where the channel is on standard ones.
@spanglecraftworks259
@spanglecraftworks259 5 лет назад
There are stray capacitance issues with normal breadboards, where you have many lengths of contact strips lined up in parallel, like that. I wonder if lengthening the contact strips, like you suggest, wouldn't make those issues worse? It would certainly add to the resistance of each channel. Also, I don't think there is much room for another two rows for power/gnd rails in the middle channel, while still keeping it close enough to support most ICs.
@bobdagamer640
@bobdagamer640 4 года назад
You could use a jumper wire because for me I never need more than 3 apart from the power
@raymondheath7668
@raymondheath7668 5 лет назад
Your videos are a great teaching aid. You go into detailed explanation in a way that is easy to understand and create something usefull
@osadzinski
@osadzinski 7 лет назад
Awesome, That's what I thought you were going to do. Just another use for Arduino and great example of using functions and c code. So much to do so little time.
@r6u356une56ney
@r6u356une56ney 7 лет назад
Seems like it would have been simpler just to have an address register, and a data register, load them directly in separate steps, then pulse the write signal.
@RussellTeapot
@RussellTeapot 7 лет назад
yes, as I was watching a video I thought the same thing. Although, form learning perspective, it's nice to see the shift register in action. Also, I believe it's a part needed in the Control Unit, I think for the sequencer
@TheKetsa
@TheKetsa 7 лет назад
please do a video about it then.
@BillAnt
@BillAnt 5 лет назад
That would seem to complicate the circuit even more. The issue here are some off timings possibly due to the read/write cycle speed of the chip.
@jonasnicolaysen8019
@jonasnicolaysen8019 5 лет назад
and how would you read them then?
@userPrehistoricman
@userPrehistoricman 5 лет назад
You would not use two registers. You use one that drives the address lines. This was pretty standard practice back in the day. The Arduino's data and address lines are shared, but the address is stored in the register (D flip-flop). First, output the address, clock it into the register, and then output the data. Now set output enable on the register, and do the write. You can still read data directly into the Arduino pins.
@KolasName
@KolasName 7 лет назад
This is how to really stop worrying and understand electronics!
@ezio_g
@ezio_g 5 лет назад
By just watching it is not enough, I have to get my own chips, proto boards, cables and so on. Get all ready and try to follow. Great videos. I will make your video lessons one of my projects. Thanks.
@PyroRob69
@PyroRob69 3 года назад
Every time I see people using neat wiring on breadboards remind me of high school where we also were required to trim and bend every jumper to the proper length and make it neat. Now days, people just throw jumpers in and you can never troubleshoot them easily. Thank you!
@richardspirtz5863
@richardspirtz5863 7 лет назад
I bugged out on 22:00 where you convert address 1234 into binary. How do you do it so fast ? Did you cut the video to calculate it? Great and clear video anyway, thank you.
@MaxTheDragon
@MaxTheDragon 4 года назад
This is how I do it: 1) 1024 is the largest power of 2 that fits in 1234, which corresponds to a 1 with ten trailing 0's (because 1024 = 2^10). 2) 1024 easily subtracts from 1234, leaving 210. 3) 210 is 255 minus 45. 255 is eight 1's in binary (because 256 = 2^8). So we set the last eight bits to 1. 4) To subtract 45, we turn off the 32 bit (leaving 13), the 8 bit (leaving 5), the 4 bit (leaving 1), and the 1 bit (leaving 0), which is the first, third, fourth and sixth bit respectively if counting from right to left. (The idea here is that at this point you're working with smaller numbers which are easier to deal with). 5) Writing it out we get: 1 (from the initially subtracted 1024) 00 (the first two zero bits of the ten trailing 0's. Two because we're about to write the remaining eight 1's of the 255). 11010010 (eight 1's with the first, third, fourth and sixth (from right-to-left) bit changed to 0's to account for subtracting 45). Thus: 10011010010 Final check: 1234 is an even number. Even numbers should have a zero at the end in binary (least significant bit). This is true.
@poopsintub
@poopsintub 3 года назад
It's all about recognizing the powers of 2.
@citolero
@citolero 3 года назад
Erm... he worked it out in advance. You don't think he starts recording with no preparation do you?
@maxange2b208
@maxange2b208 5 лет назад
Good video but do you know that you can use pin A0 to A7 as digital pin on the ardino
@phantomeniasll92
@phantomeniasll92 5 лет назад
only up to A5 ; A6 and A7 don't work
@Hellfreezer
@Hellfreezer 3 года назад
Thanks so much. i was just looking for a propitiation check on EEPROM and you were very clear and concise.
@brianwilmoth8258
@brianwilmoth8258 9 месяцев назад
Ben - THANK YOU for this video! Thanks to your tutelage, I was able to easily create a modified design of your circuit for a 16KB D27128A EPROM. That EPROM is used for the OS ROM in my old Atari computer. I was able to pull the data off my custom OS EPROM and dump it into a binary file to load into my old system (which now has a way to load ROM files for the OS). Mine doesn't look as nice as yours does though - I don't have customized lengths of wire that fit in nice and neat. You saved me a good bit of money too, since the programmers you can buy on Amazon/eBay are upwards of $100.
@scitwi9164
@scitwi9164 7 лет назад
Wouldn't it be faster to just use two latches which would latch the address and data and then assert the write signal? That's just two clock cycles for each byte instead of one clock cycle for each bit :q
@VicVlasenko
@VicVlasenko 7 лет назад
I thought about demultiplexer first, instead of shift register :)
@JasonMasters
@JasonMasters 7 лет назад
Same here, although I then thought a bit further and realised that a shift register might work better in this situation.
@ducksonplays4190
@ducksonplays4190 3 года назад
I thought of a 74ls161 do I write the byte then send a pulse to it and write the next and so on
@dmlavign
@dmlavign 4 года назад
I watched the three videos you posted for manipulating binary to a seven segment display, very well done sir! I am a Electronic Tech, did my schooling in 1986-1988 and it brings back some great memories of learning digital logic and serial in parallel out shift registers! Now tying all of that into an EEPROM being written to and read by an Arduino Nano! I would like to learn more about programming the Arduino's, I have a UNO that I bought awhile ago to rescue my 3d Printer that was bricked from a bad flash, so I haven't really programmed it to do anything yet, but that is about to change! Thanks Again!!!
@BryanChance
@BryanChance 4 года назад
This video is just amazing. You're knowledge and expertise in this field is unmatched, as far as I know. :p I'm ordering the Ardruino and eeprom right now. Thank you Ben.
@0815mkl
@0815mkl 7 лет назад
Cool to see that I'm not alone. I've done the same for my 8-bit microcomputer project (6502 based). Ended up with an Arduino based programmer that has a Java-Client for easy uploading, downloading and erasing eeprom Content. github.com/mkeller0815/MEEPROMMER Additionally you should use "unsigned int" for your address variable, because calculating with a signed integer can have unwanted effects.
@8bitmark530
@8bitmark530 4 года назад
Mario Keller Looks like this breadboard version needs some changes to work with MEEprommer. Comparing the schematics CE is tied to GND on the breadboard version and OE is coming from the second 595's Pin 7. Not figured out how that is working myself yet (I'm still learning). Also no 100nf capacitors on the breadboard version, is that going to introduce too much noise and error into the writes? The other pin assignment differences I understand and can deal with (I think) :)
@Arthur-rh9tf
@Arthur-rh9tf 5 лет назад
How do you get your wires the perfect length?! Haha
@mbdarsh
@mbdarsh Год назад
Fascinating .... the words can't express how much I appreciate this explanation.
@josephisaacs78
@josephisaacs78 5 лет назад
thanks for your schematics and extensive knowledge about the arduino and accessories! youve been an inspiration for me
@flashforensics
@flashforensics 4 года назад
"getting really old" This used to be the ONLY way to boot some legacy hardware... you had to manually program in the boot sequence with switches just like this.... Those long winter evenings in the server room used to just fly by......
@salerio61
@salerio61 4 года назад
haha I remember doing just that on PDP11s. Toggle in the bootstrap loader and get it going enough to read from the teletype. Same for the GEC 4000 except those were equipped with hard drives which made it all quicker until we got the prom upgrades to do it for us.
@jimstanley_49
@jimstanley_49 4 года назад
My Dad watched over a system that did this in a particleboard plant. It was a Measurex system with a 2-step boot sequence. You had to manually set the instruction data switches and clock them into the processor. This machine was advanced enough to find and load from the 8-inch floppy drive with only two such instructions. They cut him loose around 2004, so I guess they finally upgraded.
@AstAMoore
@AstAMoore 7 лет назад
Before writing 42, you should have made sure you knew where your towel was.
@owainjoels8561
@owainjoels8561 4 года назад
yes. and your copy of the guide. and your fish.
@30IYouTube
@30IYouTube 3 года назад
Th joke goesː there may be an [iː] in team, but there is no [m] in Mohawk.
@TheLunaLockhart
@TheLunaLockhart 4 года назад
of all the things in this video, what impressed me most was how you read the binary out forwards while moving your left hand left and your right hand right without sliding off point. well done I suppose lol
@kaxbyrita9279
@kaxbyrita9279 2 года назад
These videos really help in de-mystifying these mystical things. Much appreciated 👍🏻
@cocusar
@cocusar 7 лет назад
Do the "analog" pins can be used as digital i/o? I think you can... On PICs thats completly possible!
@aaro1268
@aaro1268 7 лет назад
Yes, analog pins are usually just digital pins with hardware PWM generators attached. But if there are enough digital pins, it's best to use those first because PWM is a bit expensive to do in software. Basically keeping them open in case you need them later.
@mikedelosier95
@mikedelosier95 7 лет назад
Correct, analog pins can be set digital also. Mike
@headlessxp4948
@headlessxp4948 7 лет назад
Aaron King Aren`t A0 to A5 analog inputs? PWM by the way is only available on special digital Pins
@cocusar
@cocusar 7 лет назад
I thought so, i just asked if those pins could be used since I'm more into PICs than AVRs. So the answer is: A0 thru A5 can be used as digital I/O, withouth any catch. Those can be used as analog inputs as well. A6 and A7 seems to be only analog. The PWM peripheral can be attached to other pins, so it doesn't has anything to do with analog.
@0LoneTech
@0LoneTech 7 лет назад
Yes, the analog pins are simply also connected to an ADC or comparator, they can still be used as digital I/O. The PWM capable pins are a different set.
@runforitman
@runforitman 5 лет назад
34:02 I’ve had that problem too where my computer won’t recognise the Arduino unless I restart it It’s very strange
@davidflorey
@davidflorey 3 года назад
Updated CH232 drivers should do the trick
@grapes008
@grapes008 5 лет назад
as has been pointed out, all pins on most modern micro controllers can be used as I/O normally with a digital aspect it is referred to as tri state logic meaning it can, sink and source current as well as being high impedance as an input.
@ryanedison5709
@ryanedison5709 3 года назад
You earned a subscriber with this video.... just getting into Arduino and already have a coding background so this is something I already wanted to tackle on my way to reprogramming BIOS chips.
Далее
Build an 8-bit decimal display for our 8-bit computer
32:47
EEPROM Memory - Store Anything - Arduino101
13:16
Просмотров 100 тыс.
1❤️
00:17
Просмотров 5 млн
НЕ ДЕЛАЙТЕ УКЛАДКИ В САЛОНАХ
00:43
Assembly and Review - PE6502 Hobby Computer
25:07
Просмотров 1,3 млн
I built my own 16-Bit CPU in Excel
16:28
Просмотров 1,4 млн
Hacking a weird TV censoring device
20:59
Просмотров 2,9 млн
Xgecu TL866II Plus vs T48 vs T56
17:20
Просмотров 33 тыс.
Reliable data transmission
43:54
Просмотров 1,6 млн
Installing the world’s worst video card
25:12
Просмотров 954 тыс.
Using EEPROM with Arduino - Internal & External
31:54
Просмотров 192 тыс.
Reverse Engineering Game Code from the Neutral Zone
40:59
Making a computer Turing complete
18:20
Просмотров 535 тыс.
1❤️
00:17
Просмотров 5 млн