微处理器硬件喂狗_硬件基础:微控制器到底是什么?-程序员宅基地

技术标签: python  java  linux  人工智能  编程语言  

微处理器硬件喂狗

by Taron Foxworth

通过塔伦·福克斯沃思(Taron Foxworth)

硬件基础:微控制器到底是什么? (Hardware Fundamentals: what exactly is a microcontroller?)

At the fundamental level, a microcontroller is a just tiny computer.

从根本上讲,微控制器只是一台微型计算机。

Being a “tiny computer” doesn’t really tell us much, though. So let’s go deeper. Many people associate microcontrollers with Arduino. But it’s important to point out that Arduino is not a microcontroller. Arduino is a complete platform which spans across software and hardware.

但是,作为“微型计算机”并不能告诉我们很多。 因此,让我们更深入。 许多人将微控制器与Arduino相关联。 但是必须指出, Arduino不是微控制器 。 Arduino是一个涵盖软件和硬件的完整平台。

Arduino makes devices like the Arduino Uno:

Arduino制造像Arduino Uno这样的设备:

The Arduino Uno is not a microcontroller, either. It’s a breakout board based on the Atmel ATmega328P microcontroller.

Arduino Uno也不是微控制器。 这是一个基于Atmel ATmega328P微控制器的分线板。

Here is what the Atmel microcontroller looks like:

这是Atmel微控制器的外观:

If you were to have just the Atmel microcontroller in hand, as a beginner, it wouldn’t be very useful. This is where the breakout board comes in.

如果您只是手头有Atmel微控制器,那将不是很有用。 这是突破板的来历。

The breakout board “breaks out” the pins on the microcontroller into a larger device (like the Arduino Uno). This larger device makes the microcontroller easier to use.

分线板将微控制器上的引脚“分线”成更大的设备(例如Arduino Uno)。 更大的设备使微控制器易于使用。

For the Arduino Uno, the breakout board gives you the ability to insert a USB cord, give it power, program the device, and more.

对于Arduino Uno,分线板使您能够插入USB线,为其供电,对设备进行编程等。

Without the breakout board, for a beginner, this would be a daunting task. This problem is the very reason that Arduino exists — to make it super easy for you to learn about hardware.

没有初学者,这将是一项艰巨的任务。 这个问题正是Arduino存在的原因-使其非常容易让您了解硬件。

嗯,就像树莓派吗? (Ah, So it’s like the Raspberry Pi?)

Well, not entirely. Both the Arduino and the Raspberry Pi are still computers by definition. But the Raspberry Pi is considered a single-board computer. A single-board computer is a full computer built on a single circuit board.

好吧,不完全是。 顾名思义,Arduino和Raspberry Pi仍然是计算机。 但是Raspberry Pi被认为是单板计算机 。 单板计算机是建立在单个电路板上的完整计算机

Your laptop is also technically a single-board computer — just a powerful one. The Raspberry Pi is a simple version of the same hardware in your laptop. Just as your laptop runs an operating system (Windows, Mac, or Linux), the Raspberry Pi runs a Linux operating system.

从技术上讲,您的笔记本电脑也是单板计算机,只是功能强大的一台计算机。 Raspberry Pi是笔记本电脑中相同硬件的简单版本。 正如您的笔记本电脑运行操作系统(Windows,Mac或Linux)一样,Raspberry Pi也运行Linux操作系统。

Now, back to Microcontrollers. Microcontrollers can’t run an operating system. Microcontrollers also don’t have the same amount of computing power or resources as most single-board computers.

现在,回到微控制器。 微控制器无法运行操作系统。 微控制器也没有与大多数单板计算机相同的计算能力或资源。

A microcontroller will run just one program repeatedly — not a full operating system. We can see this in Arduino programs because they only need two functions: Setup and loop. Setup will run once and loop will run indefinitely.

微控制器将仅重复运行一个程序,而不是完整的操作系统。 我们可以在Arduino程序中看到这一点,因为它们仅需要两个功能: SetuploopSetup将运行一次, loop将无限期运行。

那么,什么是微控制器? (So, what’s a microcontroller?)

A microcontroller is a small computer with low-memory and programmable input/output peripherals.

