#82 ATTiny85 + I2C + SPI and more!

Поделиться
HTML-код
  • Опубликовано: 20 апр 2017
  • New! ralphbacon.blog
    We investigated the ATTiny85 8-pin microcontroller a while ago so an update is well in order! This time we get it to do some useful things but is it enough to make this a your microcontroller chip of choice?
    We look at a development shield (fits a standard-size Uno) to make your programming much easier but there are a couple of caveats you really need to be aware of! Nice development kit though, and I'm almost tempted to say "Don't start programming the ATTiny85 without one!" (no, I don't get commission).
    Spoiler alert - a future video expands on its capabilities and I definitely warm to this tiny chip, almost to the point of becoming enthusiastic, so stay tuned for a future update!
    All the libraries, demo code and the like can be found on GitHub here:
    github.com/RalphBacon/ATTiny85
    -------------------------------------------------------------------------------------------------------
    And links to many items in the video can be found here (you need to watch the video to put this all in context):
    -------------------------------------------------------------------------------------------------------
    Add this addresses to File - Preferences - Additional Boards Manager URLs
    raw.githubusercontent.com/dam...
    Other boards (watch the video) can be added too if you want:
    raw.githubusercontent.com/spa...
    digistump.com/package_digistum...
    arduino.esp8266.com/stable/pac...
    Arduino Playground article on I2C for the ATTiny85 (Master & Slave)
    playground.arduino.cc/Code/USIi2c
    ATTiny85 Spec Sheet
    www.atmel.com/images/atmel-258...
    DS18B20 Datasheet (OneWire)
    datasheets.maximintegrated.co...
    Arduino/ATTiny85 website (contains RGB LED fader sketch for ATTiny85)
    attiny85.blogspot.co.uk/2013/0...
    ---
    If you like this video please give it a thumbs up, share it and if you're not already subscribed please do so :)
    My channel is here:
    ------------------------------------------------------------------
    / ralphbacon
    ------------------------------------------------------------------
    How can I remember this? Memory tip: "See" Ralph Bacon, geddit?
  • НаукаНаука

