admin管理员组

文章数量:1530987

2024年7月25日发(作者:)

附录A 英文原文

Arduino Uno

1 Overview

The Arduino Uno is a microcontroller board based on the ATmega328. It has 14 digital

input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz

ceramic resonator, a USB connection, a power jack, an ICSP header, and a reset button. It

contains everything needed to support the microcontroller; simply connect it to a computer

with a USB cable or power it with a AC-to-DC adapter or battery to get started.

The Uno differs from all preceding boards in that it does not use the FTDI USB-to-serial

driver chip. Instead, it features the Atmega16U2 (Atmega8U2 up to version R2) programmed

as a USB-to-serial converter.

Revision 2 of the Uno board has a resistor pulling the 8U2 HWB line to ground, making it

easier to put into DFU on 3 of the board has the following new features:

1.0 pinout: added SDA and SCL pins that are near to the AREF pin and two other new

pins placed near to the RESET pin, the IOREF that allow the shields to adapt to the voltage

provided from the board. In future, shields will be compatible with both the board that uses

the AVR, which operates with 5V and with the Arduino Due that operates with 3.3V. The

second one is a not connected pin, that is reserved for future er RESET

circuit.

Atmega 16U2 replace the 8U2."Uno" means one in Italian and is named to mark the

upcoming release of Arduino 1.0. The Uno and version 1.0 will be the reference versions of

Arduino, moving forward. The Uno is the latest in a series of USB Arduino boards, and the

reference model for the Arduino platform; for a comparison with previous versions, see the

index of Arduino boards.

1

2 Summary

Microcontroller: ATmega328

Operating Voltage: 5V

Input Voltage (recommended): 7-12V

Input Voltage (limits) :6-20V

Digital I/O Pins: 14 (of which 6 provide PWM output)

Analog Input Pins: 6

DC Current per I/O Pin: 40 mA

DC Current for 3.3V Pin: 50 mA

Flash Memory: 32 KB (ATmega328) of which 0.5 KB used by bootloader

SRAM: 2 KB (ATmega328)

EEPROM: 1 KB (ATmega328)

Clock Speed : 16 MHz

Length: 68.6 mm

Width: 53.4 mm

Weight: 25 g

2

3 Power

The Arduino Uno can be powered via the USB connection or with an external power

supply. The power source is selected automatically.

External (non-USB) power can come either from an AC-to-DC adapter (wall-wart) or

battery. The adapter can be connected by plugging a 2.1mm center-positive plug into the

board's power jack. Leads from a battery can be inserted in the Gnd and Vin pin headers of the

POWER connector.

The board can operate on an external supply of 6 to 20 volts. If supplied with less than 7V,

however, the 5V pin may supply less than five volts and the board may be unstable. If using

more than 12V, the voltage regulator may overheat and damage the board. The recommended

range is 7 to 12 volts.

3.1 The power pins are as follows:

VIN. The input voltage to the Arduino board when it's using an external power source (as

opposed to 5 volts from the USB connection or other regulated power source). You can supply

voltage through this pin, or, if supplying voltage via the power jack, access it through this pin.

pin outputs a regulated 5V from the regulator on the board. The board can be supplied

with power either from the DC power jack (7 - 12V), the USB connector (5V), or the VIN pin

of the board (7-12V). Supplying voltage via the 5V or 3.3V pins bypasses the regulator, and

can damage your board. We don't advise it.3V3. A 3.3 volt supply generated by the on-board

regulator. Maximum current draw is 50 . Ground pins.

IOREF. This pin on the Arduino board provides the voltage reference with which the

microcontroller operates. A properly configured shield can read the IOREF pin voltage and

select the appropriate power source or enable voltage translators on the outputs for working

with the 5V or 3.3V.

3.1.1 Memory

3

The ATmega328 has 32 KB (with 0.5 KB used for the bootloader). It also has 2 KB of

SRAM and 1 KB of EEPROM (which can be read and written with the EEPROM library).

3.2 Input and Output

Each of the 14 digital pins on the Uno can be used as an input or output, using pinMode(),

digitalWrite(), and digitalRead() functions. They operate at 5 volts. Each pin can provide or

receive a maximum of 40 mA and has an internal pull-up resistor (disconnected by default) of

20-50 kOhms. In addition, some pins have specialized functions:

Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data.

These pins are connected to the corresponding pins of the ATmega8U2 USB-to-TTL Serial

chip.

External Interrupts: 2 and 3. These pins can be configured to trigger an interrupt on a low

value, a rising or falling edge, or a change in value. See the attachInterrupt() function for

details.

PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the analogWrite()

: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI

communication using the SPI library.

LED: 13. There is a built-in LED connected to digital pin 13. When the pin is HIGH

value, the LED is on, when the pin is LOW, it's off.

