前几天收到 Arduino M0,试各项功能都正常,可就是串口监视器/串口助手不能显示程序里打印的输出,好生奇怪,各种换波特率各种PC串口程序换着试,资料不多,官方资料也只说到 Serial1 用于 pin 0 1 的(实际上测试的时候提示 Serial1 没有声明),Serial 用于 USB 通信,根本只字未提 SerialUSB 的事,直到今天,哦不,是昨天了,下午在群里提问,“忠忠”回复有一个 SerialUSB 用于 USB 的串口通信,这才知道了这个事。真是好坑人啊。


官网链接:http://www.arduino.org/products/boards/4-arduino-boards/arduino-m0

摘录:

Overview

With the new Arduino M0 board, the more creative individual will have the potential to create one’s most imaginative and new ideas for IoT devices, wearable technologies, high tech automation, wild robotics and other not yet thinkable adventures in the world of makers.
The
Arduino M0 represents a simple, yet powerful, 32-bit extension of the
Arduino UNO platform. The board is powered by Atmel’s SAMD21 MCU,
featuring a 32-bit ARM Cortex® M0 core.
With the addition of the M0 board, the Arduino family becomes larger with a new member providing increased performance. 
The
power of its Atmel’s core gives this board an upgraded flexibility and
boosts the scope of projects one can think of and make; moreover, it
makes the M0 the ideal educational tool for learning about 32-bit
application development.

Summary

Microcontroller

ATSAMD21G18, 48pins LQFP

Operating Voltage

3.3V

Input Voltage (recommended)

6-15 V

Input Voltage (limits)

4.5-20 V

Digital I/O Pins

14, with 12 PWM and UART

Analog Input Pins

6, 12-bit ADC channels

Analog Output Pins

1, 10-bit DAC

DC Current per I/O Pin

7 mA

Flash Memory

256 KB

SRAM

32 KB

Clock Speed

48 MHz

Schematic & Reference Design
Power

The
Arduino M0 can be powered via the micro 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 to the board 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 will automatically detect which power sources are available and
choose which one to use according to the following priority:

  1. External power
  2. Target USB

External
power is required when the 500mA through the USB connector is not
enough to power a connected USB device in a USB host application.

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. The allowed input voltage range for this pin (and for the power jack connector) is 6-20V.
  • 5V.
    The regulated power supply used to power the microcontroller and other
    components on the board. This can come either from VIN via an on-board
    regulator, or be supplied by USB or another regulated 5V supply. The
    maximum current output provided by the on-board regulator is 1A
    (according to the power input source).
  • 3V3. A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 1A (according to the power input source).
  • GND. Ground pins.
  • IOREF. The voltage at which the i/o pins of the board are operating (i.e. VCC for the board). This is 3.3V on the M0.

Memory

The ATSAMD21G18 has 256 KB of flash program memory (with 4 KB used for the bootloader). The
bootloader is factory pre burnt by Atmel and is stored in a dedicated
ROM memory. The bootloader is protected using the NVM fuse.

It also carries 32 KB of SRAM and up to 16KB by emulation of EEPROM (which can be read and written with the EEPROM library).

Input and Output

