Attiny85编程(盾牌)使用Arduino Uno

简介:Attiny85编程(盾牌)使用Arduino Uno

和你的arduino一起玩很有趣。但是,有时尺寸会很重要。

Arduino Uno很小,但如果您要求您的项目在一个小型外壳中,则uno可能会太大。你可以尝试使用纳米或迷你,但如果你真的想走小事,你会去微小的,认真精确。

它们非常小,便宜的芯片(基本上是小arduinos),可以在Arduino IDE中编程,但是您可能会注意到没有USB连接。那么我们如何编程???

对于每个问题,有一个解决方案。您可以轻松地将您的Arduino Uno成为程序员,将其与此以此连接并计划。

现在,如果你这样做,那是一个很好的选择,但是,如果你参加了你的认识,你可能会注意到一遍又一遍地连接所有这些电线会变得非常烦人。

If only there were some way we could just connect the Attiny to the Arduino without having to use a breadboard and all those wires. And there is!

In this insturcable I will show you how to make your very own Arduino Attiny shield, that works with Attiny25/45/85.

You can either make it on a breadboard (which looks quite messy) or you can use a PCB.

BTW, this Instructable is entered into the PCB Contest, so if you liked this Instructable, consider giving it your vote at the end of the Instructable.

Step 1: What You'll Need

对于此项目,您需要:

-Arduino IDE(建议使用较新版本,但任何1.6.x或更新的东西都应该工作)

-Attiny25 / 45/85(你实际上并不需要它来制作程序员,但如果您没有芯片,则无法使程序员提供)

-2pcs 4pin male header (you can buy a row of 40 and carefully break 4 off)

-1电解电容(10uf到100uf的任何地方很好)

-8pin socket (or you can use 2pcs of 4pin female headers)

-Arduino UNO (of course clones work just as well)

-1 PCB板,适合UNO(或面包板和一些电线,如果您只想测试事项)

对于那些希望在甚至更小的包装中提供更优雅的解决方案的人,我建议您从JLCPCB订购PCB(10个左右的10次成本包含在内的运输)。您可以在步骤4中找到Gerber文件。

如果您不知道这些是什么......您真的不需要知道,只需下载zip并将其拖动到jlcpcb站点,然后拨打订单。在下一步中有关这一点。

JLCPCB使盾牌直接坐到您的Arduino Uno上,您只需要焊接组件,并且您已拥有完美,紧凑的学生,他们自己的程序员。

Step 2: Pinout and Connections

这是Attiny85引脚的照片。这对Attiny25是相同的
和Attiny45。注意顶部的小半圈。注意它。它是这样,所以你不会错误地向后插入电路。

The half circle is represented by a small black dot on the chip (in the picture with the circuit connections)

For everyone else that's making the board from scratch, the connections should be as follows:

Uno -------> tartiny

Pin 10----->Pin 1

Pin 11----->Pin 5

销12——>销6

Pin 13----->Pin 7

5V---------->Pin 8

Gnd-------->Pin 4

DO NOT FORGET to connect the capacitor between the Gnd and the reset pin on the Arduino UNO.

I recommend you put the male headers into the UNO's female headers, place the board on top so everything is as still as possible and then begin soldering so it will all fit later.

Once you've connected everything, check the connections again and the actual orientation of the Attiny. (remember the little dot on the chip)

If there are no mistakes, you can move on to the software part in step 4 or you can move onto step 3 and see how to order a professionally made PCB that looks way better and costs next to nothing.

Step 3: Making the PCB

您可以根据连接中的连接来制作自己的PCB
下一步或者您可以从JLCPCB购买一个丰富的人。(不是赞助商,但我希望他们是)

别担心,你不需要知道你在做什么,只需遵循图片。

- 首先下载Gerber文件(在我的指示灯中包含的zip文件)。不要解开它。

- Go to thejlcpcb.website, here.https://jlcpcb.com/quote.

- 拖放zip文件,在其中它说“在此添加您的gerber”(如图所示)

- There is no need to change the other options, so just click on "Save to cart"

- 一个新页面将打开,只是光滑“安全”

——下一个page, you'll need to fill in your shipping and payment info. I recommend you pay using paypal and using the cheap version of shipping (the express costs more but it should be at your doorstep in under 5 days), however the cheap one doesn't take that long either, around a couple of weeks.

- 单击“继续”,为您的电路板支付。您将获得最高品质的董事会旁边。

Now if you don't want to wait for JLCPCB to make and ship your boards or you just like getting your hands dirty and don't mind the end product looking messy, as long as it works, you can make your own board using a common stripboard by simply making the connections mentioned in step 3.

Step 4: Setting Up the IDE

The first thing you need to do is copy open up the Arduino IDE.

Go to File->Preferences

在“附加板经理URL:”粘贴:

https://raw.githubusercontent.com/damellis/attiny/ide-1.6.x-boards-manager/package_damellis_attiny_index.json

然后单击“确定”

Next go to Tools->Boards->Boards Manager (at the very top of the list)

在“过滤您的搜索......”类型的主题。它应该只找到一个选择。单击它并按“安装”。

一旦完成安装,关闭IDE,使一切都重置。

Congratulations! You have just finished the hard part, but you still need to prep your UNO to program the Attiny.

Step 5: Prepping the UNO for Programming

要编程这个认真,您必须(总是)首先上传特殊草图
the UNO first.

You can find the sketch in File->Examples->ArdionoISP->ArduinoISP

Once that opens up, go to tools->Boards and select your UNO

Upload the sketch to it as you normally would.

一旦完成,您的UNO已将其转换为一个程序员,以获得认真。

继续前进并插上你在上一步中制作的盾牌,小心地连接正确的别针并以正确的方式将其提出!

Now on to actually uploading a program to the Attiny!

Step 6: Programming the Attiny

再次打开IDE(命中文件并点击新)并转到工具 - >电路板

如果滚动下来,您会发现您现在可以选择Attiny25 / 45/85作为板。

继续选择Attiny25 / 45/85选项,现在返回工具和“处理器:”选择您打算使用的曾经认真的。

But that's not all.

您还需要将“程序员”选项更改为:Arduino作为ISP(not ArduinoISP, be careful

现在完成了,你应该能够以与常规Arduino的方式将你的代码上传到与之相同的方式。

第7步:额外提示

如果你想改变同学的时钟速度,你可以这样做
clicking Tools->Internal X MHz and then clicking on Burn bootloader, while your Attiny is plugged into the UNO.

这将讲述同性恋将时钟速度切换到您选择的速度。(如果您延迟1s,实际延迟比该延迟更短或更长时间,您应该尝试切换时钟速度)

Also when you'll want to take the Attiny out of the programmer, I recommend using some tweezers or something small and flat, so you can slip it under the Attiny and lift all the left and right side at the same time. That way you won't bend the pins when lifting it up.

如果您喜欢这种指示,请考虑访问我的Fundrazr页面here. And of course, share.

PCB Contest

参加了这一点
PCB Contest

是第一个分享

    建议书

    • 微控制器比赛

      微控制器比赛
    • Automation Contest

      Automation Contest
    • Make it Glow Contest

      Make it Glow Contest

    讨论