The Uno has 6 analog inputs, labeled A0 through A5, each of which provide 10 bits of

resolution (i.e. 1024 different values). By default they measure from ground to 5 volts, though

is it possible to change the upper end of their range using the AREF pin and the

analogReference() function. Additionally, some pins have specialized functionality:

TWI: A4 or SDA pin and A5 or SCL pin. Support TWI communication using the Wire

are a couple of other pins on the board:

AREF. Reference voltage for the analog inputs. Used with analogReference().

Reset. Bring this line LOW to reset the microcontroller. Typically used to add a reset button to

shields which block the one on the also the mapping between Arduino pins and

ATmega328 ports. The mapping for the Atmega8, 168, and 328 is identical.

4

4 Communication

The Arduino Uno has a number of facilities for communicating with a computer, another

Arduino, or other microcontrollers. The ATmega328 provides UART TTL (5V) serial

communication, which is available on digital pins 0 (RX) and 1 (TX). An ATmega16U2 on

the board channels this serial communication over USB and appears as a virtual com port to

software on the computer. The '16U2 firmware uses the standard USB COM drivers, and no

external driver is needed. However, on Windows, a .inf file is required. The Arduino software

includes a serial monitor which allows simple textual data to be sent to and from the Arduino

board. The RX and TX LEDs on the board will flash when data is being transmitted via the

USB-to-serial chip and USB connection to the computer (but not for serial communication on

pins 0 and 1).

A SoftwareSerial library allows for serial communication on any of the Uno's digital pins.

The ATmega328 also supports I2C (TWI) and SPI communication. The Arduino software

includes a Wire library to simplify use of the I2C bus; see the documentation for details. For

SPI communication, use the SPI library.

4.1 Programming

The Arduino Uno can be programmed with the Arduino software (download). Select

"Arduino Uno from the Tools > Board menu (according to the microcontroller on your board).

For details, see the reference and tutorials.

The ATmega328 on the Arduino Uno comes preburned with a bootloader that allows you

to upload new code to it without the use of an external hardware programmer. It

communicates using the original STK500 protocol (reference, C header files).

You can also bypass the bootloader and program the microcontroller through the ICSP

(In-Circuit Serial Programming) header using Arduino ISP or similar; see these instructions

for details.

The ATmega16U2 (or 8U2 in the rev1 and rev2 boards) firmware source code is

available . The ATmega16U2/8U2 is loaded with a DFU bootloader, which can be activated

5

by:

On Rev1 boards: connecting the solder jumper on the back of the board (near the map of

Italy) and then resetting the Rev2 or later boards: there is a resistor that pulling the

8U2/16U2 HWB line to ground, making it easier to put into DFU can then use

Atmel's FLIP software (Windows) or the DFU programmer (Mac OS X and Linux) to load a

new firmware. Or you can use the ISP header with an external programmer (overwriting the

DFU bootloader). See this user-contributed tutorial for more information.

6

5 Automatic (Software) Reset

Rather than requiring a physical press of the reset button before an upload, the Arduino

Uno is designed in a way that allows it to be reset by software running on a connected

computer. One of the hardware flow control lines (DTR) of the ATmega8U2/16U2 is

connected to the reset line of the ATmega328 via a 100 nanofarad capacitor. When this line is

asserted (taken low), the reset line drops long enough to reset the chip. The Arduino software

uses this capability to allow you to upload code by simply pressing the upload button in the

Arduino environment. This means that the bootloader can have a shorter timeout, as the

lowering of DTR can be well-coordinated with the start of the upload.

This setup has other implications. When the Uno is connected to either a computer

running Mac OS X or Linux, it resets each time a connection is made to it from software (via

USB). For the following half-second or so, the bootloader is running on the Uno. While it is

programmed to ignore malformed data (i.e. anything besides an upload of new code), it will

intercept the first few bytes of data sent to the board after a connection is opened. If a sketch

running on the board receives one-time configuration or other data when it first starts, make

sure that the software with which it communicates waits a second after opening the

connection and before sending this data.

The Uno contains a trace that can be cut to disable the auto-reset. The pads on either side

of the trace can be soldered together to re-enable it. It's labeled "RESET-EN". You may also

be able to disable the auto-reset by connecting a 110 ohm resistor from 5V to the reset line;

see this forum thread for details.

5.1 USB Overcurrent Protection

The Arduino Uno has a resettable polyfuse that protects your computer's USB ports from

shorts and overcurrent. Although most computers provide their own internal protection, the

fuse provides an extra layer of protection. If more than 500 mA is applied to the USB port, the

fuse will automatically break the connection until the short or overload is removed.

5.2 Physical Characteristics

7

The maximum length and width of the Uno PCB are 2.7 and 2.1 inches respectively, with