Each
of the 14 digital i/o pins on the M0 can be used as an input or output,
using pinMode(), digitalWrite(), and digitalRead() functions. They
operate at 3.3 volts. 7mA as maximum DC current for I/O pins and an
internal pull-up resistor (disconnected by default) of 20-60 kOhms. In
addition, some pins have specialized functions:

  • Serial:
    0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial
    data using the ATSAMD21G18 hardware serial capability. Note that on the
    M0, the Serial class refers to USB (CDC) communication; for serial on
    pins 0 and 1, use the Serial1 class.
  • TWI: SDA and SCL. Support TWI communication using the Wire library.
  • PWM:
    Pins 2 to 13 Provide 8-bit PWM output with the analogWrite() function.
    The resolution of the PWM can be changed with the
    analogWriteResolution() function.
    Note1 The pins 4 and 10 can not be used simultaneously as PWM.
    Note2 The pins 5 and 12 can not be used simultaneously as PWM.
  • SPI:
    on the ICSP header. These pins support SPI communication using the SPI
    library. Note that the SPI pins are not connected to any of the digital
    I/O pins as they are on the Uno, They are only available on the ICSP
    connector. This means that if you have a shield that uses SPI, but does
    NOT have a 6-pin ICSP connector that connects to the M0's 6-pin ICSP
    header, the shield will not work.
  • 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.
  • Analog Inputs:
    A0-A5. The M0 has 6 analog inputs, labeled A0 through A5. Pins A0-A5
    appear in the same locations as on the Uno; Each analog input provides
    12 bits of resolution (i.e. 4096 different values). By default the
    analog inputs measure from ground to 3.3 volts, though is it possible to
    change the upper end of their range using the AREF pin and the
    analogReference() function.
  • DAC:
    pin A0 provides true analog outputs with 10-bits resolution (1023
    levels) with the analogWrite() function. This pin can be used to create
    an audio output using the Audio library.
  • Reset: Bring
    this line LOW to reset the microcontroller. This is typically used to
    add a reset button when shields are used that block the one already
    present on the board.
Communication

The
Arduino M0 has a number of facilities for communicating with a
computer, with another Arduino or other microcontrollers, and with
different devices like phones, tablets, cameras and so on. The SAMD21 provides one hardware UART and three hardware USARTs for 3.3V serial communication.

The
Arduino software includes a serial monitor allowing simple textual data
to be sent to and from the board. The RX and TX LEDs on the board will
flash when data is being transmitted via the ATSAMD21G18 chip and USB connection to the computer (but not for serial communication on pins 0 and 1).

The
Native USB port is connected to the SAMD21. It allows for serial (CDC)
communication over USB. This provides a serial connection to the Serial
Monitor or other applications on your computer.

The
SAMD21 also supports TWI and SPI communication. The Arduino software
includes a Wire library to simplify use of the TWI bus. For SPI
communication, you can use the SPI library.

Programming

The Arduino M0 can be programmed with the Arduino software (download).  
If you use Linux-based OS follow the guide Arduino IDE on Linux-based OS.

Uploading
sketches to the SAMD21 is different from how it works with the AVR
microcontrollers found in other Arduino boards: the flash memory needs
to be erased before being re-programmed. Upload operation is managed by a
dedicated ROM area on the SAMD21.

USB port:
To use this port, select "Arduino M0 (Native USB Port)" as your board
in the Arduino IDE. The Native USB port is connected directly to the
SAMD21. Connect the M0 Native USB port (the one closest to the reset
button) to your computer. Opening and closing the Native port at 1200bps
triggers a 'soft erase' procedure: the flash memory is erased and the
board is restarted with the boot loader. Opening and closing the native
port at a different baudrate will not reset the SAMD21.

USB Overcurrent Protection

The
M0 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 flows through to the USB port, the fuse will
automatically break the connection until the short or overload is
removed.

Physical Characteristics

The
maximum length and width of the M0  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.

Conformity Declaration
Product Code

A000103

