How to program the ATtiny 841 using the Arduino IDE

แชร์
ฝัง
  • เผยแพร่เมื่อ 9 มี.ค. 2019
  • Update: there is a mistake in the wiring diagram! here is an updated one
    justarb/status/11...
    In this video we will take a look at programming the ATtiny 841 using the Arduino IDE
    The ATtiny 841 looks like a really capable chip, it has two serials it can be an i2c slave and costs around $1
    ---------------------------------
    Links:
    ---------------------------------
    Attiny Core: github.com/SpenceKonde/ATTiny...
    3 Hour stream that no one wants to watch: • Taking a look at the A...
    Attiny 85 shield Video: • Programming an Attiny ...
    How to setup the Arduino as ISP Timestamp: • Programming an Attiny ...
    Maxint R&D's channel: / @maxintrd
    ---------------------------------
    Parts Used:
    ---------------------------------
    ATtiny 841 -
    Farnell: ie.farnell.com/microchip/atti...
    Digikey: www.digikey.com/product-detai...
    20 PCS IC Adapter PCBs* - s.click.aliexpress.com/e/b3Xxnnlm
    IC to DIP socket* - s.click.aliexpress.com/e/cDBp3jK
    RobotDyn Arduino Nano* - s.click.aliexpress.com/e/c7RwcaCg
    PL2303 USB to Serial Converter* - s.click.aliexpress.com/e/bwHZzd9e
    ---------------------------------
    My Tindie Store:
    ---------------------------------
    I've started to sell stuff on Tindie, check it out!
    www.tindie.com/stores/brianlo...
    ---------------------------------
    Other Platforms:
    ---------------------------------
    Twitter: @witnessmenow - / witnessmenow
    Instagram - / brian_lough
    Instructables: witnessmenow - www.instructables.com/member/...
    ---------------------------------
    Support the Channel:
    ---------------------------------
    Buying anything through the following links will help support the channel and not cost you anything extra.
    Amazon.co.uk: amzn.to/2g7mJIO
    Amazon.com : amzn.to/2ykDQ42
    Aliexpress: s.click.aliexpress.com/e/wdhojba
    LCSC (where I buy most of my parts for Tindie stuff): lcsc.com/?promote=ODM5ZTB5Nlk...
    ---------------------------------
    My Tools & Kit*:
    ---------------------------------
    Ts-100 Soldering Iron
    - UK : amzn.to/2nlOF23
    - US : amzn.to/2jDcyxl
    Logitech C920 HD 1080p Pro webcam
    - UK: amzn.to/2pnxk9Z
    - US: amzn.to/2BsLMiF
    Blue Snowball USB Microphone
    - UK: amzn.to/2C0x4TH
    - US: amzn.to/2DEA85J
    Self Adjusting Wire Strippers
    - UK: amzn.to/2C0urkR
    - US: amzn.to/2BXQAh1
    *= Affiliate Links
  • วิทยาศาสตร์และเทคโนโลยี

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

  • @BrianLough
    @BrianLough  5 ปีที่แล้ว +2

    Update: there is a mistake in the wiring diagram! here is an updated one
    twitter.com/justarb/status/1108321378317402117?s=19

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

    Hey all,
    I hope you like the video. It's a little different of a format than i normally do because i had limited time to make it and doing it this way is faster than doing a voice over.
    Let me know what you think either way!

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

      I didn't even notice any difference with it apparently not being a voice over. :) Perhaps since you're so practiced at live streaming it's just natural to record live instead of doing a voice over? Great little tutorial! :)

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

      If you wouldn’t have told us I wouldn’t have noticed the difference. Maybe some mouse clicks are hearable (you maybe starting or stopping the record with it?) but if this is a faster way to produce videos, go for it Brian. I know how limited time is if one has a family....
      BTW interesting chip. Maybe an alternative to our Attiny 85, if there just was a dip version of it. As you know I’m an old style trough hole fan....

    • @gavinsmalley1513
      @gavinsmalley1513 5 ปีที่แล้ว +2

      You voiced that as you recorded it‽ It was so polished I just assumed it was a voice over. Great video - would love to see one going through what the 841 can do.

  • @UpcycleElectronics
    @UpcycleElectronics 5 ปีที่แล้ว +7

    Thanks for the walk though and references.
    One tip for anyone getting an USB to serial converter like the one mentioned at 9:25; try to get one that has the "DTR" pin broken out on the output pin header. This is one of the signals on the converter chip. "DTR" is one wire of the whole RS232 serial communication standard these chips are designed for. When programming many other Arduinos over UART the automatic reset over USB is handled using the DTR pin.
    If you're ever looking to make your own boards with one of these converter chips the ch340g's are cheap and the SOIC package is much easier to play with. Also, the translated English datasheet has a schematic example of an optocoupler isolated design too. This can save your computer if you happen to have a dumb moment on the bench or experience a bad failure.
    Lastly, when using the USBasp's they always produced an error message that makes it appear as though they are not working when infact they are. They kinda suck with the ArdyIDE. They work far better from a command line using AVRdude although I have gotten both to work.
    I'm no expert. This has just been my experience on the subject.
    As a simple viewer, I definitely prefer these types of general reference uploads that are easy to save in a playlist and reference later when I need them.
    Thanks again,
    -Jake

  • @Davedarko
    @Davedarko 5 ปีที่แล้ว +3

    I have some of the newer AVRs at home, but didn't look into programming them yet - glad you made this video! :)

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

    Great job Brian! I really like this "introduction" approach. Keep up the great work.

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

    Nice video Brian! This one pushed me over the edge to start experimenting with little chips like this. Thanks!

  • @willofirony
    @willofirony 5 ปีที่แล้ว +2

    Excellent video, Brian. I look forward to seeing a video using the 841 as an I2C slave. I can see this as valuable, enabling makers to build their own peripherals/sensors ; perhaps with some processing to free the master mcu for scheduling. This was the first of your videos that I have viewed. You have a great channel here.

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

    Very nice! I enjoy learning about the different chips and their capabilities. The 2 hardware UARTs on this chip could be really useful for certain projects.

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

    This format is great...I would like to see more chips that can be programmed like this …..more please !.....basically this becomes an invaluable reference tool.

  • @devsecfranklin
    @devsecfranklin ปีที่แล้ว

    Very helpful, thanks for posting.

  • @jamest.5001
    @jamest.5001 3 ปีที่แล้ว

    This was a cool concept , having the IC. Center stage!

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

    Thanks for the info, very well explained. Looking forward for more projects with the ATtiny
    841.

  • @Magic-Smoke
    @Magic-Smoke 5 ปีที่แล้ว +2

    Hah! Perfect! A new trendsetter maybe. Finally a video that mentions all the traps you can fall into. Thanks for the stream, I couldn’t stay for it all but this is GOLD for many - a no BS how-to with all the pain removed (but nevertheless we can still feel it - lol). More please! 😀

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

    A great overview video Brian, much better condensed than the long stream getting it to work!

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

      What you mean you don't want to watch me fumble around trying to get it work for 3 hours?!

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

      @@BrianLough .... that's what she said!! 😂

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

      @@ChunkySteveo 3 hours, you flatter me 😎

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

    Another great video. Thanks. And congratulations to you and your wife, on expecting baby #2.

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

    Awesome mate , Great video and clear explanation helpful valued Thanks

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

    Just found you via Seon - enjoying the vids 😃

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

    you helped a lot! thanks

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

    You have the knack of distilling information down to the most important points.
    Don't worry about voiceover. Have you noticed that the audio of my recent videos are littered with cat meows? See? nobody notices :-)
    Thanks for this video. Great content, great presentation. I will order some ATTiny841.

  • @atihrot755
    @atihrot755 ปีที่แล้ว

    Thanks for help

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

    Great follow-up video!

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

    if you put the chip at the other end of the adapter board the two extra pins could be used for a decoupling capacitor solder bridged to pin 1 and 14

  • @200sxgrazor
    @200sxgrazor 4 ปีที่แล้ว

    Hi Brian, really useful video, many thanks. Do you know if this chip can do the 'secret voltmeter' trick of measuring it's own voltage like the atmega328p can? I've looked through the data sheet and I'm still not sure. Electronics beginner here.

  • @dzee9481
    @dzee9481 4 ปีที่แล้ว +1

    Brian, excellent video, I was trying to program an attiny861 but been getting Device Signature 0x00000000 error. I wondered if you ran into a situation like that. I have been searching the google and lot talk about the attiny85 chip. not the attiny841 ir attiny861 chips. Just wondered if you might have some insight on the subject.

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

    Brilliant!
    I think powering the wee bugger will be a handful and effectively removing any gains of its small size as you’ll need a 3.3V converter. However nice to know it comes in such tiny packages!

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

      According to the data sheet it operates between 1.7 and 5.5v so it's very flexible!

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

    Excellent video. But one remark about connecting the LED to the board.
    works with SpenceKonde 1.2.3 board manager release ATTiny 841 pin #6!
    works with SpenceKonde 1.4.1 board manager release ATTiny 841 pin #10!

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

    You can use the jumper on the USBASP to set it to a lower speed.

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

    Thanks Brian. Trying to decide between the 841 and the 84. Both seem similar, but the 84 is cheaper through aliexpress. Would the 84 meet your requirements as well?

  • @kaisher_1010
    @kaisher_1010 ปีที่แล้ว

    It's very good video

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

    You can right-click on the cap in Fritzing and select Show Label/Value, that is if you have entered the part's value in Inspector.

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

      I did not know that! Thank you!

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

    How much different in programming space does it take between the arduino asisp to the serial Rx Tx?

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

    Nice interesting video.

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

    Thx

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

    Hi! I would like to know if you have experienced programming several attiny On the i2c or twi bus, like slaves and they can turn on and off a led each with the order from an Arduino UNO as a master, whose function is to send to they the order to turn on and off the led and that the slaves in turn send the status of their leds to the master? Thanks!

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

    I watched a few of the videos. Help me out here when you upload all the things you do. What willit are does it run. I haven't yet found anyone that tells me why they do it.

  • @atihrot755
    @atihrot755 ปีที่แล้ว

    Cheers. I can't load the jtag2updi program. Please help. Still only when opening, only the base of the program comes out, the other items do not open.

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

    The good thing that it has enough pin for what I need (Si4432, 4 pins for SPI + 2 pins for controls), but bad thing that on eBay, there is no cheap option. Where did you buy this MCU? BTW; you have new subscriber, you did great job. Thanks.

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

      I bought mine of farnell.ie (which is element 14). I know they are available from digikey too. (Both are linked in the description). Yeah that is one pity that it doesn't seem to be available from China
      Thanks! Really appreciate it

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

      @@BrianLough Now after looking at datasheet - I like that chip even more. Some things can be done with Attiny85, but sometimes there is need for more pins. Seems that Farnell offer buying minimum of 1 piece, so that is good option too. Not too expensive. Oh, sorry... I did not saw your video description, probably need some more sleep after hours of programming STM32. It will be fun to see both: Attiny841 and STM32F103VET7 together in some communication 'toy' at 433 MHz. Thanks again for great news and really great info.

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

    I'm certainly comfortable with 'chip-based' videos, but I think that some, like thIs one, might benefit from a supplementary video with an example of its use - because it has capability for Slave mode, you can do this...

  • @martym2464
    @martym2464 ปีที่แล้ว

    Does anyone know how to load a hex file into ATTiny841? with or without Arduino?

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

    Why couldn't you use the ch340 uart programmer to burn bootloader as well before uploading sketch. I'm also busy with the attiny841 and have tested both arduino as isp and the ch340. It seems a bit pointless to use the arduino to burn the bootloader and the use the ch340 to upload sketch.
    I haven't tried using ch340 to burn bootloader to attiny841 and upload sketch. I'm not sure if it is possible. Have you tried it

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

    Interesting video. I am not sure why you selected the Tiny841, except that you can use the Arduino environment. Other processors has similar data and some is also cheaper. I would choose a processor that can be debugged and that has an professional IDE. It could be a PIC controler where you have an excellent IDE (except for the Crappy free Compiler) and the PicKit debugger probe. My preferred processor in the 8 bit area is EFM8 (ex: EFM8BB10F8G-A-SOIC16R) , it comes with a free IDE (Simplicity Studio) and you can buy an cheap debugger on Ebay (Look for C2 C8051). With this setup you can code and debug (single step and breakpoints). Developing I2C slave will be a lot easier when you can set breakpoints.

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

      The person who makes the i2c rotary encoder also recommend a pic for this job too but to be honest I just dont have the experience yet of working with pics, but there seems to be great info in this post for me to get started so I might PIC up a few... (I'm sorry, could not resist 😂)
      I'm pretty time poor at the moment so something with a lower barrier of entry for me is more important than anything else.

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

      Do you have any links for where might be a good place to read more about this stuff? I would actually like to get some of the stuff you mentioned

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

      I know that starting with new stuff has some barrier to overcome, and so its also with micro processors. I did also start with a Tiny (84), I found it very difficult to debug only relying on flashing diodes or serial data. I think if you spend the time with an development environment with a real JTAG,SWD or C2 debugger you wont regret the time spend. So much more in controle.
      I started with the PIC processor and a PICKit3 probe (random Ebay: www.ebay.com/itm/PICkit2-PICkit3-PIC-KIT2-3-PIC-Debugger-Programmer-Emulator-Controller-Adapter/263554503372?hash=item3d5d1292cc:m:mF64g1DBKWHXX6A0eNoslbw). From Microchip you can download MPLAB X IDE, which is the IDE. There are some tutorials on the net on how to use it. One problem with the free version of the compiler is that they insert dummy instructions to slow down the code, if you buy the IDE you can get rid of this slow down, that was one of the reasons to drop the PIC.
      Silicon Labs EFM8 series is as I said, is my 8bit processor for the moment, the PROS for this processor is: its cheap, the IDE is free and good and the debugger probe is only $10. You can find the processors on Digikey (www.digikey.com/product-detail/en/silicon-labs/EFM8BB10F8G-A-SOIC16R/336-4742-1-ND/8610996) or your favorite place. The IDE can be downloaded from www.silabs.com, and the debugger (random EBay: www.ebay.com/itm/C8051F-MCU-Emulator-U-EC6-USB-Debug-Adapter-Downloader-JTAG-C2-Mode-Cable-New/263210606346?hash=item3d48931f0a:g:YRwAAOSwiKlZvQq1)
      Good luck, looking forward to here your opinion on programming microprocessors besides from the arduino types, and using a real IDE and debugger.

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

    ATtiny. A T tiny. A. T. tiny. It's not one word. Thanks for the video, though.

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

    Whenever I have issues with ArduinoAsISP it's cus I've forgotten the cap! :D

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

    Great video but all I get is stk500_recv(): programmer not responding

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

    Get a CH55x chip. It's cheap and fun. No external programmer needed.

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

    Hey Brian, great video tutorial. Thank you for the shout out. I did make the board public in EasyEDA, but perhaps I should try Tindie to offer kits. Your referral helped some viewers to find my channel and subscribe. Thanks! I like the style of this video and admire how you can produce quality video's in short time. I'm still struggling to edit my newest video into something watchable...

  • @Ed19601
    @Ed19601 4 ปีที่แล้ว +2

    The attinys are in fact too expensive. 1 dollar plus an adapter, whereas 1.60 dollar will give you an arduino promini

    • @gbraadnl
      @gbraadnl 4 ปีที่แล้ว +1

      It's the size aspect. The adapter is used for development purpose, i also use an attiny backed against an minimal nrf24 module as a tiny receiver for toy cars. A promini would not fit

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

    AT Tiny --- Ay Tee Tiny - There, you're welcome.