the USB connector and power jack extending beyond the former dimension. Four screw holes

allow the board to be attached to a surface or case. Note that the distance between digital pins

7 and 8 is 160 mil (0.16"), not an even multiple of the 100 mil spacing of the other pins.

8

附录B 汉语翻译

1 概 述

Arduino Uno是一个单片机ATmega328的基础上集成开发环境平台。它有14个数

字输入/输出针(6可以作为PWM输出),6个模拟输入,16 兆赫陶瓷谐振器,一个USB

连接,电源接口,ICSP头和重置按钮。它包含所有需要支持单片机;简单地将它连接到

一台计算机和一个USB电缆或权力AC-to-DC适配器或电池开始。

Arduino Uno与所有前板的不同之处在于,它不使用FTDI USB-to-serial驱动芯片,

取而代之的是 Atmega16U2 (Atmega8U2版本R2)编程USB-to-serial转换器。

版本2 的UNO板有一个电阻器把8 u2 HWB接地,使其更容易投入DFU模式。版

本3的UNO有以下新的特点:1.0引出线:添加SDA和sci引脚和附近其他两个新针放

在复位,让IOREF适应从板子提供的电压。由于Arduino运行3.3 v和5 v电源操作,在

未来,都是兼容使用AVR的板子。第二个是一个未连接的引脚,是留给未来的使用的。更

强的复位电路。

接口16 u2取代8 u2。“Uno”意味着被命名为纪念Arduino即将在意大利发布的1.0。

Uno和1.0版本将Arduino的参考版本改进。看到Arduino板子与以前的版本相比,Uno

是最新的一系列USB Arduino电路板,Arduino平台的参考模型。

9

2 总结

微控制器:ATmega328

工作电压:5伏

输入电压(推荐): 7-12V

输入电压(限制) :6-20V

数字I / O别针:14(6提供PWM输出)

模拟输入插脚:6

每个I / O直流电流 :40毫安

直流电流为3.3 v引脚:50毫安

内存:32 KB(ATmega328)引导装载程序所使用的0.5 KB

静态存储器:2 KB(ATmega328)

Eepm:1 KB(ATmega328)

时钟速度:16 兆赫

长度:68.6毫米

宽度:53.4毫米

重量:25克

10

3 电源

Arduino Uno可以通过USB连接或与外部供电电源。电源自动被选中。

外部(non-USB)电源从AC-to-DC适配器(wall-wart)或电池。适配器可以连接通过连

接2.1毫米接口center-positive插进板子电源。从电源中可以插入电源的接地和Vin引脚。

板子可以操作一个外部供应6 - 20伏。然而,如果提供少于7 v ,5 v可能供应不到和板

子可能会不稳定。如果使用超过12 v电压调节器可能过热和损坏。推荐的范围是7 - 12

伏特。

3.1 电源插脚如下

Arduino电路板的输入电压的时候使用一个外部电源(而不是从USB连接或其他监

管5伏特电源)。电源电压可以通过这个引脚,或者通过电源接口提供,通过这个引脚问它。

这引脚输出一个5 v的电平输出。板子电源可以从直流电源提供(7 - 12 v),USB连接器(5

v),或板子VIN引脚(7-12V)。提供电压低于5 v或,并能损害你的板子。我们不建议。板

子产生一个3.3v的电压输出,最大电流是50 mA。接地,地面引脚IOREF。这销Arduino

电路板提供了单片机运行的基准电压。正确配置盾可以阅读IOREF电压和选择适当的

电源或使译者使用的输出电压5 v或3.3 v。

3.1.1 内存

ATmega328有32 KB(用于引导装载程序0.5 KB)。它还拥有2 KB的SRAM和1 KB

存储(可读和写存储库).

3.2 输入和输出

每个14数字针可以使用Uno作为输入或输出,使pinMode(),digitalWrite(),

digitalRead()函数。他们在5伏特操作。每个接口可以提供或接收最多40 mA和有一个

内部上拉电阻(默认断开连接)20 - 50 KΩ。此外,一些针有专门的函数。

0(RX)和1(TX)。用于接收(RX)和(TX)TTL串口传输数据。这些引脚连接到相应的

11

引脚 ATmega8U2USB-to-TTL串行芯片。

外部中断:2和3。这些针可以触发一个中断配置拉低值,上升或下降沿或改变的值。

看到attachInterrupt()功能细节。

PWM:3、5、6、9、10和11。提供8位PWM输出的analogWrite()功能。

SPI:10(SS),11(MOSI),12(MISO)13(SCK)。这些针支持SPI通信使用SPI库.

LED:13有一个内置的LED数字引脚连接到13。当电平高值时,LED亮,当电平低

时,它灭。

Uno 板子有6个模拟输入,贴上A0到A5,每个提供10位的值(即1024个不同的值)。

默认情况下他们从地测量到5伏,虽然有可能改变他们上端使用AREF引脚和范围

analogReference()函数。此外,一些针有专门的功能。

TWI:A4或SDA销和A5或SCL引脚。支持TWI通信使用线库.还有其他几个别引

脚在板子上:

AREF。参考电压的模拟输入。使用analogReference().REST。把这条线拉低单片机

复位。通常用于添加一个重置按钮,复位。看Arduino引脚图和ATmega328原理图。

Atmega8的引脚图和168,328是相同的。

12

4 通信

Arduino Uno有许多方式与计算机通信,另一个Arduino,或其他微控制器。的

ATmega328提供了UART TTL(5 v)串行通信,可以在数字针0(RX)和1(TX)。一个

ATmega16U2在板子上对USB串行通信和显示为一个虚拟com端口软件在电脑上。“16

u2固件使用标准USB串口驱动程序,和不需要外部驱动。然而,在Windows上,.inf文件

是必需的。Arduino软件包括一个串行监视器允许发送简单文本数据和从Arduino板子

上发送。当数据被传输通过USB-to-serial芯片和USB连接到计算机串行通信(但不是针

0和1)。RX和TX 发光二极管在板子上将flash。

一个SoftwareSerial库允许串行通信的板子的引脚。

ATmega328还支持 I2C(TWI)和SPI通信。Arduino软件包括一个线库来简化使用

I2C总线,看到文档获取详细信息。SPI通信,使用SPI图书馆.

4.1 编程:

Arduino Uno可以与Arduino程序软件(下载)。从工具>板菜单中选择“Arduino

Uno(根据单片机的董事会)。详情,请参阅参考和教程.

ATmega328在Arduino Uno是引导装载程序允许您上传新的代码没有使用外部硬件

程序员。它使用原来的沟通 STK500协议(参考,C头文件).

你也可以绕过引导装载程序和程序单片机通过ICSP(软件串行编程)标题使用

Arduino ISP或相似的;请参阅这些指令获取详细信息。

的 ATmega16U2(或8 u2 rev1和rev2板子)固件源代码可用。的 ATmega16U2加载/

8 u2 DFU引导装载程序,它可以激活:

Rev1板子:连接焊跳线的板子,然后重置8 u2。

Rev2或后来板子:有一个电阻,把8 u2/16u2 HWB线,使其更容易进入DFU模式。

然后,您可以使用atmel公司转换的软件(Windows)或DFU程序员(Mac OS X和Linux)

加载一个新的固件。或者你可以使用ISP头与外部程序员(DFU引导装载程序重写)。看

到这个用户的教程获得更多信息。

13

5 自动复位(软件)

相对于在下载时需要一个物理按键上传文件之前,Arduino Uno设计,使得它被连接

的计算机上运行的软件复位。一个硬件流控制线路(DTR) ATmega8U2/ 16 u2连接到重置

的 ATmega328通过100微法电容器。此线断开(低),重置行滴足够长的时间来重置芯片。

Arduino软件使用此功能允许您上传代码,只需将上传按钮Arduino环境。这意味着引导

装载程序可以有一个较短的超时,DTR可以协调的降低与上传的开始。

这个设置有其他含义。Uno时连接到一台计算机运行Mac OS X或Linux,它重置每

次连接从软件(通过USB接口)。下列半秒钟左右,Uno引导装载程序正在运行。程序已

设定了让它可以忽略错误的数据(即除了一个上传的新代码),当一个连接被打开以后,它

会拦截前几个字节的数据发送到板子。如果一个任务运行到板子上收到一次性配置或其

他数据时,它首先开始,确保在发送数据之前,软件进行通讯等待第二个打开连接后。

Uno包含一个跟踪器,它可以减少禁用自动重置。衬垫在两侧的跟踪可以焊接在一

起,重新启用它。这些信息“RESET-EN”的标签。通过一个5V的重置线接一个110欧姆

电阻,您还可以禁用自动重置。(看到论坛里的思路获取详细信息)。

5.1 USB过电流保护

Arduino Uno复位polyfuse,快速的切断过载电流保护你电脑的USB接口。尽管大多

数电脑提供他们自己的内部保护,融合提供了更多一层的保护。如果超过500 mA应用

USB端口,保险丝会自动中断连接,直到短或过载。

5.2 物理特性

Uno PCB的最大长度和宽度分别为2.7和2.1英寸,带有USB连接器和扩展出了电

源接口。四个螺丝孔允许板子被固定到一个表面或桌子上。注意,数字针之间的距离7

和8 ,160 mil(0.16”),多个其他引脚的没有100 mil的间距。

14

本文标签: 板子使用连接电压软件