微控制器是具有低内存和可编程输入/输出外围设备的小型计算机。

输入/输出 (Inputs/Outputs)

As you probably know, everything with a computer eventually starts with binary (0 or 1).

您可能知道,计算机的所有功能最终都以二进制(0或1)开头。

An input means that the microcontroller will read binary. An example input would be a sensor.

输入意味着微控制器将读取二进制。 输入示例是传感器。

An output means that the microcontroller will send binary. An example output would be to control a motor or LED.

输出意味着微控制器将发送二进制文件。 输出示例是控制电动机或LED。

为什么我们需要微控制器? (Why do we need microcontrollers?)

Well, these were “computers” before we arrived at the idea of the computers you know today. Microcontrollers stuck around because some computing tasks are incredibly trivial and require simple logic. For example, flipping a switch or controlling small components — like a LED light — don’t require the same resources we need for day-to-day tasks like sending an email.

好吧,这些是“计算机”,我们才想到今天知道的计算机。 由于某些计算任务非常繁琐,并且需要简单的逻辑,因此微控制器陷入困境。 例如,拨动开关或控制小部件(如LED灯)不需要像发送电子邮件这样的日常任务所需的资源。

We use them today because their low-powered and low memory makes them low-cost. Microcontrollers are part of the reason the Internet of Things is possible and successful today.

我们之所以今天使用它们,是因为它们的低功耗和低内存使其成本更低。 单片机是当今物联网得以成功的原因之一。

我如何得到一个? (How do I get one?)

Which microcontroller you’ll want to get depends on which problem you want to solve. If you are doing something simple — turning things on and off, or reading a sensor — pretty much any microcontroller will do.

您将要获得哪个微控制器取决于您要解决的问题。 如果您正在做简单的事情(打开或关闭东西,或读取传感器),几乎任何微控制器都可以做。

If you want to play games or have more complex ideas, you’ll need more compute power, so you’ll need to move up to single-board computers, like the Raspberry Pi.

如果您想玩游戏或有更复杂的想法,则需要更多的计算能力,因此需要升级到Raspberry Pi等单板计算机。

Adafruit and Sparkfun both have TONS of kits and hardware that are all amazing. You can also make use of their tutorials.

AdafruitSparkfun都有大量的工具包和硬件,它们都很棒。 您也可以利用他们的教程。

Losant also has some cool kits available. You could build your own door sensor — to be notified when a door is left open for too long.

Losant也有一些不错的 工具包 。 您可以构建自己的门传感器 -在门打开时间过长时收到通知。

If you don’t have a specific problem you want to solve, just grab some hardware and play around with it.

如果您没有想要解决的特定问题,只需购买一些硬件并试用一下即可。

Here are some things you can buy to get started:

您可以购买以下一些入门指南:

1.一个称为NodeMCU的板。 (1. A board called the NodeMCU.)

The NodeMCU is a board based on the ESP8266 microcontroller. This board is special because it’s cheap and WiFi enabled. It will only run you about $8.79 on Amazon and is even less on Ebay.

NodeMCU是基于ESP8266微控制器的开发板。 该板很特别,因为它很便宜并且支持WiFi。 它在亚马逊上的售价仅为$ 8.79,在Ebay上甚至更低。

Not all microcontrollers are WiFi-enabled. The fact that this one is opens the door to a number of projects you can build with this device. For example, you can collect data and send it to the cloud ️.

并非所有的微控制器都支持WiFi。 这个事实为您可以使用此设备构建的许多项目打开了大门。 例如,您可以收集数据并将其发送到云️。

2.您需要一些传感器 (2. You’ll need some Sensors)

You can’t have hardware without sensors. Sensors give you the ability to detect the environment and the world around you. They’re also a great tool for learning.

没有传感器就无法拥有硬件。 传感器使您能够检测周围的环境和环境。 它们还是学习的好工具。

3.您需要面包板跨接线(3. You’ll need a Breadboard & Jumper Wires:)

To connect a sensor and the microcontroller together, you’ll have to plug them into the Breadboard and use the Jumper wires to connect them.

要将传感器和微控制器连接在一起,您必须将它们插入面包板,并使用跳线连接它们。