Arduino M0 的一个坑(2015-12-25)的更多相关文章

  1. 2015/12/25 ① 图灵测试 ② 安装jdk出现的问题 ③ 配置环境变量

    ①图灵测试 1,解释 图灵测试一词来源于计算机科学和密码学的先驱阿兰·麦席森·图灵写于1950年的一篇论文<计算机器与智能>.阿兰·麦席森·图灵1950年设计出这个测试,其内容是,如果电脑 ...

  2. 2015.12.20-2015.12.25 大论文迭代 A

    进一步充实大论文内容.结构,完善一遍大论文 12.20周天,完成论文第五章总结部分,和第一章的修改 12.21周一,完成论文第二章的修改充实 12.22周二,完成论文第三章的修改充实 12.23周三, ...

  3. 用Arduino+OSC建立一个iPad铁路王国巡视机

    翻译自:http://blog.mydream.com.hk/howto/build-up-a-ipad-plarail-patrol-with-arduino-osc 简单介绍 这个教程告诉你怎样建 ...

  4. #VSTS日志# 2015/12/10 – 终于可以删除工作项了

    最近的更新不少,废话少说,直接上干货 定制工作项字段 本周的更新后,所有的用户都可以在vsts上直接给工作项添加字段了,具体内容包括– 添加新字段(日期,字符串,整形,数字)– 字段显示位置配置– 过 ...

  5. 2015.12.29~2015.12.30真题回顾!-- HTML5学堂

    2015.12.29~2015.12.30真题回顾!-- HTML5学堂 吃饭,能够解决饥饿,提供身体运作机能.练习就像吃饭,强壮自己,提升编程技能,寻求编程技巧的最佳捷径!吃饭不能停,练习同样不能停 ...

  6. 2015.12.21~2015.12.24真题回顾!-- HTML5学堂

    2015.12.21~2015.12.24真题回顾!-- HTML5学堂 山不在高,有仙则名!水不在深,有龙则灵!千里冰封,非一日之寒!IT之路,须厚积薄发!一日一小练,功成不是梦!小小技巧,尽在HT ...

  7. 【我的书】Unity Shader的书 — 文件夹(2015.12.21更新)

    写在前面 感谢全部点进来看的朋友.没错.我眼下打算写一本关于Unity Shader的书. 出书的目的有以下几个: 总结我接触Unity Shader以来的历程,给其它人一个借鉴.我非常明确学Shad ...

  8. 记录js new Date日期处理的一个坑

    记录js日期处理的一个坑   当前时区为北美东部时区时, new Date('2019-4-1') new Date('2019-04-01') 结果是相关一个月的. 如下图   new Date(' ...

  9. 说说PHP中foreach引用的一个坑

    From: http://blog.csdn.net/yipiankongbai/article/details/45307767 先来看看下面这段代码: <?php $arr = array( ...

随机推荐

  1. 逻辑(if)、关系、数字、条件运算符

    if语句 if-else if-else  if(a==0){1} else if (a>0){2}  else{3}  特点:1.2.3只有一个括号会被执行  陷阱  1.if(a!=0)  ...

  2. 阿里云ECS每天一件事D6:安装nginx-1.6.2

    自从接触nginx就开始喜欢上这个小东西了,似乎没什么特别的原因,就是喜欢而已. 1.安装环境的准备 yum install pcre pcre-devel openssl openssl-devel ...

  3. 算法导论练习6.5-8 k路合并

    题目: 请给出一个时间为O(nlgk).用来将k个已排序链表合并为一个排序链表的算法.此处n为所有输入链表中元素的总数.(提示:用一个最小堆来做k路合并. 看到题目第个想到的是归并排序过程中的归并操作 ...

  4. android下tcpdump抓包

    tcpdump是最快捷方便的抓包方式,还可以加深对网络协议的理解.android下可以通过如下方式抓包: 1 Android上启动tcpdump Android设备可以把tcpdump的可执行文件上传 ...

  5. SPOJ 705 Distinct Substrings(后缀数组)

    [题目链接] http://www.spoj.com/problems/SUBST1/ [题目大意] 给出一个串,求出不相同的子串的个数. [题解] 对原串做一遍后缀数组,按照后缀的名次进行遍历, 每 ...

  6. 掌握下面常用函数,学php不再难

    一.写入文件 1.打开资源(文件)fopen($filename,$mode) 2.写文件fwrite($handle,$str) 3.关闭文件fclose($handle) 4.一步写入file_p ...

  7. pv ticketlock解决虚拟环境下的spinlock问题

    最近看邮件,有注意到pv ticketlock相关的消息,貌似jeremy 几年前的东东,终于将要被收录到linux 3.12里面. 先说下pv ticketlock这东西,http://blog.x ...

  8. CF#52 C Circular RMQ (线段树区间更新)

    Description You are given circular array a0, a1, ..., an - 1. There are two types of operations with ...

  9. 用jersey + spring 实现rest服务及单元测试

    jersey提供了强大的rest功能,可以通过简洁的标注和编码实现业务的需求,架构会透明的把你的pojo对象转化为客户端可以接受的json/xml文件模式,当然也可以用它做一些基于ajax的表单提交和 ...

  10. jQuery实现页面关键字搜索

    <style type="text/css"> .highlight { background-color:yellow; } </style> <s ...