Arduino教程英文版.pdf

上传人:asd****56 文档编号:70334529 上传时间:2023-01-19 格式:PDF 页数:3 大小:358.26KB
返回 下载 相关 举报
Arduino教程英文版.pdf_第1页
第1页 / 共3页
Arduino教程英文版.pdf_第2页
第2页 / 共3页
点击查看更多>>
资源描述

《Arduino教程英文版.pdf》由会员分享,可在线阅读,更多相关《Arduino教程英文版.pdf(3页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。

1、Search the Arduino WebsiteArduino Pro MiniArduino Pro Mini FrontArduino Pro Mini Back(http:/arduino.cc/en/Main/Buy)OverviewThe Arduino Pro Mini is a microcontroller board based on the ATmega168(datasheet(http:/ has 14 digital input/output pins(of which 6 can be used asPWM outputs),8 analog inputs,an

2、 on-board resonator,a reset button,and holes for mounting pin headers.A six pin header can beconnected to an FTDI cable or Sparkfun breakout board to provide USB power and communication to the board.The Arduino Pro Mini is intended for semi-permanent installation in objects or exhibitions.The board

3、comes without pre-mountedheaders,allowing the use of various types of connectors or direct soldering of wires.The pin layout is compatible with the Arduino Mini.There are two version of the Pro Mini.One runs at 3.3V and 8 MHz,the other at 5V and 16 MHz.The Arduino Pro Mini was designed and manufactu

4、red by SparkFun Electronics.Schematic&Reference DesignEAGLE files:arduino-pro-mini-reference-design.zip(http:/arduino.cc/en/uploads/Main/arduino-pro-mini-reference-design.zip)Schematic:Arduino-Pro-Mini-schematic.pdf(http:/arduino.cc/en/uploads/Main/Arduino-Pro-Mini-schematic.pdf)SummaryMicrocontroll

5、erATmega168Operating Voltage3.3V or 5V(depending on model)Input Voltage3.35-12 V(3.3V model)or 5-12 V(5V model)Digital I/O Pins14(of which 6 provide PWM output)Analog Input Pins8DC Current per I/O Pin40 mAFlash Memory16 KB(of which 2 KB used by bootloader)SRAM1 KBEEPROM512 bytesClock Speed8 MHz(3.3V

6、 model)or 16 MHz(5V model)PowerThe Arduino Pro Mini can be powered with an FTDI cable or breakout board connected to its six pin header,or with a regulated 3.3V or5V supply(depending on the model)on the Vcc pin.There is a voltage regulator on board so it can accept voltage up to 12VDC.If youresupply

7、ing unregulated power to the board,be sure to connect to the RAW pin on not VCC.The power pins are as follows:RAW.For supplying a raw voltage to the board.VCC.The regulated 3.3 or 5 volt supply.GND.Ground pins.MemoryThe ATmega168 has 16 KB of flash memory for storing code(of which 2 KB is used for t

8、he bootloader).It has 1 KB of SRAM and 512 bytesof EEPROM(which can be read and written with the EEPROM library(http:/www.arduino.cc/en/Reference/EEPROM).Input and OutputEach of the 14 digital pins on the Pro Mini can be used as an input or output,using pinMode()(http:/arduino.cc/en/Reference/PinMod

9、e),digitalWrite()(http:/arduino.cc/en/Reference/DigitalWrite),and digitalRead()(http:/arduino.cc/en/Reference/DigitalRead)functions.They operate at 3.3 or 5 volts(depending on the model).Each pin can provideor receive a maximum of 40 mA and has an internal pull-up resistor(disconnected by default)of

10、 20-50 kOhms.In addition,some pinshave specialized functions:Serial:0(RX)and 1(TX).Used to receive(RX)and transmit(TX)TTL serial data.These pins are connected to the TX-0 and RX-1 pins of the six pinheader.External Interrupts:2 and 3.These pins can be configured to trigger an interrupt on a low valu

11、e,a rising or falling edge,or a change in value.See theattachInterrupt()(http:/arduino.cc/en/Reference/AttachInterrupt)function for details.PWM:3,5,6,9,10,and 11.Provide 8-bit PWM output with the analogWrite()(http:/arduino.cc/en/Reference/AnalogWrite)function.SPI:10(SS),11(MOSI),12(MISO),13(SCK).Th

12、ese pins support SPI communication,which,although provided by the underlying hardware,is notcurrently included in the Arduino language.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,its off.The Pro Mini has 8 analog inputs,each

13、 of which provide 10 bits of resolution(i.e.1024 different values).Four of them are on the headerson the edge of the board;two(inputs 4 and 5)on holes in the interior of the board.The analog inputs measure from ground to VCC.Additionally,some pins have specialized functionality:I2C:A4(SDA)and A5(SCL

14、).Support I2C(TWI)communication using the Wire library(http:/arduino.cc/en/Reference/Wire).There is another pin on the board:Reset.Bring this line LOW to reset the microcontroller.Typically used to add a reset button to shields which block the one on the board.See also the mapping between Arduino pi

15、ns and ATmega168 ports(http:/arduino.cc/en/Hacking/PinMapping168).CommunicationThe Arduino Pro Mini has a number of facilities for communicating with a computer,another Arduino,or other microcontrollers.TheATmega168 provides UART TTL serial communication,which is available on digital pins 0(RX)and 1

16、(TX).The Arduino software includesa serial monitor which allows simple textual data to be sent to and from the Arduino board via a USB connection.A SoftwareSerial library(http:/www.arduino.cc/en/Reference/SoftwareSerial)allows for serial communication on any of the ProMinis digital pins.The ATmega16

17、8 also supports I2C(TWI)and SPI communication.The Arduino software includes a Wire library to simplify use of the I2Cbus;see the reference(http:/arduino.cc/en/Reference/Wire)for details.To use the SPI communication,please see the ATmega168datasheet.-ShareProgrammingThe Arduino Pro Mini can be progra

18、mmed with the Arduino software(download(http:/arduino.cc/en/Main/Software).For details,see the reference(http:/arduino.cc/en/Reference/HomePage)and tutorials(http:/arduino.cc/en/Tutorial/HomePage).The ATmega168 on the Arduino Pro Mini comes preburned with a bootloader(http:/arduino.cc/en/Tutorial/Bo

19、otloader)that allowsyou to upload new code to it without the use of an external hardware programmer.It communicates using the original STK500protocol(reference(http:/ header files(http:/ can also bypass the bootloader and program the ATmega168 with an external programmer;see these instructions(http:

20、/arduino.cc/en/Hacking/MiniBootloader)for details.Automatic(Software)ResetRather then requiring a physical press of the reset button before an upload,the Arduino Pro Mini is designed in a way that allows it tobe reset by software running on a connected computer.One of the pins on the six-pin header

21、is connected to the reset line of theATmega168 via a 100 nanofarad capacitor.This pin connects to one of the hardware flow control lines of the USB-to-serial convertorconnected to the header:RTS when using an FTDI cable,DTR when using the Sparkfun breakout board.When this line is asserted(taken low)

22、,the reset line drops long enough to reset the chip.The Arduino software uses this capability to allow you to upload code bysimply pressing the upload button in the Arduino environment.This means that the bootloader can have a shorter timeout,as thelowering of the reset line can be well-coordinated

23、with the start of the upload.This setup has other implications.When the Pro Mini is connected to either a computer running Mac OS X or Linux,it resets each time aconnection is made to it from software(via USB).For the following half-second or so,the bootloader is running on the Pro.While it isprogra

24、mmed to ignore malformed data(i.e.anything besides an upload of new code),it will intercept the first few bytes of data sent tothe board after a connection is opened.If a sketch running on the board receives one-time configuration or other data when it firststarts,make sure that the software with which it communicates waits a second after opening the connection and before sending thisdata.Physical CharacteristicsThe dimensions of the Pro Mini PCB are approximately 0.7 x 1.3.NEWSLETTEREnter your email to sign up(https:/

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 技术资料 > 其他杂项

本站为文档C TO C交易模式,本站只提供存储空间、用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。本站仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知淘文阁网,我们立即给予删除!客服QQ:136780468 微信:18945177775 电话:18904686070

工信部备案号:黑ICP备15003705号© 2020-2023 www.taowenge.com 淘文阁