Комментарии • 196

  • @fjonesjones2
    @fjonesjones2 6 лет назад

    Great videos Ralph mate. Like your presentation methods. Nice and easy to understand. Good close ups, many thanks.

    • @RalphBacon
      @RalphBacon  6 лет назад

      Nice to hear those words Fred, I'm very glad you like them. Always a new video every couple of weeks (or so, it depends very much on Benny, my rescue cat, deciding if he wants to show me how to use all this newfangled stuff. If you haven't met Benny in my videos yet, keep watching, he makes cameo appearances from time to time.) Thanks for posting. :)

    • @fjonesjones2
      @fjonesjones2 6 лет назад +1

      No worries Mate, will keep an eye out for Benny :-)

  • @froggle611
    @froggle611 3 года назад

    Thank you so much for the liquidcrystal i2c library. I have tried several over the past couple days and yours is the only one to work...

  • @danljohnston
    @danljohnston 7 лет назад

    Thanks for making this video, Ralph. I just got a few 85's to play with mostly. I built a programmer from Instructables, which was fun. Your posted links will be a help with my learning as my coding skills are not that sharp.

    • @RalphBacon
      @RalphBacon  7 лет назад +1

      Yes, I quite like the Instructables site, I even started to put some of my videos up there too. But the one I'm following is right now for a secret project all to do with the Tiny85 - I can say no more, Benny has made me sign a non-disclosure agreement (again).

  • @AtomkeySinclair
    @AtomkeySinclair 5 лет назад

    You can piggy-back an 8 pin dip socket on top of the ATTINY you PCB mount so you have some holes to plug wires into for programming later on. It just takes a little patience and a steady soldering hand. And even if you have other things wired into the pinouts, it will often times work with no issues. Just make sure to put a 10uf cap in for the auto reset issue on your UNO for the ISP.

    • @RalphBacon
      @RalphBacon  5 лет назад

      Excellent suggestion, Atomkey Sinclair, thanks for sharing. I suppose it also might work with 2 x standard 4-pin socket headers (that are guaranteed to accept Dupont cables)? A bit more fiddly perhaps. Thanks for posting this suggestion, appreciated.

  • @TheUnofficialMaker
    @TheUnofficialMaker Год назад

    fantastic. thank you for your engineering to make it simple for us.

  • @Inertia888
    @Inertia888 4 года назад

    I think the resistors on sda/scl are there to keep it stab;e/ sp basically it will work without them.. ans sometimes it won't. Just like he said happened.

    • @RalphBacon
      @RalphBacon  4 года назад

      Basically, you need ONE set of pull up resistors on SCL/SDA. The trouble is, most modules have them fitted so no-one checks anymore. Then two things happens. I2C fails to work because there are NO pullup resistors, or that there are too many (if you have several modules attached to I2C, for example.

  • @javierpallalorden
    @javierpallalorden 7 лет назад

    Nice video, the ATTiny85 is sometimes very handy to have around, small chip and easy on the power.

    • @RalphBacon
      @RalphBacon  7 лет назад

      True, Javier, and I am most definitely warming to it. And definitely easy on the power, especially at 1Mhz which might be all you need. I was worried that I2C or Serial would not work at 1Mhz but it most certainly did. Thanks for posting!

  • @Inertia888
    @Inertia888 4 года назад +1

    Thank you very much for the video good sir!

    • @RalphBacon
      @RalphBacon  4 года назад

      Glad you liked it Darrick, thanks for posting.

  • @MrBobWareham
    @MrBobWareham 5 лет назад

    Hi Ralph,The turn pin headers you don't like are the better pin headers as they are anti-creep headers that stop the chip working its way out when in a situation of vibration but are more expensive I used to use then on my temperature controllers to hold the Pic micro in place but we then changed to SM so that fixed that, nice video I want to pulse two strings of LEDs with PWM so I am going to use the ATTINY so your video will help all the best Bob

    • @RalphBacon
      @RalphBacon  5 лет назад

      The turn pins might be great for IC pins but Dupont cables don't fit, that's the issue (for me), Bob. I've seen chips tied down with cable ties before now... Good luck with your strings of PWM-controlled LEDs, should be ready for Xmas? Or the summer BBQ?

  • @mantolis
    @mantolis 7 лет назад +1

    Great video Ralph.
    I have bought this shield from amisail3 eBay and it works great.
    It has all the instructions and in my opinion is a waste of time to try uploading code to Attiny without a shield like that or a similar one.
    Also I have found Attiny very usefull for small projects low on consumption.
    Thanks for all the Arduino videos.

    • @RalphBacon
      @RalphBacon  7 лет назад +1

      You're most welcome, Icc Con, glad you found the video useful.
      Now, you *can* upload code to an ATTiny without this shield (or any other) using an FTDI USB-to-serial converter, of course, as my video #66 shows, but this way is in many ways easier. The other way is to buy a Digispark version which has a USB port and a bootloader already installed (although that does consume about 2K of the available 8K of memory). Memory fails me but I might have already included that in the #66 video.
      But I quite like this shield and I have a future video in progress that will enhance the ATTiny85's usefulness too, but Benny has refused to allow me to say more. Stay tuned!

  • @SpeccyMan
    @SpeccyMan 7 лет назад

    The thing I like about the ATtiny85 is it will happily run on a single cell Li Ion battery so handy for low power projects. I don't actually use that shield anymore as I took the plunge and upgraded to a 'proper' AVR programmer but it certainly filled the gap beforehand.
    One thing you could also cover would be to add an i2c 23017 port expander chip to the ATtiny85 to increase the available GPIO.

    • @RalphBacon
      @RalphBacon  7 лет назад +1

      Hey, Nick, there you are! I was wondering if you would "make an appearance".
      Yes, I was originally going to use a pin-extender of some sort with this chip, but decided to first explore its native capabilities and I was impressed, it must be said. But that original idea (which you've reiterated) has not been forgotten, so stay tuned! Nice to hear from you again. BTW what programmer did you get?

    • @SpeccyMan
      @SpeccyMan 7 лет назад +1

      Actually Ralph, I have two programmers now. I initially bought a really cheap USBASP from eBay but it had timing issues and needed another programmer to flash new firmware. Because of this I decided to count my losses (and cash in a few Nectar points) and bought an AVRISP MKII. As I use Atmel Studio a lot it made sense to get that one.

  • @willofirony
    @willofirony 7 лет назад +1

    Thanks for the heads up on the pin straightening tool. Been looking for one of these, never thought of Maplins. (TBH, I couldn't think what to call 'em).
    I like the ATTiny85. I really want to use the I2C slave mode to bring a cluster of sensors together with the one I2C connection. Most of all, though, I like the fact that it IS limited. I know that reads weird, but using an ATMega328 but only utilising only a few pins (or timers etc) sets my OCD on edge and I waste a LOT of time trying to think of other things the 328 could do. Don't get me started on putting a 32 bit MCU like the ESP8266 to good use.
    Brilliant video, Ralph, you make 35 minutes go by like the blink of an eye. Thanks

    • @RalphBacon
      @RalphBacon  7 лет назад

      Hey Michael! I hope you do find that pin straightener tool (Maplin is probably an expensive, albeit convenient source) but I'm sure eBay must have them too.
      Now you' the third person to mention *SLAVE mode I2C* so perhaps I'll add this to my list of things to demo (It's not rocket science, but it is useful). And I hear what you say about over-engineering projects using a µController way too powerful when an ATTiny85 fits the bill just right!
      Sorry about the 35 minutes you lost in that space and time continuum of my video, I do actually try and get them down to 20 minutes but so far have been pretty unsuccessful! Next time, maybe! Thanks for the support, always good to hear from you.

    • @willofirony
      @willofirony 7 лет назад +1

      I only found one pin straightening tool on ebay and with postage, that was only pennies cheaper. We have a Maplin abit 15 miles away and no doubt I will find LOTS of stuff I have really needed ALL my life; when browsing the shop. Ebay spoils us. One gets so used of being able to get 50 of things one only really needs 1 or 2 of, for £0.99.
      It would be awesome to see your treatment of I2C slave mode on the ATTiny85. Sod's Law suggests that employing that mode leaves too few resources to communicate anything useful to the Master. Prove my cynicism wrong, PLEASE.
      As to timing: the 35 minutes took no time to pass but the 24 seconds seem to take forever. Seriously, the concept of one of your videos taking too long is far too abstract for me to conceive.

  • @neilbarnett3046
    @neilbarnett3046 6 лет назад

    You must be using weird flux if it's going to cause shorts!
    You probably know, but for anyone else's information, the little connectors you refer to as "...header pins" (that have given you trouble before) are actually single-pin IC sockets, they aren't headers nor should they be used as headers. It may seem weird to have individual IC socket pins, but we often used them for prototypes in the 1980s, especially if we couldn't find a 24-pin socket, but we had a 20-pin.
    Great video as usual, keep them coming!

    • @RalphBacon
      @RalphBacon  6 лет назад

      I'm glad you cleared that up, Neil, because those round pins "headers" are rubbish for Dupont cables. But may be useful for chips for which we don't have the correct socket, as you say. In that case I will not dispose of mine, but move them to the drawer marked "IC Sockets". Thanks for sharing that useful information.

    • @thepvporg
      @thepvporg 6 лет назад

      Actually, Flux is electrically conductive, look it up...

  • @BerndFelsche
    @BerndFelsche 7 лет назад

    I recently built an I2C slave with a Tiny85 to run some PWM devices with odd frequencies: having exhausted timers on a Mega. Went a little over requirements by allowing PWM frequencies from below 25Hz to more than 35kHz. There's still a pin for tacho from the PWM controlled device, using the WDT for base interval counting tacho pulses.

    • @RalphBacon
      @RalphBacon  7 лет назад

      And a great, practical way of solving a problem (although how you "ran out of timers" on a MEGA - it does have SIX right? - beats me). I didn't have the time to run the Tiny as a slave (and most people probably won't but it would be a good things to demo). I did a video on custom PWM using a library that allowed me a frequency of 1Hz to 1Mhz - and I even included a scope shot of it working at that speed! Not sure how practical that would be but good to know we can. Thanks for letting me know the Tiny works as a slave, anyway, I might still demo it in a future video.

    • @BerndFelsche
      @BerndFelsche 7 лет назад

      It's got 7, including WDT. ;-) FreeRTOS uses that for its base.
      I ran out because each timer can only operate at one frequency; and one on the Mega is used to count external event for metering frequent "microevents" (up to 32,000 per second) and converting them into "meter clicks" using a counter comparator. Another TC is used to generate those events; motor stepper pulses at varying frequency with pulses at the necessary width in microseconds. The metering is required as the TC producing stepper pulses runs without CPU intervention and we need to know how far the motor has turned. (Stepper runs at 3200 steps/rev at up to 600 rpm).
      It's part of a complicated machine that has to respond in real time; things can go bang in a magnificent way if not managed in a timely manner.
      One way of managing the complexity was to not try to second one of the critical timers to "multiplex" PWM and to check fan speeds from tacho feedback (one fan does 13 pulses/rev at speeds up to 3000rpm; generating 650 interrupts/second); and then there's more than one fan; at a very different PWM frequency that is not a "harmonic" of the other. Tiny85 with I2C provides scalability.
      Remember how to eat an elephant: One mouthful at a time.

    • @RalphBacon
      @RalphBacon  7 лет назад

      Hmm, that does indeed sound complicated but a nifty solution too. Good stuff, Bernd, thanks for letting us know!

  • @ColinRichardson
    @ColinRichardson 6 лет назад

    Can someone tell me the names of the cables hes using at 9:45 ? So the small "hookup" (he doesn't like) and "dew point" (he does like) ??
    The official names, so they can be searched for on Google.

    • @RalphBacon
      @RalphBacon  6 лет назад +2

      "I hate them with a passion", I said Colin, which was a bit strong but they are not good, those round ones.
      The ones that everyone uses are *Dupont* cables, and they come in strips of 40, with the option of male-to-male, male-to-female and female-to-female. I order these every now and again (1 strip of 40 for each variant) as they can get damaged over time (and, mysteriously, you can just 'lose' them).
      They come in 3 main lengths: 10cm (quite short), 20cm (average) and 30cm (long). I use all three but have just ordered some more 30cm lengths so I can connect to modules that need moving about a bit. They would be far too long for connecting from a breadboard to an Arduino so I use 10cm or 20cm cables for that. Basically, if you're serious about this you really need all three to avoid either frustratingly short cables or a birds nest on your workbench!
      Here's a link to AliExpress which is a good 30cm example: www.aliexpress.com/item/Free-shipping-Dupont-line-120pcs-20cm-male-to-male-male-to-female-and-female-to-female/1899750504.html
      I hope this helps!

  • @teravolt1195
    @teravolt1195 4 года назад +1

    Any idea if you can run RS485? My DHT22 digital temp sensors are too far from my central Arduino and are unreliable. I'd like to deploy them on ATTiny85's with MAX485's to create a network to talk back to the main Arduino/PC.
    (I ask because I haven't played with RS485 before, only RS232 directly on the Arduino pins. I assume I only need two digital pins the same, but don't know if they need to specific. Hopefully I'd be left with a digital pin for the DHT22 and an extra or two for auxiliary general I/O I could use for remote relays/LEDs, possibly analogue input, PWM driven loads.) Thank you!

    • @RalphBacon
      @RalphBacon  4 года назад

      I've not tried an ATTiny85 on RS485 but I did a video on RS485 using Arduinos ( ruclips.net/video/Bhvap1qXcHg/видео.html ) I'll let you have a look at that to see what it entails. Pretty simple and reliable.

  • @asagk
    @asagk 5 лет назад +2

    Could it be that your I²C communication does not work when the shield is connected because the pins of the arduino below are configured in a way that they drain the voltage from the pullup resistors of SCL and SDA to GND? --- The typical implementation for unused pins is to switch them to be outputs driving them low, or to have them as inputs with internal pullups set, to prevent harm as well as to see a defined state to prevent io-pin-hardware from randomly toggeling like crazy. Since your Arduino below does not seem to do anything much, it perhaps drives the pins you use for "software I²C" through the connectors permanently low and from that communication with the LCD cannot take place? --- Just guessing...

    • @RalphBacon
      @RalphBacon  5 лет назад

      And to be honest, Sebastian, I'm guessing you could be correct. Another issue with I2C modules is that they _all_ tend to have those pull-up resistors attached to the lines. Get too many of those connected together and I2C will not work any more. The solution is to desolder the ones not needed, but that's hardly practical.

    • @asagk
      @asagk 5 лет назад

      @@RalphBacon Even more dangerous might be not to desolder them, since their resistor values add up as parallel resistors and from that increasing the currents to a point where the open collector drivers in ICs will burn to ashes. So I would encourage you in fact to desolder them, even when this is the sort of fiddely work no one likes to do. But you will better better of to do so...
      Especially when it comes to Raspberry Pi, since the Pi already has something like 1k8 resistors on the I²C lines installed. Adding more resistors in parallel will most likely destroy the processor of the pi because of the to large currents being driven into the processor pins when the pi startss talking on I²C.
      Apart from all that, have a nice weekend, Ralph!

  • @artbecker5618
    @artbecker5618 7 лет назад

    Thank you for another excellent video. I got some ATTiny85 boards from Adafruit a few years ago (and I know your video #66 is about the similar but not quite as nice Sparkfun device -- I reuse to buy from Sparkfun any more for political reasons, which we won't get into here). She calls them Trinkets. There is a 5V Trinket ATTiny85 and a 3.3V version. They are under $7, fully assembled (except for headers), with a USB interface, so you can program them directly from the Arduino IDE. The 5V Trinket works at 16MHz and the 3.3V version works at 8MHz. There is a larger ProTrinket version that runs an ATmega328P. It is about the same size as the Arduino ProMini. They have tutorials & libraries for all the Trinkets.
    Like so many of the small boards I buy, the first thing I do is make sure the LED blinks, then I change the blink rate. Having thus skillfully mastered the board, I then put it in a box on a shelf.
    My experiments with general purpose 2X16 LCD I2C modules have always ended in failure. I can set the address OK (and, in fact, nothing happens unless the correct address is set). When the correct address is set, such as 0x27, what happens is that the screen immediately goes dark when addressed. If I un-solder the I2C adapter, then using the parallel pins works great. I have tried LCD modules with the I2C interface, and I have bought separate I2C adapters for parallel LCD modules. None of them work for me under I2C, and all the LCD displays work OK with a parallel device. I have no problems with other I2C devices. However, the specific LCD modules for Arduino, and for a Raspberry Pi, work OK. Just not the general purpose ones. [Lego Mindworks I2C is interesting, because it uses the same PCF8574 & PCF8591 chips, but requires 82K pull-up resistors]
    I purchased a couple of 8 neopixel strips, from China, but can only get the first 5 neopixels to ever do anything. Even hard-wiring them to a power source only lights the first 5 of each strip. Either I am doing something wrong (and I followed at least 3 different neopixel projects), or the strips are defective (and, if they are defective, either the seller knew it and shipped them anyhow, or else he didn't know it, but should have).
    I've used Arduino Unos to program other devices, and it always surprises me when it works. But those pesky warnings sure are pesky. I get them all the time. Research has shown that they can often/usually/always be ignored. So why are they there in the first place? What I really hate are the hard to program in Arduino devices, like a Teensy 3.2, and so on. You have to almost use voodoo, three hands, and then multiple attempts to get the thing into bootloader mode. Then you get to watch line after line of compilation information stream by in the status window. After all that, sometimes it works, and sometimes it doesn't, so you frequently have to start all over again
    I've never seen on of those nifty IC pin straighteners before. I have some manual ones that you slide the chip through. Mostly I just use the "roll them on their side until straight" brute force method.
    Thanks again for the interesting video.

    • @RalphBacon
      @RalphBacon  7 лет назад +1

      Quote of the day: *"Having thus skillfully mastered the board, I then put it in a box on a shelf."*
      I think this is a "man thing". We see something that looks like it might one day be useful, buy it, try it, then put it to one side until we actually need it (usually, never). That's why there are thousands of DIY tools, gym benches and, of course, electronic gizmos gathering dust across the globe in the "man cave" (shed/garage/workshop/spare bedroom).
      Regarding the 2 x 16 LCD you may find (as I did) nothing happens until you adjust the contrast variable resistor on the backpack PCF8574AT board. Easy to miss. Why they are not shipped with it set to something useful I'll never know.
      If you follow my demo for NeoPixels (using the same FastLED library) you should have no trouble at all. All my Neopixels work just fine using this library (which is quite involved in getting all the timing just right).
      Those warning are from the compiler as it compiles the underlying (library) code - libraries rely on other libraries which may now be out-of-date and thus generate warning. It's a bit worrying when a #define is #defined again somewhere - how do you know which value the compiler is now using? I changed the #define in, of all places. the Print library (as used in Serial.print) to stop some errors! I hope I don't come to regret doing that!
      Get yourself an IC pin straightener like mine - cheap and works like a dream. No more "rolling on the workbench" required.
      Good to hear from Art, glad you found it interesting.

    • @artbecker5618
      @artbecker5618 7 лет назад

      When I was watching your video #62, I immediately, and successfully, predicted that it would be referenced again in a comment you would make to me in video #82. I don't need a Tardis to time travel; I simply use my brain (and, just like the Tardis, my brain is bigger on the inside than it is on the outside).
      After a series of unfortunate events (none of which were my fault), I was able to test my two eight LED 2812 neopixel strips, using video #62 as a guide. Previous tests showed that only the first five of the eight LEDs would ever light. Using the FastLED library, I was able to confirm this for one of the strips, while the other one now only lights three of the eight LEDs. For the five that did light, I was able to change their color with no problem.
      I was also able to confirm that my nifty Keyes Uno clone, with its nifty male breakout pins for every data, power & ground signal, also does not work properly, and is thus no longer nifty. I tried the D2 and D3 male pins, and they both failed. The regular D2 & D3 connections, on the standard female header strip, worked just fine. Thus, the main purpose of buying that particular clone was frustrated (as was I).
      My current estimate of junk versus useful purchases from China is 5%. Only three products failed completely (for a loss of maybe $10), while the others had minor to major defects, but were still useful.
      Thanks again for your videos and technical assistance.

    • @RalphBacon
      @RalphBacon  7 лет назад

      My brain cells are bigger on the outside than the inside. Yes, both of them. So my brain is like an inverse Tardis. What you see is more than you actually get. Hang on, am I doing this wrong?
      I have had very few actual hardware failures with stuff from the Far East. I've had a couple of things not turn up, or turn up incomplete (such as a recent delivery of some very nice, compact 10K pots, but without the washers and nuts - the seller sent me those, separately, when I queried!).
      Sometimes the soldering is less than perfect (but then again so is mine!) but it's the Far East that let's me follow my hobby (and host this channel) so I'm quite forgiving when things don't always go 100%.

    • @TYGAMatt
      @TYGAMatt 2 года назад

      @@RalphBacon have to agree on goodies from the Far East. But as I'm in Thailand, it not that far and not that east!
      I have drawers full of stuff from China and the failure rate of the electronic stuff is very low. So called cheap and nasty mppt controllers work flawlessly, all my mcu's are clones and haven't had one yet that didn't work as it should. I think that they have it well sussed with this sort of stuff. Costs them practically nothing to copy stuff and make it by the bazillion, and then I can enjoy my hobby cheaply.
      Matt.

  • @Inertia888
    @Inertia888 4 года назад +1

    I think I read that it's the sda/scl data that can't be shared with the master chip and the lcd.

    • @RalphBacon
      @RalphBacon  4 года назад

      You may be right, I've not used an Attiny85 in some time now because I keep running out of pins!

  • @jimviau327
    @jimviau327 4 года назад

    Thanks, great video. Here is a suggestion for a further video. Have an arduino board send some numbers to an ATtiny85 via I2C or SPI. I have an application that I want to implement where I need to send (via Opto isolator) a number from 0 to 255 which would be utilized for telling the ATtiny85 the duty cycle for 120hz PWM signal. I want to directly drive an SCR ( hence, the Opto)

    • @RalphBacon
      @RalphBacon  4 года назад

      Would it not be better to optoisolate the SCR? But, as long as the optocoupler is suitable for the I2C (100kHz) or SPI (similar) signal it should work. But how about RS485 (long range), I did video on that and it was very easy (and I think it might have been optocoupled too, but need to check that). Or just use the RX/TX pair to talk directly to the other device via an optocoupler (short range)?

    • @schwartzenheimer1
      @schwartzenheimer1 4 года назад

      No, it will not work, because the I2C bus is bidirectional - the master sends address, the slave sends ACK/NOACK etc. The optocoupler is one-way only...
      Arduino kids, gotta love 'em.

  • @epleace
    @epleace 6 лет назад

    Hi Ralph, Thank you very much - I've been struggling for days trying to get my I2C LCD to work with ATtiny45 - spent hours googling, downloading various libraries, getting nowhere. Until now. With libraries and demo files on your github, I added code in LiquidCrystal_I2C.cpp & .h to check for __AVR_ATtiny45__ everyplace it was checking for __AVR_ATtiny85__, and now it's working at 1Mhz and 8Mhz.

    • @RalphBacon
      @RalphBacon  6 лет назад

      Brilliant! Consider that your Xmas present, epleace, from me to you! But seriously, I'm very pleased it all worked out and thank you for letting us (all) know your success story.

    • @patrickschonfeld1125
      @patrickschonfeld1125 5 лет назад

      Really Cool , I need to do the same.. So do I just need to rename the #if defined(__AVR_ATtiny85__) || (__AVR_ATtiny2313__) into #if defined(__AVR_ATtiny45__) and done or is there are more to consider?

  • @Inertia888
    @Inertia888 4 года назад

    ATtiny has 5 I/O pins but if you realy, really need a 6th one, I think you can use the reset pin as an I/O but you have to be careful since it cannot handle very much juice.

    • @RalphBacon
      @RalphBacon  4 года назад +2

      When you get to my "All 6 Pins" video you will get more information about this.

  • @aspectcarl
    @aspectcarl 7 лет назад

    Haven't seen one of those chip extractors for a very long time :)

    • @RalphBacon
      @RalphBacon  7 лет назад

      Just goes to show how long I've been around Carl! It's probably the right time to say that this particular chip extractor only *just* works on 8-pin chips (it's fine on longer chips). There are others, simpler, cheaper that would probably work that bit better, I think. I'm sure eBay and the Far East has them by the dozen, so if you need one, get one!

  • @BerndFelsche
    @BerndFelsche 7 лет назад

    8 and 16MHz internal clocks are reliable on 5V supply. 8 might work for you with 3.3V. Use the Burn Bootloader function to set the fuse bits in the tiny85.
    P.S. I had some old stock tiny85's that couldn't be recognized at all by either Arduino ISP or USBasp. So I dusted off an old STK500 and set it up for high voltage serial programming with avrdude to reset fuses to a sane state and to erase any contents. They've been good since then.
    PPS: I have a ZIF socket on small breadboard with wires to an USBasp to program the tiny85 out of circuit, which is a bit more work but more reliable as the live circuit can interfere with the serial programming... like bad readbacks... resulting from the pins being "overloaded".

    • @RalphBacon
      @RalphBacon  7 лет назад +1

      Interesting what you say there, Bernd.I've tried to find an 8-pin ZIF socket and failed. Yes, I know I could use a 14/16-pin one and just ignore the pin sockets not being used (perhaps covered by nice sticker!) but it would not be my first choice (this from a man who has large washers for touch plates on his video controller, hmm, the irony!). Anyway, shhhh on the fuses, bootloading and high voltage resetting, that will be a future video in the not so distant future. 8Mhz works fine on 3.3 volts for me, I didn't have the nerve to program it to 16Mhz until I knew I could reset it. But (and keep this to yourself) I'm getting to quite like the ATTiny85. Good to hear from you.

  • @astromkarl
    @astromkarl 7 лет назад +4

    Those are some weird looking transistors at 1:40 :)

    • @RalphBacon
      @RalphBacon  7 лет назад +3

      Ah, you've won this week's prize for spotting the new resistor-looking-transistor, very new, very strange indeed, to the point of being weird, as you rightly say! Oops!

  • @ismaherbert1500
    @ismaherbert1500 2 года назад

    El programa que usas para la pantalla i2c, donde puedo conseguirlo, he probado varios y no me muestra como deberia. Quiero mostrar voltaje y corriente en el lcd usando el attiny85.

    • @RalphBacon
      @RalphBacon  2 года назад +1

      Remember that the Tiny85 does not have _native_ I2C - you will have to bit-bang as I showed in this video or use a UNO/Nano that has it built-in. I use a standard 16x2 LCD (with the I2C PCF8574T "backpack" installed - or you just solder it yourself). The library I use is the LiquidCrystal_I2C, but it is no longer maintained. But it works very well and I use it in my current Smart Heater Controller project.

    • @ismaherbert1500
      @ismaherbert1500 2 года назад

      @@RalphBacon me parece bien así lo are, los programas que ejecutas, donde puedo descargarlos, me interesa mas el ultimo, donde muestras la temperatura. si me lo puedas compartir me seria de gran ayuda como guía a mi proyecto. muchas gracias por ayudarnos.

  • @TYGAMatt
    @TYGAMatt 2 года назад +1

    Hi Ralph. Any plans to do more vids on the ATtiny85 and/or ATtiny84?
    Been using the 85 in a few projects recently due to only using a fews pins, and just acquired a couple of 84's yesterday and successfully uploaded a sketch last night. I think they're pretty cool chips.
    Have made a couple of register name changes to my avr sleep code and although not actually uploaded, it compiles. Seems that the ATmega code will compile with the 84, but the 85 uses a different wdt register name.
    Anyway.... Just thought.
    Cheers.
    Matt.

    • @RalphBacon
      @RalphBacon  2 года назад

      TBH although the ATTiny85 is a great chip for smaller projects, or even as interface chips for bigger projects, the lack of even I2C (designed to connect chips together, remember) is a bit of a handicap.
      Yes, we can bit-bang both I2C and SPI (as per my previous videos) but we quickly run out of pins. The ATTiny84 has more, of course but then I get to the question: "Why am I doing this when I can get a cheap Arduino Pro Mini that has loads of built-in functionality and many more pins?" And all known Arduino code will run on a Mini as it's just an UNO without a USB interface.
      What sort of applications are you thinking of, Matt?

    • @TYGAMatt
      @TYGAMatt 2 года назад

      @@RalphBacon Thanks for the reply. Warning.... Very long post ahead!!
      Most of my uses are simple industrial things. For example, scratch building a dual axis sun tacking solar panel array. Using a nano for that. It basically sleeps for 10 mins (using your excellent code) then wakes, homes in on the sun and goes back to sleep. Another very useful project was a Li-ion battery spot welder using an ATtiny85 (my first time with this chip). Used all the pins and disnt need more so when I made the PCB for it, it was nice and small. This is what got me hooked on the ATtiny chips. Another recent one was hacking my cheapo laminator and building a temp controller. It's currently using an ATmega328P, but may well liberate that chip and use an ATtiny, again just because of its small size.
      Project at the moments is a current monitor for my 3D printer power supplies. I'm running a pair in parallel and need to keep an eye on current sharing. The 85 is working very well for this by monitoring by way of a pair of ACS712 modules and displaying the current on an OLED.
      Other projects such as my engine ignition simulator and motorcycle data logger use an ATmega328P and ESP32 respectively. The ESP32 is great as I've got pretty much every pin in use reading a sensor or doing something.
      So what would I like to see from the smaller chips? Using timers perhaps. Maybe cunning ways to keep memory use low, as that always worries me a little. An example is the MPU6050 IMU that I'm using with the ESP32. I'm using the MPU6050_tokn library, but it sucks up a lot of memory, so a basic tutorial on i2c and how to interpret the data sheet with the 85 (or ATmega328P) would be great. I know you've done loads on i2c but having some detailed stuff in one super long vid would be a wholesome watch.
      Probably blabber Ed on enough.
      Merry Christmas.
      Matt.

    • @RalphBacon
      @RalphBacon  2 года назад +1

      I thought I had a lot of projects on the go at any one time; you beat me hands down, Matt!
      Keeping memory low can be achieved if you are prepared to look past the Arduino-speak C++. Using slightly terser syntax can save quite a bit of space on the smaller chips. I did a Fridge Alarm challenge a while ago to see whether I could get the code and functionality of an existing Nano fridge alarm squeezed into an ATTiny13. It would be a lot easier with an ATTiny85. Video #'177 gives some ideas, as do the comments:
      ruclips.net/video/w9EO3Xm-fHU/видео.html

    • @TYGAMatt
      @TYGAMatt 2 года назад

      @@RalphBacon Mant thanks for the reply Ralph. I'll watch your vid.
      Was playing again with my current sensor today, implementing some extra features. Agreed on straying from "Arduino speak". I try that as much as I can, but I'm still learning.
      If using just the chip then I don't use a bootloader so this gives me a bit of memory to play with.
      As you said previously, probably would be easier to just use an ATmega328P, but I like a challenge! :-)
      Having said that, I got myself an ATmega328P au smd chip in a quest to go small, but so far my smd soldering skills leave a lot to be desired LOL!
      Anyway. Hope you had a great Christmas and all the best for a video packed 2022.

    • @RalphBacon
      @RalphBacon  2 года назад

      Thanks Matt; and don't forget the Arduino Mini is very small with all the UNO capabilities!

  • @GTIBert
    @GTIBert 4 года назад

    Nice video.
    Where do you get those decals for on the pins

    • @RalphBacon
      @RalphBacon  4 года назад

      They came with the kit I used - but you can make your own very easily on the computer, in the same way I do for the Arduino pin headers. Very useful.

    • @GTIBert
      @GTIBert 4 года назад

      Thank you for this response.
      Do you have an example to make this yourself.
      I would be very grateful to you.

    • @RalphBacon
      @RalphBacon  4 года назад

      I had a look but I could not find the ones I used, sorry. But, frankly, you can just do this freehand, neatly, keeping the pin spacing correct (0.1" or 2.54mm) and it works quite well. You may spot my hand drawn ones on the Arduinos I use. Best I can suggest.

    • @neilbarnett3046
      @neilbarnett3046 3 года назад

      I made some that I have used, I just printed them onto label paper. they are at this link:
      www.dropbox.com/s/bz64pmnrqp3e9hn/Arduino%20labels.xlsx?dl=0

  • @sickvic3909
    @sickvic3909 7 лет назад

    What are those f/ header pins called?
    Can u explain how 2 put included code in a separate tab so it could be changed?

    • @RalphBacon
      @RalphBacon  7 лет назад

      The female header pins are actually called header sockets but I must admin I erroneously refer to them as "pins". Well, they have got pins to solder in but it's the socket part we're interested in. I will make every effort to refer to them as "sockets" in future videos, Vic.
      To include separate tabs, first create (empty files) of the correct name in the same folder as your sketch. So, if you have a folder called VicDemoSketch and in that you have sketch called VicDemoSketch.ino, create further files here, such as TestHeader.h and TestCPP.cpp. Then, when you load your VicDemoSketch it will automatically load the other files too.
      I should really demo this quickly in a future video so people know how to do, a picture paints a thousand words and a video generates 20 pictures a second (well, mine do) so that's a lot of words!
      Thanks for bringing this up Vic, others will benefit, I'm sure.

    • @sickvic3909
      @sickvic3909 7 лет назад +1

      Thanks a vid would be appreciated as I don't quite get it :)

  • @MyCaptainX
    @MyCaptainX 5 лет назад +2

    Greetings Ralph S Bacon. I've been trying to read the temperature with a DS18B20 sensor and my ATtiny85, and the test was successful. Now I want to make a digital thermostat with it. For example, if the temperature es higher than 29°C the ATtiny should turn on a led, and if temperature is lower than 25°C the ATtiny should turn off the led. I made this test and the ATtiny85 turns on the led, but when the temperature is higher than 29°C the temperature stops changing (f.e. 29.12°C), the led turns on and it never turns off. Do you have any idea why this is happening?

    • @MyCaptainX
      @MyCaptainX 5 лет назад

      Hi there. I've been analyzing my thermostat example and I see that if I put a 'while' condition the ATtiny85 freezes. I don't know why but it happens. Nevertheless if I do this with 'if' conditions between 25 and 29°C it works perfectly. Thanks anyway, although I'd like to know why my ATtiny85 freezes when I put a 'while' condition.

    • @RalphBacon
      @RalphBacon  5 лет назад

      If you want to either post a (*small*) sketch here or send it to my email address (which you can find in the About tab of my channel) then I'll have a look.

    • @MyCaptainX
      @MyCaptainX 5 лет назад

      @@RalphBacon Ok, this is the code i tried to use first:
      #include
      #include
      #include
      uint8_t hexAddr = 0x27;
      uint8_t rows = 2;
      uint8_t cols = 16;
      LiquidCrystal_I2C lcd(hexAddr, cols, rows);
      OneWire onewire(1);
      DallasTemperature tempSensor(&onewire);
      int fan = 3;
      void setup()
      {
      lcd.init();
      pinMode(fan, OUTPUT);
      tempSensor.begin();
      lcd.backlight();
      lcd.clear();
      lcd.setCursor(0,0);
      lcd.print("Thermostat");
      lcd.setCursor(0,1);
      lcd.print("Wait a moment...");
      delay(2500);
      lcd.clear();
      }
      void loop()
      {
      tempSensor.requestTemperatures();
      delay(500);
      int temperature_max=29;
      int temperature_min=25;
      float celsius = tempSensor.getTempCByIndex(0);
      lcd.setCursor(2,0);
      lcd.print("Temperature:");
      lcd.setCursor(4,1); // column, row (zero based)
      lcd.print(celsius);
      lcd.print(" ");
      lcd.print((char)223);
      lcd.print("C");
      if(celsius > temperature_max){
      digitalWrite(fan, HIGH);
      while(celsius>temperature_min){
      digitalWrite(fan, HIGH);
      celsius=tempSensor.getTempCByIndex(0);
      lcd.setCursor(4,1);
      lcd.print(celsius);
      }
      digitalWrite(fan, LOW);
      }

      else{
      digitalWrite(fan, LOW);
      }
      }
      The result is the ATtiny85 freezes when the temperature is higher than 29°C. I've solved this problem using if conditions without using 'while' condition and it works perfectly.

    • @RalphBacon
      @RalphBacon  5 лет назад

      I've been looking at this but I can't immediately see the problem. When you say the Tiny85 "freezes" what do you mean? From your sketch the LCD should display a temperature of above 29 (so let's say 30), the fan starts up, then the temperature on the LCD slowly reduces down to below 25 (so 24) at which point the fan switches off.
      At what point do things "freeze"?
      Sorry for the delay, I didn't spot this reply.

    • @RalphBacon
      @RalphBacon  5 лет назад

      Another question: how are you powering the DS18B20? Parasitic or separate power line? Have you tried a delay of (1000) in the "while" loop, as it takes time for the temperature conversion to take place.

  • @seani1473
    @seani1473 6 лет назад

    Where did you get that FLUX cleaner? What brand is it.

    • @RalphBacon
      @RalphBacon  6 лет назад

      Without watching the video I'm not 100% what you're referring to, the flux pen which applies flux to a circuit board prior to soldering is here (UK eBay but on sale worldwide at eBay.com):
      www.ebay.co.uk/itm/1PCS-YOSKER-951-10ml-Rosin-Flux-Pen-DIY-Solar-Cells-Panels-Electrical-Soldering-/272011224292?
      If this is not the item let me know (and where I refer to it in the video) and I'll dig out the link. I hope this helps!

    • @DownhillAllTheWay
      @DownhillAllTheWay 6 лет назад +2

      Throughout a long life of working on chips, I have always cleaned flux off with pure alcohol, bought from a chemist shop, and a tooth brush. 50 years ago, I was working for NASA, and they put us on a quality soldering course, where I was certified to solder joints in space craft (though I never did!), and that was what they taught us to do. Methods may have evolved since then, but Voyager (which was one of the space craft that was built and launched at that time, is still going.

    • @nilsskansar416
      @nilsskansar416 6 лет назад

      Same here. In the Air Force. Always remove flux with alcohol.
      Over time flux can pass signals / current and cause some very hard errors to find or locate. We were trained to solder F-16 equipment in 1980.

  • @ismaherbert1500
    @ismaherbert1500 2 года назад

    amigo me podrias mandar el programa de la lcd y sus bibliotecas, le he hecho como dices y no se funciona, yo estoy programando el attiny85 con un arduino nano, no se que mas hacer, me apoyarias con eso por favor.

    • @RalphBacon
      @RalphBacon  2 года назад +1

      Lo siento mucho pero tienes que describir lo que no funciona. ¿Recibe usted algún mensaje de error?

    • @ismaherbert1500
      @ismaherbert1500 2 года назад

      @@RalphBacon no me da error, solo que la lcd no muestra las letras como deberia ni los digitos, solo aparece la primera letra en cada renglon. Me podrias dar alguna idea que este fallando.

  • @fernandodmre7599
    @fernandodmre7599 4 года назад

    can you make a video digispark with the vl53l0x
    please

    • @RalphBacon
      @RalphBacon  4 года назад

      To be honest, Fernando, this time-of-flight device is adequately described on Adafruit's site here:
      shop.pimoroni.com/products/adafruit-vl53l0x-time-of-flight-distance-sensor-30-to-1000mm
      I hope this helps you!

  • @netisasidhar8898
    @netisasidhar8898 3 года назад

    Can we do that without making the chip unreprogrammable please tell

    • @RalphBacon
      @RalphBacon  3 года назад

      I2C uses two pins. SPI needs 3 pins plus a Chip Select (although you can cheat and just wire that pin permanently LOW on the device so it is active all the time). Two pins are VCC and GND. That makes a total of 7 pins on an 8-pin device. That means we do *not* need to use Pin 1 (RST) as a GPIO so your ATTiny85 remains programmable.

  • @timstraub7665
    @timstraub7665 6 лет назад

    I'm just a beginner at ARDUINO, But I like everone to use ESD bracelets and Pad's. The voltage to your skin , can be over 18 Volts. Having being an Inspector in electronics and working on electronicswith-out a bracelet, can and will, send pulses into the programs that you guy'swill not SEE.I see this over and over on you-tube. I belive this Vid is a great example of the problems that every Program is grenerating.

    • @RalphBacon
      @RalphBacon  6 лет назад +1

      Interesting ideas you have there Tim, thanks for sharing.

    • @nilsskansar416
      @nilsskansar416 6 лет назад

      Mandatory when I was working for DEC, Digital Equipment Corp, later Compaq,later HP. A lot of intermittent faults were traced back to ESD.
      Good advice.

  • @Griffindor21
    @Griffindor21 3 года назад

    Can you program attiny using a pickit 4?

    • @RalphBacon
      @RalphBacon  3 года назад +1

      I don't know the answer but I would not have thought so. My PICkit's (2/3/4) are only ever used for Microchip PIC chips. And a pain in the derriere they are too!

  • @user-jo1mz4se4j
    @user-jo1mz4se4j 7 лет назад

    Hi, I have problem with I2C LCD and Digispark ATTiny85, I have connected SDA to pin 0 and SCL to pin 2 (with 4.7k pull-up resistors), VCC to 5v and GND to GND, I have uploaded your code and add all needed libraries, but LCD displays just WHITE filled rectangles on first row.
    Any help? Thanks in advance :)

    • @RalphBacon
      @RalphBacon  7 лет назад

      I haven't checked your pin connections, Đorđe, but getting a white LCD screen (even if it is just the first row) might indicate that the library you are using is not the correct one. You didn't mention it, but I'm assuming you don'[t get anything displayed on the second row either, even after your program tries to put something on there? Or, you may not have the correct I2C address. What I would suggest is that you get this sketch working on a standard Uno (or Nano) so you know the logic/address/hardware etc is correct and working and then transfer that to the Tiny85, making the appropriate changes (or just modify what you have now). Let me know how you get on.

    • @user-jo1mz4se4j
      @user-jo1mz4se4j 7 лет назад

      How can I try sketch with Uno?
      Do I need anything to modify?
      And for pin connection, I use same as you.

    • @user-jo1mz4se4j
      @user-jo1mz4se4j 7 лет назад

      Ohh, now it works. I don't know how it can work because I didn't changed anything or uploaded new sketch.
      Thanks anyway! Thank you for helping me!

    • @RalphBacon
      @RalphBacon  7 лет назад

      Probably a dodgy connections. It happens. Glad it sorted itself out though!

  • @MultiRdh
    @MultiRdh 7 лет назад

    I'm new in arduino and i want to make home automation by using bluetooth serial and infrared and save data by using I2c externally eeprom can you please help me??

    • @RalphBacon
      @RalphBacon  7 лет назад

      So you're new to Arduino, Syed? And (yet) you want to create the equivalent of NASA in your home? To be perfectly honest, the best approach to take is to watch the videos on this channel that are aimed at the beginner and which cover the sort of things you want to do, whilst you actually try all the demo sketches out. Then in about six months you won't be asking me what to do you'll be telling me where I got things wrong in my videos! There's no shortcut to actually doing it, which means taking the time out and, well, actually doing it. I'm not sure what else to tell you. All the things you've mentioned in your question have been covered one way or another in this very channel, so at least you have a good starting point.

    • @MultiRdh
      @MultiRdh 7 лет назад

      shaseeb692@gmail.com ........ Please contact me i'll send you my project block diagram ....... I have my bluetooth serial programming but i also need infrared reciver and eeprom

    • @RalphBacon
      @RalphBacon  7 лет назад

      As much as what you're doing sounds interesting I just don't have enough time to help on an individual basis, Syed, sorry. The best place for help of the sort you need is the Arduino forum (forum.arduino.cc/index.php) where there are many experts willing to help, as long as you have done your research and tried a few things already - they won't design your project for you! Give them a go, be nice, show what you have done already and what the issue are that you face. Then you will get the help you need.

    • @igrewold
      @igrewold 6 лет назад

      Watch Paul McHorton lessons, you might wanna use www.clipconvert.cc to save them to your system:
      ruclips.net/video/d8_xXNcGYgo/видео.html

    • @igrewold
      @igrewold 6 лет назад

      for saving data, it is easier to save to uSD / SD card, with SD card shield/module.
      www.banggood.com/Micro-SD-TF-Card-Memory-Shield-Module-SPI-Mciro-SD-Adapter-For-Arduino-p-919914.html

  • @BerndFelsche
    @BerndFelsche 6 лет назад +3

    ATtinyCore seems to be a more versatile option.
    github.com/SpenceKonde/ATTinyCore
    I used that to develop ATtiny85 I2C devices which "remotely" provide humidity and temperature sensors; and variable frequency PWM motor (fan and pump) controllers. ATtinyCore automatically determines the correct libraries.
    The device to provide an I2C DHT11 didn't even have a circuit board. It was all soldered to a dip8 socket. 😀

    • @RalphBacon
      @RalphBacon  6 лет назад

      That certainly looks like a comprehensive (and well documented) library, Bernd. Even though the author has a vested interest in getting users to use his library because he sells some rather nice (albeit not particularly cheap) boards from the Tindie shop. Certainly worth investigating further for users who intend on using an ATTiny85. Thanks for the heads up, very useful.

    • @nilsskansar416
      @nilsskansar416 6 лет назад

      Is the DHT1 an I2C device ? How ? Only 3 pins ?

    • @gg-gn3re
      @gg-gn3re 6 лет назад

      Nils Skansar what? the DHT11 has 4 pins...

  • @roberteliassen5020
    @roberteliassen5020 7 лет назад

    Thanks again Ralph. 35 minutes of entertainment with a couple of new British idioms. "donkey's years" and "for love nor money".
    You should really buy a programmer, like the USBASP or USBtiny and start playing with Atmel Studio. No need for an Arduino as an ISP. It's by far more stable in my opinion. The libraries will be a problem though, but when you get it right it'll be fun. :)

    • @RalphBacon
      @RalphBacon  7 лет назад

      I can foresee, Robert, that if we both stick at this, your English knowledge will outclass that of a native English speaker! Not only that, we'll have exchanged knowledge, suggestions and opinions about Arduino-related items too, so it's a win-win situation all round!
      I have Atmel Studio 7.0 which, of course, is built on the same underlying GUI engine as my Visual Studio at work, so it's nice to get away from that by using Eclipse, or Sublime or even the standard Arduino IDE, to be honest! And I don't have any "tool" to upload the code to my Uno; I guess i'd have to acquire a USBASP, unless that's the same as my FTDI USB-to-Serial programmer, in which case I already have one?
      Choices, choices, sometimes too many ways to do things. And as you didn't vote for my suggestion of a 30-hour day I don't have any time to do anything either! But thanks for posting, always good to hear from you.

    • @roberteliassen5020
      @roberteliassen5020 7 лет назад

      The USBtinyISP is £2.50 and the USBASP is just £1.30 :-) They both work, but if you accidentally do a major "underclock" of a microcontroller, which I did in a weak moment, one of them can rescue the chip. Cannot remember if it was the USBtiny or the USBASP. It has to do with the clock setting fuses and the prescaler.
      I set my ATtiny2013 to 128 kHz with prescaler all the way to the max. I could almost program it with a Junker key (that a morse code key for you young kids). Well, I'm not fluid in SPI (although I do know morse code) and one of the programmers could not go as slow as required. The other did.
      I also use Visual Studo at work (C#). Visual Studio is big and clumsy, but being able to debug without an expensive JTAG debugger is nice. And when it comes to speed and compiled size it's way better than the Arduino IDE. Java is a stumbling block in my opinion. It's portable and all, but it not lightning fast. :)

    • @RalphBacon
      @RalphBacon  7 лет назад

      I have plans (in an advanced state of preparation - in my head, at least) for a video to cover fuses, clock speed and that reset pin modification for the Tiny85. So I will see how it goes and how many chips I "brick"! But the programmers you mention are cheap; the one Nick B mentions is about GBP16.50 from China, up to GBP30 elsewhere - not exactly an impulse purchase. I will ponder a while... Thanks for the info, though, all very useful.

    • @roberteliassen5020
      @roberteliassen5020 7 лет назад

      The timing issue Nick mentions is fixable when the clock setting is at a reasonable rate. That is, within certain limits. 1 MHz is no problem at all. Below that you might get timing issues. Going below 1 MHz doesn’t really make any sense unless you have code that runs too fast. That should be a software issue, not a hardware issue. ;)
      Some could argue that power consumption is going down with the clock. That is indeed correct, but below 1 MHz it doesn’t really make any big difference. From 20 MHz to 1 MHz it is significant of course. The ATTiny85 will run stable at 1MHz on 1.8V. The datasheet says up to 4 MHz at 1.8V.
      avrdudes -B-switch sets the bit clock period. That doesn’t work on all programmers as I said yesterday.
      Julian Ilett came up with a nice “hack”, making a breadboard friendly ICSP connector with double row male long header pins. It’s in his Postbag #28.

  • @Graham1904
    @Graham1904 4 года назад

    You mentioned that the DS18B20 is a SPI device, this is in error I guess as it is a 1-Wire device

    • @RalphBacon
      @RalphBacon  4 года назад +1

      I really said that? What?!? Considering I even did a video on this device (and put two together in parallel to show how they are individually addressable) that was a bit of a Doh! moment indeed. Thanks for letting everyone know what a muppet I can be, Graham. Now, if I can just remember how I add someone to my RUclips comments blacklist...

    • @Graham1904
      @Graham1904 4 года назад

      @@RalphBacon what video number was that as I would like to see how you address more than one device on the 1-wire bus

    • @RalphBacon
      @RalphBacon  4 года назад

      That's video #28, Graham, one of the early ones, almost vintage so view carefully and do not disturb the sediment.

    • @Graham1904
      @Graham1904 4 года назад

      @@RalphBacon hehe. Love the vintage stuff.....

    • @Graham1904
      @Graham1904 4 года назад

      @@RalphBacon it doesn't really explain why the serial number (not address as you referred to it as) is identified

  • @stonededge
    @stonededge 3 года назад

    Hi Ralph. Do you know the best i2c library for using the ATtiny 84?

    • @RalphBacon
      @RalphBacon  3 года назад

      Use the same one as for the Tiny85; they are basically (nearly) the same chip but the Tiny84 has more pins.

  • @thepvporg
    @thepvporg 6 лет назад

    More importantly, where's Benny? You need a "Where's Benny" locator... Maybe that should be your next project. I know you had a detector for when he is in or our, you need one to say if he has left the garden or not and possibly get GPS back to overlay on a map of the garden.

    • @RalphBacon
      @RalphBacon  6 лет назад

      An ambitious project you outline there, Mark, but one which would be quite fun to do. A simple Bluetooth transponder would let me know if he had wandered off but the GPS overlay could be quite challenging. Hmm, I shall consult Benny and see how he feels about all this! Thanks for the suggestions.

    • @thepvporg
      @thepvporg 6 лет назад +1

      Well maybe, I do tend to think bigger than many people do, what I thought was a mobile phone shield with GPS built in that could SMS a phone with coordinates that you get as a URL to a google map location.

  • @thomasvnl
    @thomasvnl 7 лет назад +1

    Only thing that's not to like about these kits is that the Chinese use that static Styrofoam which could damage the chip(s). Thanks for the video again Ralph, very interesting!

    • @koursaros
      @koursaros 7 лет назад

      This kit is not made in China but in Greece. Styrofoam is chip friendly and keeps the legs unbend. Thank you.

    • @thomasvnl
      @thomasvnl 7 лет назад +1

      That certainly isn't my experience.

    • @RalphBacon
      @RalphBacon  7 лет назад

      Would you Adam and Eve it but this topic is *hot* right across the Internet. Styrofoam seems to viewed as a reasonably good packing agent but doesn't appear to protect against static (if that protection is needed). I've just put my bench multimeter across the foam in this kit and it didn't register at all; some black conductive foam that I have some ICs stored in did register from 300k (light touch) to just a few k-ohm when pressed quite hard.
      I've had ICs delivered wrapped in aluminium foil before now, but "tubes" are of course the best thing, as they not only protect the chip against bent legs (as the tube is IC-shaped) it is also conductive so will not store a static charge. Cheap too, with just an elastic band round the ends to stop the chips falling out.
      Mine turned up OK as you all saw, so I'm not getting into a debate about this but I have zapped a couple of MOSFETs just by touching them so I know that static electrical discharge damage is a very real thing. Whether the ATTiny85 needs that protect is something the manufacturer might specify in their spec sheet regarding transport?

    • @DrexProjects
      @DrexProjects 7 лет назад

      Rub a piece on your cat, If it sticks to the cat then it's bad for chips.

    • @willofirony
      @willofirony 7 лет назад +1

      As | a prospective agent for Benny, I take exception to this suggestion. You have forfeited your opportunity to subscribe to the forthcoming Benny channel!

  • @almoglavi8737
    @almoglavi8737 10 месяцев назад

    what the name of the tool in 7:07?

    • @RalphBacon
      @RalphBacon  9 месяцев назад

      It's an IC pin straightener, available generally, quite cheap and works a lot better than using your workbench to straighten pins! Example: bit.ly/DipPinStraightener

  • @schwartzenheimer1
    @schwartzenheimer1 4 года назад +2

    That "IC puller" is not made for DIPs. It is for PLCC-type packages in sockets, where the metal hooks fit into slots in the socket to lift the chip out. The pin straightener is superfluous, being a simple matter of placing the pins sideways on the table and gently bending them square. These are 'Arduino-generation' problems. Ya gotta know the rudiments...

    • @RalphBacon
      @RalphBacon  4 года назад +2

      Yes, I use that chip puller when I use my PLCC adapter boards but it really also works just fine for small 8-pin chips. But I really need a standard DIP pin puller too, about time I invested in one. I have to disagree about the pin straightener; I used to use a table like you suggest, about 30 years ago, but using the pin straightener tool is soooo much better, even if only a couple of pins are out of alignment. Oh, I guess that makes me _not_ of the Arduino generation, after all!

    • @MrGoatflakes
      @MrGoatflakes 3 года назад

      Bullshit. The IC puller has been around since before the PLCC.

  • @TechnologyRules
    @TechnologyRules 3 месяца назад

    12:32 You could make a few frames darker during editing. Why don't you?

    • @RalphBacon
      @RalphBacon  3 месяца назад

      Yes, I should have but it's a bit late now, some 6 years later! I'll bear in mind for future videos!

    • @TechnologyRules
      @TechnologyRules 3 месяца назад +1

      ​@@RalphBacon Hahahaha, I appreciate the good sense of humor. Thank you for the vids. Nice to see you tinkering with this stuff. Reminds me of my dad.
      In my case, I didn't use the Arduino IDE, but bare CMake to compile the firmware and `avrdude` together with a programmer to upload it to the ATtiny85 or ATtiny13A.
      The programmer is a fake AVR programmer I bought on Amazon, but it works great. I just had to solder an IDC connector (so it could receive the ISP cable) to a board and connect it to the DIP adapter that will hold the microcontroller on that same board.
      It's fun

  • @Charly_127
    @Charly_127 5 лет назад

    Hello!
    First, thanks for your videos!
    Can you activate the subtitles? I am Spanish and my English is bad-regular.
    Thank you

    • @RalphBacon
      @RalphBacon  5 лет назад +1

      The only subtitles available are from RUclips, in English. These are automatically created when I upload the video, Carlos. Is this what you mean? Don't tell me you want me to traducir todo en Espanol? Lo siento, mi espanol es peor que tu Ingles, sin duda!

    • @Charly_127
      @Charly_127 5 лет назад

      @@RalphBacon Thanks for answering.
      Google translate helps me with my english.
      Thanks for your spanish :-P
      The problem is youtube, I can't activate the subtitles in english language in your video. And I thought that you had disabled the subtitles.
      I'm sorry, thank you very much.

    • @RalphBacon
      @RalphBacon  5 лет назад

      @@Charly_127 I have checked and the subtitles are missing. I don't know why. RUclips have control of this. I am very sorry it is not working. If there is something particular you do not understand send me link for that time frame and I will help you. Lo siento, mucho.

  • @SzDavidHUN
    @SzDavidHUN 7 лет назад

    $2.20 for nano 168?
    Why not a STM32F103C8T6 for $2.36?
    Small, powerful, plenty of ram and flash. Only problem it is 3.3V but almost all pins are 5V tolerant.

    • @RalphBacon
      @RalphBacon  7 лет назад +1

      Hello David! Indeed, why not!
      There are many, many very capable, cheap µControllers out there but I'm trying to focus on ones that my viewers will identify with and which have mass-market appeal. I quite concede that the Arduino Nano/Uno is, by today's standards, somewhat lacking in memory, SRAM, IO-pins, UARTs as well as having only a single I2C and SPI bus available. But, and here's the thing, most users / developers/ hobbyists don't want to create a chess-master computer, they just want to control their lawn sprinkler, monitor their loft water tank temperature, check where their cat is (that last one is for me) - basically, pretty simple stuff that the Arduino family of µControllers gives them and is easy to use (thanks to Arduino.cc). If you really want to push the boat out, there's always the Arduino Yun.
      So that's why I'm sticking to the Uno, Nano and sometimes the ESP8266 (which isn't Atmel but is still a commonly used µController). I wish I had more time to investigate others but I just don't have the time. A pity really. Anyway, thanks for suggesting this, others may find it very useful and want to investigate - if there's sufficient interest then I will doubtless be prompted (like I was with the ATTiny85). Good to hear from you, David, in ... Hungary, is that?

    • @SzDavidHUN
      @SzDavidHUN 7 лет назад

      Hello Ralph!
      Thanks for your answer!
      I've bought that MCU just for fun. And turns out to a cheap, small, powerful device, with good support. There is a project called stm32duino dot com, they make an Arduino compatible API for the STM32, so you can use it like an Arduino. If you have some spare time, and want to try some new thing, I recommend it. But there are things to watch out: some boards have onboard usb, but you can't program the chip with it. There is a bootloader that makes it possible, but I haven't tried it. Maybe you can buy board with onboard UART chip.
      The positive side for the people you said, that it is plenty powerful for anything, like for a graphical LCD (like that you use for the cat monitor), more than one UART for sensors that connect with UART, you have to disconnect them to reprogram the micro, but now you have more than one, so you can reprogram it without messing around with the circuit.
      I've tried a few arduino project of mine, they run on that board too, only thing to modify is the pin numbers. So I think, based on my small sample, it not that different from the mainstream, but cheaper, faster, smaller, and bigger flash and ram. Beside this, I have some arduino unos, and esp8266s too, now considering buying some nanos.
      So that's why I choose it. I'm not saying that this is the way to make it, but if you'd like to, you should try it one day :)
      And thanks for your videos, they are great! I think this ATTiny will be useful some day, I'm thinking about making some "dedicated hardware" like standalone small amp/volt meter, so the easy to solder, and small footprint while I use DIP packaging is very useful! :)
      Greetings from Hungary!

  • @DownhillAllTheWay
    @DownhillAllTheWay 6 лет назад

    @ 8:40, that tool is not indispensable. I have always just pressed the legs against a table top to bend them.

    • @RalphBacon
      @RalphBacon  6 лет назад +1

      Yup, I used to do just that, Mike, until I discovered this tool, at which point it was all so much easier, with all the legs at a perfect 90-degrees. Really, spend the $5 / £5 and you will immediately see how useful it is. Indispensable even :) You'll only need the one and it will last you the rest of your life (unless you are currently 12 and live until you are 100, in which case you might, eventually, need two).

    • @matthewmckenzie7687
      @matthewmckenzie7687 6 лет назад

      Or a vise. Pliers are good for 8 pins because you have three tools in one. Pin conditioner, pull tool and place/insert tool.

    • @bibel2k
      @bibel2k 6 лет назад +1

      Ralph S Bacon .
      What's the name of the tool?
      I'm looking for it all around the internet..

    • @vonries
      @vonries 6 лет назад +2

      Amos Bibel I am also looking for the same tool. I have searched on both Ebay and aliexpress but without a tool name it is proving impossible to find. Please Ralph?

    • @brucebarrett1273
      @brucebarrett1273 5 лет назад

      IC Pin straightener is what you seek.

  • @amy.i
    @amy.i 4 года назад +1

    Good video #Amy_i

    • @RalphBacon
      @RalphBacon  4 года назад

      Glad you liked it, Amy_i!

  • @omoivo6525
    @omoivo6525 7 лет назад

    please Name from Tool at 7.09

    • @RalphBacon
      @RalphBacon  7 лет назад +1

      That's the IC Pin Straightening tool, Omo, here's a link to an eBay (UK) item but you will find these everywhere on the Internet: www.ebay.co.uk/itm/IC-PIN-STRAIGHTENING-TOOL-UNIVERSAL-DOUBLE-SIDED-MOULDED-BLK-PLASTIC-81x37x12mm-/191930975599?_trksid=p2385738.m2548.l4275

    • @omoivo6525
      @omoivo6525 7 лет назад +1

      Ralph S Bacon
      Thank You!

    • @thepvporg
      @thepvporg 6 лет назад

      Also : www.rapidonline.com/trusemi-ics-01-ic-straightener-22-0330

  • @burakkosedag7430
    @burakkosedag7430 6 лет назад

    it is like this is breakingnewsenglish.com :D

    • @RalphBacon
      @RalphBacon  6 лет назад

      Um... if you say so Burak, but the connection either escapes me or you just posted a spam message, I can't work out which one it is! Do elucidate!

  • @RaadYacu
    @RaadYacu 7 лет назад

    I would prefer Pro Mini 3.3/5v and Nanos

    • @RalphBacon
      @RalphBacon  7 лет назад

      Ah, but the question is Raad, *why* do you prefer those two above the Tiny85?
      Now, you might answer: because they are cheap; they have sufficient memory for most things; they can be programmed using a USB cable; and many more reasons. But...
      But there are also people who just feel it is *wrong* to devote an entire ATMega328P to a simple project just to monitor a couple of sensors! Whatever your reasons (and I have no feelings one way or the other) I'd love to know why (and maybe others would here too) so we can get a feel for the pros and cons of both µControllers. I'm still investigating the capabilities of the Tiny85 and I'm amazed they are so popular. Who knew?

    • @RaadYacu
      @RaadYacu 7 лет назад

      I'll have to say the ease of programming is what I am after when prototyping. Also, I come from software background, so I am in no man's camp here. Getr-done ( salng for just get it done )

    • @RalphBacon
      @RalphBacon  7 лет назад

      Wow! that was a quick reply! Yes, I love my Nanos because they are cheap, have all the power of a 16Mhz Uno, are much smaller, have an additional two pins (can be used for analog or digital) and have (usually) sufficient memory and "grunt" to get the job done and are really easy to hook up to my PC and upload a new program (basically, what you're saying really).
      Now, that said, I've been impressed by the Tiny85 recently, given its miniscule size and tiny power consumption and low voltage running (down to 1.8v @ 1Mhz says Robert, on this thread) - and with that shield (or any other) it is easy to program. I've an idea for another video or two on this device and you never know, if I can persuade myself that these are not to be ignored perhaps others will prick their ears up and investigate, you never know!
      Thanks for the quick reply, always good to hear the opinions of fellow Arduinites,

  • @TechnologyRules
    @TechnologyRules 3 месяца назад

    Did you pay someone to solder for you? Why didn't you filmed it?

    • @RalphBacon
      @RalphBacon  3 месяца назад

      No, I do all my own soldering, but filming it? I've done that on other videos but it can be very awkward with the camera in the way, you know!

    • @TechnologyRules
      @TechnologyRules 3 месяца назад +1

      @@RalphBacon You're right. Thank you for answering. God bless you, sir!

  • @koursaros
    @koursaros 7 лет назад

    Ralph once again THANK YOU for making and reviewing the AttinyShield of mine.
    I found your comments very useful and I will try to implement some of those in future versions.
    - The DIY version of AttinyShield can be found here: www.ebay.com/itm/221434907666
    - The fully soldered version of AttinyShield can be found here: www.ebay.com/itm/221324819158
    To whom might be interested...
    I think I should consider a commission after all :)
    Thank you,
    Themis.

    • @RalphBacon
      @RalphBacon  7 лет назад +2

      Καλησπέρα, Θέμις, πώς είσαι;
      Yes, thanks to Google translate I can pretend that I know Greek. But, in reality, it's all Greek to me. Er, oh, let's move on. I'm glad you found the video constructive, I always try to keep my observations objective, and apart from the pin socket headers it was a nice kit, with extra value too!
      Keep this to yourself but I'll be doing a (final?) video on the ATTiny85 in the near future to discuss some ---- , no I'm not saying any more at this moment, there might be others listening! But I am most certainly warming to this tiny chip, as it's cheap and capable and sometimes all you need is a bit of logic to do wonderful things.
      Thanks for posting, and keep tuned for future videos on the ATTiny85 (and, of course, on other Arduino /Electronics related items).

    • @koursaros
      @koursaros 7 лет назад +1

      Καλησπέρα και σε σένα!
      Your assisted Greek is great!
      The video was very interesting about the I2C capabilities of the Attiny85 and also I was thrilled to see my board get up to the test from you. I think it passed the bar.
      I am waiting for more videos about arduino in general and for the last time thank you for mentioning by AttinyShield.
      Θέμης
      Themis