Remember: everything is cheaper on eBay and AliExpress. You’ll just have to wait a couple weeks for shipping

请记住: eBayAliExpress上的所有东西都便宜。 您只需要等待几个星期即可发货

我应该建造什么? (What should I build?)

Again — and I can’t stress this enough — it’s way easier to start with a project in mind. Now that you understand what a microcontroller is and how to get one, take a different look at the world around you. What can you control? What can you automate? Once you start to answer those questions, you’ll find a project.

再次强调一下(我对此压力还不够大),从一个项目开始就比较容易。 现在您已经了解了微控制器是什么以及如何获得微控制器,现在换个角度来看一下周围的世界。 你能控制什么? 您可以实现什么自动化? 开始回答这些问题后,您将找到一个项目。

While thinking of projects, Hackster is your best friend. Hackster has a ton of ESP8266 projects and some cool Arduino projects:

在考虑项目时, Hackster是您最好的朋友。 Hackster有大量的ESP8266项目和一些很酷的Arduino项目:

For example, you can live out a childhood dream.

例如,您可以实现童年的梦想。

You can even build robots.

您甚至可以建造机器人。

The point is, you just need an idea.

关键是,您只需要一个想法。

Sometimes programming the real world is more fun than programming virtual ones.

有时,对真实世界进行编程比对虚拟世界进行编程更有趣。

下一步是什么? (What’s next?)

Microcontrollers are only the beginning. You have a world of hardware to explore. Happy Hacking ??

单片机仅仅是开始。 您需要探索许多硬件。 快乐黑客

进一步阅读: (Further reading:)

The Absolute Beginner's Guide to ArduinoOver the Christmas break from work I wanted to learn something new. I've been eyeing up Arduino for some time now, and…forefront.io

Arduino的绝对初学者指南 在圣诞节休假期间,我想学习一些新知识。 我一直在关注Arduino一段时间,并且… forefront.io

Taron Foxworth is a hardware hacker and the Developer Evangelist at Losant. His goal is to translate technology for people to learn, love, and be inspired.

Taron Foxworth Losant的硬件黑客和开发人员。 他的目标是为人们学习,热爱和激发灵感而翻译技术。

翻译自: https://www.freecodecamp.org/news/hardware-fundamentals-what-exactly-is-a-microcontroller-8a502a3650dc/

微处理器硬件喂狗

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/cumi6497/article/details/108160637

智能推荐

我学cocos2d-x (三) Node:一切可视化对象的祖先_cococs cocos2d::node 使用-程序员宅基地

文章浏览阅读1k次。在cocos2d-x中一切可视化的元素都集成自Node,zhe's_cococs cocos2d::node 使用

20180806 考试记录-程序员宅基地

文章浏览阅读74次。20180806 考试记录 T1 【NOIP2013模拟联考8】最短路(path)Solution设s为第0个标记点,t为k+1个跑k+1次最短路然后全排列暴力求解qwq注意最大值要设为long long范围最大值CodePS:各种修改qwq//By Menteur_Hxy#include&lt;queue&gt;#include..._i <= 3000000000u

DBA整理的万字详解MySQL性能优化,值得收藏!-程序员宅基地

文章浏览阅读190次。点击关注公众号,实用技术文章及时了解作者:LanceToBigDatacnblogs.com/zhangyinhua/p/7620964.html说起MySQL的查询优化,相信大家积累...

云开发(3)云函数本地调试_本地云函数调试并发数量限制-程序员宅基地

文章浏览阅读921次。云函数/云函数本地调试云函数是云开发其中一项基础能力,在云端运行的代码,微信私有协议天然鉴权,开发者只需编写自身业务逻辑代码。云函数个数免费版云函数数量上限为 50写完自己的原函数后,可以通过云函数的本地调试来进行调试,调试没有问题了就可以上传云端,对于解决bug查找bug是很好用的使用像调试自己的哪一个云函数就直接右键开启本地调试即可。就是这样一个页面此时运行自己的云函数就是在本地运行不是再云端给运行了。可以调试没问题后再传到云端,有时候会弹出一个错误解决方法:右键点击你_本地云函数调试并发数量限制

