I2C Bit-Banged without Microcontroller!

แชร์
ฝัง
  • เผยแพร่เมื่อ 3 ธ.ค. 2024

ความคิดเห็น • 159

  • @contemporiser
    @contemporiser 10 ปีที่แล้ว +7

    All my teachers in 5 years technical school of electronics was incapable of even acknowledge the fact that I get nothing out of it. My diploma was positive and now after 1010 years I finally understand anything what so ever. Thanks dude!

    • @theengineer9910
      @theengineer9910 6 ปีที่แล้ว

      Piotr Misiuna 10 years? did i solve your binary?

  • @patrickjeromeobaldo2450
    @patrickjeromeobaldo2450 11 ปีที่แล้ว +4

    I was able to replicate this, and I sort of combined this with a shift register so that I get the whole 8 bit representation of what I'm sending to (and receiving from) the eeprom. I simply got the clock and data lines of the shift register and eeprom tied in parallel. I also used a soft-type button (like those on TV remotes) since it was a bit less noisy than the tactile buttons, those were giving me problems with de-bouncing.
    Again, thanks for making this tutorial! Keep those vids coming man

  • @svea2005
    @svea2005 11 ปีที่แล้ว +1

    It is really awesome to watch your tutorials. I started off over 20 years ago, dreaming of building thing on my own, but never really got around to tinker as much. All those analogue components made my head spin, but now being 37 and have followed you for a long time and get the motivation I just recently passed my digital electronics classes and my life is so much more fun! Thanks for everything... Now back to my Arduino and future world-dominion ;)

  • @TomMinnick
    @TomMinnick 11 ปีที่แล้ว +5

    Awesome video, I had a rough idea of how I2C worked, but this illustrated it perfectly! I didn't know there wasn't any real lower bound on speed. I might try to replicate your experiment for fun with other sensors (RTC, etc).

  • @hubertmargreiter3508
    @hubertmargreiter3508 7 ปีที่แล้ว +1

    With this very basic hardware setup you manage the best to explain the function of this bus. You are a very good instructor.

  • @Kevindarrah
    @Kevindarrah  11 ปีที่แล้ว +2

    now that I think about it, you should be able to use the switches on their own. good point!

  • @dfwz33
    @dfwz33 11 ปีที่แล้ว +1

    This video is very well done and very instructional, and even useful for those of us who are already familiar with I2C. Great tutorial, keep up the good work!

  • @ss10483
    @ss10483 10 ปีที่แล้ว +7

    Excellent, now everything, what i was mechanically doing without knowing whats happening in background, now makes sense.

  • @poetapoetaful
    @poetapoetaful 7 ปีที่แล้ว

    Friend, you are a genius! I had been looking for someone who was capable of doing this kind of experiment with EEPROM for three days. It turns out that this type of analysis helps to understand the bottom of everything. I was also designing this experiment but with a 555, but now that you made that clear, I thank God for your wisdom! This will be useful for future experiments, thank you friend!

  • @BGroothedde
    @BGroothedde 7 ปีที่แล้ว +1

    i2c is amazingly simple, it's such a convenience in most cases. Thanks for this awesome video!

  • @chanhannigan762
    @chanhannigan762 4 ปีที่แล้ว

    Fantastic information and example. This should be the first video for anyone learning I2C/TWI.

  • @Kevindarrah
    @Kevindarrah  11 ปีที่แล้ว

    yep, that can be done... trying to see if I have any SPI devices though? Shift registers are SPI, I have a video doing this on those

  • @Kevindarrah
    @Kevindarrah  11 ปีที่แล้ว

    yea, for sure, glad you still liked it!

  • @Kevindarrah
    @Kevindarrah  11 ปีที่แล้ว +1

    Thanks man! No I can't bit bang a UART, like the TX/RX pins, because they have an agreed clock rate, so unless we can make that clock 1 bit per second, we won't be able to bang it

  • @CalonDdraig
    @CalonDdraig 11 ปีที่แล้ว

    Really useful demonstration of how bus based communication works and of the protocol is used - very helpful! Thanks for sharing such interesting, low level stuff - not enough focus on this level of systems these days!

  • @SirArghPirate
    @SirArghPirate 11 ปีที่แล้ว

    I'm currently working on a mpu-6050, your video is very helpful in understanding i2c.

  • @Kevindarrah
    @Kevindarrah  11 ปีที่แล้ว

    haha! man! bit banging the TLC5940? you're killing me! That is a lot of bit banging, especially since you need to clock that counter pin like 4096 times. But no I'm not a salaried educator, just a plain ole engineer... would be cool to make these tutorials full time!

  • @ravi613613
    @ravi613613 3 ปีที่แล้ว

    Never seen a video with this level of detail

  • @alanjrobertson
    @alanjrobertson 3 ปีที่แล้ว

    Fantastically clear video, I'm using I2C on the Raspberry Pi so it does lots of it for you, but understanding how the bus works is really helpful. Also amazing to see you manually communicating with the chip like that! 👍👍

  • @Diamonddrake
    @Diamonddrake 8 ปีที่แล้ว +2

    Great video, loved the demo. I really feel like I should try this out.
    The transistors for the leds I see why they were needed, but why did the buttons need to be on transistors? Why not just connect them to ground directly? And Hfe for the 2n3904 is 100~150 and the base current would be from 5 volts going through 110k ohms. (5/11000)*100 = 0.0045454. I sincerely doubt those leds needed current limiting resistors when the transistor was no where near saturated, You would have been lucky to get 5ma the according to your schematic. Unless I'm missing something.

  • @nicoyanez
    @nicoyanez 11 ปีที่แล้ว

    I hope you keep giving us these tutorials as well explained, thank you very much for each video, greetings from chile

  • @XCALIBUR4326
    @XCALIBUR4326 10 ปีที่แล้ว

    Kevin ,Although I2C user for sensors & EEPROMS This is excellent basics demo...Keep it diong

  • @saurabhsoni5047
    @saurabhsoni5047 8 ปีที่แล้ว +4

    Hats Off to you Kevin :)

  • @geiger21
    @geiger21 5 ปีที่แล้ว

    Wow it was fascinating and very helpful. Im currently bit banging i2c for AVR and this video was blessing for me. Thanks!

  • @TabletopJunkie
    @TabletopJunkie 11 ปีที่แล้ว

    amazing video. very informative. It would probably be pointless, but could be a fun challenge to have the bytes represented by an 8 switch dip package.

  • @HillOrStream
    @HillOrStream 11 ปีที่แล้ว

    Thanks Kevin for another excellent video! I need to learn I2C for a future project. Just learning the Arduino / ATtiny now, so this will be after a few other projects. But what I have been looking for is a I2C in to parallel out chip, to use the out bits individually to control DIP relays. Found chips that will do that, except they want to initially see a MPU on those parallel lines to setup the address, where I want a hardwired address (maybe a DIP piano switch). Your videos are a lot of help!

  • @krazybone48
    @krazybone48 10 ปีที่แล้ว +3

    This was really well done. Good Job

  • @jensfrobel6442
    @jensfrobel6442 10 ปีที่แล้ว +1

    Thank you. Good explainations on I²C and whole pull-up stuff

  • @icraftcrafts8685
    @icraftcrafts8685 6 ปีที่แล้ว

    For us coders who love mcu's and internals, this video has to be one of the best :)

  • @Kevindarrah
    @Kevindarrah  11 ปีที่แล้ว

    cool, glad my videos helped... kind makes it all worth it for me!

  • @Shoefly007
    @Shoefly007 11 ปีที่แล้ว

    Another great video. Thank you for tackling one of the concepts I shuddered to try and understand. Keep up the great work!

  • @helmobaard7052
    @helmobaard7052 3 ปีที่แล้ว

    You have done an excellent job with this video!

  • @Kevindarrah
    @Kevindarrah  11 ปีที่แล้ว

    yea, man glad you liked!

  • @Kevindarrah
    @Kevindarrah  11 ปีที่แล้ว

    ha, no! There's no sarcasm; it's a good question, and might be needed, especially if your inputs are toggled quickly. I answered your question while I was flying through my youtube inbox...

  • @PilotPlater
    @PilotPlater 11 ปีที่แล้ว

    very cool video. Used EEPROMs before, but never understood the protocol.

  • @YvoPutter
    @YvoPutter 10 ปีที่แล้ว

    Great tutorial, breaks it down to the core and even explains the LED's in this setup, although I'd love to know how to be sure that those buttons don't bounce. Even for a newbie like me this was easy to follow, keep up the great work!

    • @marshalcraft
      @marshalcraft 10 ปีที่แล้ว

      well i think in i2c data is actually transmitted when the clock drops low so isnt a problem for data line as it will be already stable in it's position for the transition of the clock line, my guess is that any voltages during brief contact of the switch does not register, not really sure.

    • @MilesTailsPrower86
      @MilesTailsPrower86 10 ปีที่แล้ว

      You don't have to worry about the SDA (data) line, but the SCL (clock) line is a different story. If your clock is bouncing all over the place, you may run into trouble. It looks like he has a capacitor on the clock line.

    • @marshalcraft
      @marshalcraft 10 ปีที่แล้ว

      yes you are EXACTLY right, i sense seeing this have constructed the very same type of circuit but for a lis3 nano accelerometer from stm. after building and actually communicating with the ic through i2c i see that it would be a very real problem with the clock line though i2c protocol limits to 400mhz so i wonder what would happen if it was faster than that the intermitent signal from the clock? i could post a video of my accelerometer circuit but it is very messy, my bread board is tiny and wiring is not neat but it works, i have read the "who am i" register and confirmed the replied byte with the data sheet, also i have read the lower portion of the 2 byte output register for all three axis to see if the accelerometer was working cause i had to reflow it to a break out board and it is an lga-16 so very small 3 x 3 mm and has 16 surface mount pads. if you would be interested in a video i could make one.

  • @Kevindarrah
    @Kevindarrah  11 ปีที่แล้ว

    yea, I was scared as well! My DS1307 RTC sat in my bin for a long time before I attempted I2C

  • @TechnologyRules
    @TechnologyRules 8 หลายเดือนก่อน

    This is simply amazing. Thank you so much for the effort put into making this video. I mostly talk emotionally. I can see you struggled a little bit in heart for some reason. But it came out great, man. Good job!
    This will definitely help me in not using the nasty Arduino IDE for rendering on a display through the ATtiny13A (which I love)

  • @nara49veera12
    @nara49veera12 2 ปีที่แล้ว

    A very good insight in to IIC working

  • @saitamatechno
    @saitamatechno 11 หลายเดือนก่อน +1

    amazingly helpful video, thank you so much! I look forward to trying it.

  • @jasoncole739
    @jasoncole739 10 ปีที่แล้ว

    I keep running into your videos and just had to subscribe. You do such an amazing job of making things clear. Thanks so much!

  • @BitBerlin
    @BitBerlin 11 ปีที่แล้ว

    Still with you till the bitter end. I love your whole manual control demonstration. It really visualizes the internal workings, as you did with the shiftreg vid too.
    How's the reflow oven progressing?

  • @sieja
    @sieja 8 ปีที่แล้ว +1

    Kevin the video is so interesting
    especially (for me) about sniffing LED
    can you do tutorial about basic stuff with transistors resistors and capacitors? ie. why here is 10k resistor and what if we change to bigger or smaller, how to combine with transistor etc
    for me this tutorial was way to short :) love the way you explain everything
    and thank you so much for your videos

  • @NickT6630
    @NickT6630 5 ปีที่แล้ว

    Great video. I watched it when I was first learning to code I2C routines in software.

  • @roberteliassen5020
    @roberteliassen5020 7 ปีที่แล้ว

    Excellent work! Thanks! It was not boring at all.

  • @peasedustin
    @peasedustin 11 ปีที่แล้ว

    good stuff brother, not as boring/painful as you might think. thank you

  • @eugenwesseloh2394
    @eugenwesseloh2394 9 ปีที่แล้ว

    Excellent video! It was very clear explained and demonstrated. I've really enjoyed watching it.

  • @9876543210goodbye
    @9876543210goodbye 11 ปีที่แล้ว

    Great Video!
    You have done a great video in the past on the tlc5940 led driver.
    I was wondering if you could follow up on the tlc5940 video with a similiar bit-bang
    process much like you have done with this I2C video.
    If you are not currently a salaried educator....You Should be.

  • @railspony
    @railspony 8 ปีที่แล้ว

    That was really great, thanks! Not bored.

  • @Kevindarrah
    @Kevindarrah  11 ปีที่แล้ว

    cool, glad you got something out of this

  • @johnmellor6065
    @johnmellor6065 7 ปีที่แล้ว

    they say what goes around comes around i hope you get repaid for all the good stuff you are doing best wishes

  • @N1CH0LAS12
    @N1CH0LAS12 11 ปีที่แล้ว

    I just wanted to say thank you very much for this tutorial.

  • @uvlight
    @uvlight 11 ปีที่แล้ว

    very clear, informative and educational~
    will try to replicate this myself.
    Thank you.

  • @jjh1373
    @jjh1373 8 ปีที่แล้ว

    Excellent video and GREAT idea!

  • @bonbonpony
    @bonbonpony 2 ปีที่แล้ว

    Wow, this might be the most practical and to the point explanation of the I²C communication that I've seen on TH-cam, and I've seen a lot! (most of them made by Hindus)
    BTW the clock line actually _can_ be controlled by the slave device, in a so-called "clock stretching" mechanism. When the receiver is busy and cannot accept our data at the current rate, it may pull the clock line low until it's ready to receive the data, and the master will notice that, because it's constantly reading the SCL line as well and checking if it follows the changes it applies to that line. If it sees that the line is already pulled down by someone else (the slave, in this case), it waits until it gets released and goes high again.

  • @zsoltsz2323
    @zsoltsz2323 5 ปีที่แล้ว +1

    How did this work out without debouncing the clock button?

  • @MarcoTedaldi
    @MarcoTedaldi 11 ปีที่แล้ว

    Really great Video. Thank you very much.
    Just one little Mistake seems to have it made into this Version. At 16:15 you key in the address for reading back the data and also say it the right way. But on the screen the notes show "111" instead of "000" for the second part of the address.

  • @stockerns328
    @stockerns328 9 ปีที่แล้ว

    Beautifully explained. Thankyou so much.

  • @WacoTobaco
    @WacoTobaco 11 ปีที่แล้ว

    awesome vid mate. i m not new to i2c yet i found this quite educating. Keep Up.

  • @N1CH0LAS12
    @N1CH0LAS12 11 ปีที่แล้ว

    I just wanted to say thank you very much for this tutorial. And I was wondering if it would be possible to bitbang with serial? And if possible could you do a tutorial on that?

  • @Kevindarrah
    @Kevindarrah  11 ปีที่แล้ว

    cool! let me know how it works!

  • @priyabratasaha5385
    @priyabratasaha5385 7 ปีที่แล้ว

    Awesome!
    What about a button controlled serial communication?

  • @cristhianmoore1475
    @cristhianmoore1475 7 ปีที่แล้ว

    Kevin, great video. could you please do one going over the hardware in SPI, and USART??
    ???? PLEASE!

  • @Kevindarrah
    @Kevindarrah  11 ปีที่แล้ว

    Thanks!

  • @pcmedicbiz
    @pcmedicbiz 7 ปีที่แล้ว

    Excellent!! - just confused why Bounce isn't an issue?

  • @Kevindarrah
    @Kevindarrah  11 ปีที่แล้ว

    yea cool, hopefully this video helps you with your project

  • @alurihariharan5082
    @alurihariharan5082 2 ปีที่แล้ว

    hey kevin nice work nailed the i2c explanation i have only 1 doubt what is delay for start and stop...? and what is speed...?

  • @Kevindarrah
    @Kevindarrah  11 ปีที่แล้ว

    cool! I am always happy to hear that my videos are reproducible.

  • @lucysluckyday
    @lucysluckyday 8 ปีที่แล้ว

    Cool! You just answered a previously unanswered questions of mine :)

  • @Kevindarrah
    @Kevindarrah  11 ปีที่แล้ว

    ha, yea, I probably could have shortened up some of the rambling

  • @bakupcpu
    @bakupcpu 11 ปีที่แล้ว

    Ouah! Lots of info for a Sunday morning! Gratz My friend it all made sense very well explain! Cheers!

  • @Kevindarrah
    @Kevindarrah  11 ปีที่แล้ว

    nice!! yep, you're right, fixed with an annotation Thanks!

  • @Kevindarrah
    @Kevindarrah  11 ปีที่แล้ว

    yea, that would be cool

  • @Kevindarrah
    @Kevindarrah  11 ปีที่แล้ว

    thanks!

  • @GeorgeGraves
    @GeorgeGraves 11 ปีที่แล้ว

    Awesome video - I think it would have been a bit easier to understand with a logic analyzer type graphic to explain it - but still - very interesting!

  • @ZXRulezzz
    @ZXRulezzz 11 ปีที่แล้ว

    I once had to bitbang Z80 buses/clock by hand the same way, trying to check some peripherals are working =)

  • @SadamFlu
    @SadamFlu 11 ปีที่แล้ว

    Another great explanation, just like the shift registers! Thank you heaps man!

  • @Kevindarrah
    @Kevindarrah  11 ปีที่แล้ว

    oh boy! Having to do this in real life sounds very scary!

  • @peasedustin
    @peasedustin 11 ปีที่แล้ว

    can we get a parts list in the description?

  • @ThirdPer3on
    @ThirdPer3on 6 ปีที่แล้ว

    That is so awesome! DE-MYSTIFY! Thanks for these videos!

  • @buzzwerd8093
    @buzzwerd8093 11 ปีที่แล้ว

    Nice tour, very good. I'll post a link on the Arduino forum and tell them to give you tumbs ups. You should at least get a few interested chip-heads and then when newbies ask about I2C maybe some references here.

  • @RandomDigits
    @RandomDigits 11 ปีที่แล้ว

    Cool, why is it necessary to use transistors on The buttons?

  • @tugaric
    @tugaric 4 ปีที่แล้ว

    Amazing explanation! Subbed

  • @raymondphiliphernandez3731
    @raymondphiliphernandez3731 9 ปีที่แล้ว

    Excellent work man..!!
    really explained well the I2C protocol..Kudos.. ^^,

  • @IntegralMoon
    @IntegralMoon 10 ปีที่แล้ว +1

    Awesome tutorial! Thank you so much for taking the time to make that :) Just wanted to ask though, why are the transistors there in your circuit? Why couldn't you just have the push button to directly ground the SLL and SDA lines in the place of the transistor?

    • @Brutepaintballer
      @Brutepaintballer 10 ปีที่แล้ว +2

      He needed to use the transistors in order to keep the signal 'normally high'. When he presses the switch it biases the transistor and allows the 5V signal to be pulled low. This makes it easier than keeping his finger pressed on the button to keep the light on, which would be the case if he connected the switch directly to the SDA and SCL lines.
      In the I2C standard, the signals should be left high when the bus is idle and waiting for a start condition from the SCL line. He shows the circuit at 23:11 (LINK: th-cam.com/video/8ZYMrcHm91s/w-d-xo.htmlm11s) in the video and explains their purpose.

    • @hairyfro
      @hairyfro 9 ปีที่แล้ว +1

      Pete D'Amico But if the switch was connect to ground, it would have the same function, wouldn't it?

    • @TimCaswell
      @TimCaswell 9 ปีที่แล้ว

      Nicholas Stahl I have the same question. Initially I thought the transistors were to help with de-bouncing, but he says the caps help with that. I guess one way to find out is try and build it without the transistors.

    • @roberteliassen5020
      @roberteliassen5020 7 ปีที่แล้ว +1

      One cap cannot do switch debouncing, you'll need a resistor and a cap to do that (an RC-network). That's why he needed the transistors on the input. Pulling low through a resistor could work, but it wouldn't be really low. It would be close to +0.5V if he used 1k pull-down (10k in series with a 1k).

  • @MichaelOfRohan
    @MichaelOfRohan 3 ปีที่แล้ว

    13:15 nuh-uh! What about the random read? Takes a write signal and a read signal but im sure ur eeprom does that?

  • @diamony123
    @diamony123 5 ปีที่แล้ว

    Great job..im a newbie and i understand it... its not magic, its speed how everything works

  • @YvoPutter
    @YvoPutter 10 ปีที่แล้ว

    @BvPhusa That's also my question, else you would get uncontrolled highs right?

  • @Kevindarrah
    @Kevindarrah  11 ปีที่แล้ว

    thank you!

  • @neptunes4you
    @neptunes4you 11 ปีที่แล้ว

    Can you do this with SPI? It would be really great... :)

  • @Kevindarrah
    @Kevindarrah  11 ปีที่แล้ว

    cool, glad the vid helped

  • @Kevindarrah
    @Kevindarrah  11 ปีที่แล้ว

    cool! appreciate that

  • @mgabrielle2343
    @mgabrielle2343 6 หลายเดือนก่อน

    Excellent Project for those who saw serial memory as mystical chips. (Sorry it took me 10 years to see this video)

  • @N1CH0LAS12
    @N1CH0LAS12 11 ปีที่แล้ว

    Oh ok. Thanks for the response man.

  • @kitupecomedy4150
    @kitupecomedy4150 7 ปีที่แล้ว

    I tried but i failed can you give me some instructions

  • @andr27
    @andr27 8 ปีที่แล้ว

    I was about to perform such experiment ages ago when I didnt have a compter :D
    finally, after dozen of years somebody made it :D

  • @xetra1155
    @xetra1155 9 ปีที่แล้ว

    Can You do that for a UNI/O EEPROM with Manchester Encoding?

  • @MichaelOfRohan
    @MichaelOfRohan 3 ปีที่แล้ว

    You would not believe how confusing ack is to someone with a datasheet having never seen i2c before. Its simple. Bits go in, master check low from slave, if low, clock out the ack and continue. Thats the whole point, to ensure the slave is seeing proper data sequence.

  • @patrickjeromeobaldo2450
    @patrickjeromeobaldo2450 11 ปีที่แล้ว

    Hey Kevin! Thanks for making this one :D

  • @benshapiro2wt298
    @benshapiro2wt298 8 ปีที่แล้ว +1

    Could you do SPI?