SQL创建默认值语句(CREATE DEFAULT)-程序员宅基地

文章浏览阅读5.8k次。微软的解释:创建称为默认值的对象。当绑定到列或别名数据类型时,如果插入时没有显式提供值,则默认值将指定一个值,以便将其插入该对象所绑定的列中(或者,如果是别名数据类型,则插入所有列中)。后续版本的 Microsoft SQL Server 将删除该功能。请避免在新的开发工作中使用该功能,并着手修改当前还在使用该功能的应用程序。语法 ..._sql declare default

Linux分区格式化实训操作说明_sdb7这个分区的具体含义-程序员宅基地

文章浏览阅读2.2k次。首先介绍一下背景知识:Linux主分区,扩展分区,逻辑分区的联系和区别Linux硬盘分区有三种,主磁盘分区、扩展磁盘分区、逻辑分区。一个硬盘主分区至少有1个,最多4个,扩展分区可以没有,最多1个。且主分区+扩展分区总共不能超过4个。逻辑分区可以有若干个。在linux下主分区和逻辑分区都可以用来放系统,引导os开机。分出主分区后,其余的部分可以分成扩展分区,一般情况是剩余磁盘空间全部配成扩展分区,..._sdb7这个分区的具体含义

随便推点

oracle9i打补丁,oracle11gr2打PSU补丁记录-程序员宅基地

文章浏览阅读72次。1、将数据库和监听程序关闭2、首先检查OPatch版本是否符合要求:$ORACLE_HOME/OPatch/opatch lsinventory3、若不符合要求,需先更新opatch:mv 掉原有的OPatch目录mv $ORACLE_HOME/OPatch $ORACLE_HOME/OPatchbakcp p6880880_112000_SOLARIS64-opatch11.2.0.3.12.z..._oracle9i 打补丁时ouihome设置

java ocr技术--tesseract-ocr:使用jTessBoxEditor制作训练库_jtessboxeditor训练英文和数字结合的图片-程序员宅基地

文章浏览阅读1.8k次,点赞4次,收藏18次。几个常见的问题:问题一:相关的几个软件下载地址Tesseract:Index of /tesseractjTessBoxEditor: VietOCR - Browse /jTessBoxEditor at SourceForge.net问题二:jTessBoxEditor下载是注意一下,中文的话要下载jTessBoxEditorFX问题三:mftraining执行时提示停止工作,一般是Tesseract版本的问题,可以选择Tesseract3验证过是好的,Tesser._jtessboxeditor训练英文和数字结合的图片

天平称重,进制转换解法_天平称重(进制解法) python-程序员宅基地

文章浏览阅读302次。题目:用天平称重时,我们希望用尽可能少的砝码组合称出尽可能多的重量。如果只有5个砝码,重量分别是1,3,9,27,81则它们可以组合称出1到121之间任意整数重量(砝码允许放在左右两个盘中)。本题目要求编程实现:对用户给定的重量,给出砝码组合方案。例如:用户输入:5程序输出:9-3-1用户输入:19程序输出:27-9+1要求程序输出的组合总是大数在前小数在后。可以假设用户的输入的数字符合范围1~121。思路:观察输出,都是3的多少次方,所以我们可以把输入的值,转换成3进制的_天平称重(进制解法) python

druid-1.1.21.jar-程序员宅基地

文章浏览阅读954次。链接:https://pan.baidu.com/s/1w5_GTiWuAR_X2t8J7JIP4Q提取码:a0u1_druid-1.1.21.jar

pthread_spinlock_t与pthread_mutex_t性能对比_pthread 性能 效率-程序员宅基地

文章浏览阅读8k次。看到一篇pthread_spinlock_t与pthread_mutex_t性能对比做的非常细致的博客,记录下来原文在此:http://www.cnblogs.com/diyunpeng/archive/2011/06/07/2074059.html_pthread 性能 效率

mysql innodb与myisam存储文件的区别-程序员宅基地

文章浏览阅读1.1k次。myisam:.frm: 存储表定义.myd(MYData):存储数据.MYI(MYindex):存储引擎innodb:.frm:存储表定义.idb:存储数据和索引,在同一个文件中_innodb和mylsam生成文件的区别