single-chip microcomputer Microcontroller 单片机 单片微型计算机 微控制器 GPIO 通用型输入输出 MCU 单片机 微控制器

https://zh.wikipedia.org/wiki/单片机

单片机,全称单片微型计算机英语:single-chip microcomputer),又称微控制器microcontroller),是把中央处理器存储器、定时/计数器(timer/counter)、各种输入输出接口等都集成在一块集成电路芯片上的微型计算机。与应用在个人电脑中的通用型微处理器相比,它更强调自供应(不用外接硬件)和节约成本。它的最大优点是体积小,可放在仪表内部,但存储量小,输入输出接口简单,功能较低。由于其发展非常迅速,旧的单片机的定义已不能满足,所以在很多应用场合被称为范围更广的微控制器;由于单片机微电脑常用于当控制器故又名single chip microcontroller。单芯片是台湾对单片机的称呼;中国大陆主要采用“单片机”的称呼,英文缩写为MCU。

https://en.wikipedia.org/wiki/Microcontroller

microcontroller (or MCU for microcontroller unit) is a small computer on a single integrated circuit. In modern terminology, it is a System on a chip or SoC. A microcontroller contains one or more CPUs (processor cores) along with memory and programmable input/output peripherals. Program memory in the form of Ferroelectric RAMNOR flash or OTP ROM is also often included on chip, as well as a small amount of RAM. Microcontrollers are designed for embedded applications, in contrast to themicroprocessors used in personal computers or other general purpose applications consisting of various discrete chips.

 

 

 

gpio_百度百科 https://baike.baidu.com/item/gpio/4723219

 

GPIO(英语:General-purpose input/output),通用型之输入输出的简称,功能类似8051的P0—P3,其接脚可以供使用者由程控自由使用,PIN脚依现实考量可作为通用输入(GPI)或通用输出(GPO)或通用输入与输出(GPIO),如当clk generator, chip select等。

既然一个引脚可以用于输入、输出或其他特殊功能,那么一定有暂存器用来选择这些功能。对于输入,一定可以透过读取某个暂存器来确定引脚电位的高低;对于输出,一定可以透过写入某个暂存器来让这个引脚输出高电位或者低电位;对于其他特殊功能,则有另外的暂存器来控制它们。

 

GPIO的优点(端口扩展器)
低功耗:GPIO具有更低的功率损耗(大约1μA,μC的工作电流则为100μA)。
集成IIC从机接口:GPIO内置IIC从机接口,即使在待机模式下也能够全速工作。
小封装:GPIO器件提供最小的封装尺寸 ― 3mm x 3mm QFN!
低成本:您不用为没有使用的功能买单。
快速上市:不需要编写额外的代码、文档,不需要任何维护工作。
灵活的灯光控制:内置多路高分辨率的PWM输出。
可预先确定响应时间:缩短或确定外部事件与中断之间的响应时间。
更好的灯光效果:匹配的电流输出确保均匀的显示亮度。
布线简单:仅需使用2条就可以组成IIC总线或3条组成SPI总线。
与ARM 的几组GPIO引脚,功能相似,GPxCON 控制引脚功能,GPxDAT用于读写引脚数据。另外,GPxUP用于确定是否使用上拉电阻。 x为A,B,,H/J,
GPAUP 没有上拉电阻。

 

https://zh.wikipedia.org/wiki/单片机

单片机(英语:single-chip microcomputer,台湾作单晶片,全称单片微型计算机,又称微控制器单元microcontroller unit)),是把中央处理器存储器、定时/计数器(timer/counter)、各种输入输出接口等都集成在一块集成电路芯片上的微型计算机。与应用在个人电脑中的通用型微处理器相比,它更强调自供应(不用外接硬件)和节约成本,集成程度更高,但因为规格已经包含,所能实现的功能也较专一。它的最大优点是体积小,可放在仪表内部,但存储量小,输入输出接口简单。由于其发展非常迅速,旧的定义已不能满足,所以在很多应用场合被称为范围更广的微控制器;由于单片机微电脑常用于当控制器,故又名single chip microcontroller。

 80针脚TQFP封装的PIC18F8720 微控制器

 

 NEC单片机78K0S

绝大多数现在的单片机都是基于冯·诺伊曼结构的,这种结构清楚地定义了嵌入式系统所必需的四个基本部分:一个中央处理器核心,程序存储器(只读存储器或者闪存)、数据存储器(随机存储器)、一个或者更多的定时/计数器,还有用来与外围设备以及扩展资源进行通信的输入/输出端口——所有这些都被集成在单个集成电路芯片上。

单片机与通用型中央处理单元芯片不同在于前者一般很容易配合最小型的外部支持芯片制成工作计算机,这样就可以很容易的把单片机系统植入设备内部来控制设备了。近年来为了在指令和数据上使用不同的字宽,并提高处理器线速度,哈佛结构微控制器(Microcontrollers)和数字信号处理器也逐渐得到了广泛的应用。

传统的微处理器是不允许这么做的。它要完成单片机的工作,就必须连接一些其他芯片。比如说,因为芯片上没有数据存储器,就必须要添加一些RAM的存储芯片,虽然所添加存储器的容量很灵活,但是至少还是要添加。另外还需要添加很多连线来传递芯片之间的数据。与以上的情况相比,单片机的工作则相对独立,一个典型的微控制器只需要一个时钟发生器和很少的RAM和ROM(或者EPROM, E2PROM)就可以在软件和晶振下工作了。同时,微控制器具有丰富的输入输出设备,例如模拟数字转换器定时器串口,以及其他串行通讯接口,比如I2C串行周边接口控制器局域网等。通常,这些集成在内部的设备可以通过特殊的指令来操作。

单片机时钟频率通常较同时代的计算机芯片低,但它价格低廉,能够提供充足的程序存储器、丰富的片上接口。某些架构的单片机生产厂商众多,例如8051系列、Z80系列。一些现代的微控制器支持一些内置的高级编程语言,比如BASIC(培基)语言、C语言C++等。

 

单片机的比特数

根据总线或资料寄存器的宽度,单片机又分为4位、8位、16位和32位单片机。4位单片机多用于冰箱、洗衣机、微波炉、灯具等简单的家电控制中;8位、16位单片机主要用于一般的控制领域,例如遥控器手把、空调、发动机等,一般不使用操作系统;32位用于网络操作、多媒体处理等复杂处理的场合,一般要使用嵌入式操作系统,例如电视、车机、监控器等产品。

 

 WDC的W65C265S8PL单片机

 两颗Atmel牌的ATmega单片机

硬件

开发板可以进一步简化程序的开发和烧制过程。开发板可能包含实际芯片或是仿真器。通过配套的下载线连接电脑与开发板,在电脑上编写程序下载到开发板。批量生产会用到编程器。

https://en.wikipedia.org/wiki/Microcontroller

microcontroller (MCUC, or μC) or microcontroller unit (MCU) is a small computer on a single integrated circuit. A microcontroller contains one or more CPUs (processor cores) along with memory and programmable input/output peripherals. Program memory in the form of ferroelectric RAMNOR flash or OTP ROM is also often included on chip, as well as a small amount of RAM. Microcontrollers are designed for embedded applications, in contrast to the microprocessors used in personal computers or other general purpose applications consisting of various discrete chips.

In modern terminology, a microcontroller is similar to, but less sophisticated than, a system on a chip (SoC). An SoC may include a microcontroller as one of its components, but usually integrates it with advanced peripherals like a graphics processing unit (GPU), a Wi-Fi module, or one or more coprocessors.

 

In 2002, about 55% of all CPUs sold in the world were 8-bit microcontrollers and microprocessors.[8]

 

Historically, the 8-bit segment has dominated the MCU market [..] 16-bit microcontrollers became the largest volume MCU category in 2011, overtaking 8-bit devices for the first time that year [..] IC Insights believes the makeup of the MCU market will undergo substantial changes in the next five years with 32-bit devices steadily grabbing a greater share of sales and unit volumes. By 2017, 32-bit MCUs are expected to account for 55% of microcontroller sales [..] In terms of unit volumes, 32-bit MCUs are expected account for 38% of microcontroller shipments in 2017, while 16-bit devices will represent 34% of the total, and 4-/8-bit designs are forecast to be 28% of units sold that year. The 32-bit MCU market is expected to grow rapidly due to increasing demand for higher levels of precision in embedded-processing systems and the growth in connectivity using the Internet. [..] In the next few years, complex 32-bit MCUs are expected to account for over 25% of the processing power in vehicles.

— IC Insights, MCU Market on Migration Path to 32-bit and ARM-based Devices[12]

 

Raspberry Pi Documentation - Raspberry Pi hardware https://www.raspberrypi.com/documentation/computers/raspberry-pi.html

GPIO and the 40-pin Header

 

A powerful feature of the Raspberry Pi is the row of GPIO (general-purpose input/output) pins along the top edge of the board. A 40-pin GPIO header is found on all current Raspberry Pi boards (unpopulated on Raspberry Pi Zero, Raspberry Pi Zero W and Raspberry Pi Zero 2 W). Prior to the Raspberry Pi 1 Model B+ (2014), boards comprised a shorter 26-pin header. The GPIO header on all boards (including the Raspberry Pi 400) have a 0.1" (2.54mm) pin pitch.

GPIO pins

Any of the GPIO pins can be designated (in software) as an input or output pin and used for a wide range of purposes.

GPIO layout
NOTE
The numbering of the GPIO pins is not in numerical order; GPIO pins 0 and 1 are present on the board (physical pins 27 and 28) but are reserved for advanced use (see below).
 

Voltages

Two 5V pins and two 3.3V pins are present on the board, as well as a number of ground pins (0V), which are unconfigurable. The remaining pins are all general purpose 3.3V pins, meaning outputs are set to 3.3V and inputs are 3.3V-tolerant.

 

Outputs

A GPIO pin designated as an output pin can be set to high (3.3V) or low (0V).

 

Inputs

A GPIO pin designated as an input pin can be read as high (3.3V) or low (0V). This is made easier with the use of internal pull-up or pull-down resistors. Pins GPIO2 and GPIO3 have fixed pull-up resistors, but for other pins this can be configured in software.

 

More

As well as simple input and output devices, the GPIO pins can be used with a variety of alternative functions, some are available on all pins, others on specific pins.

  • PWM (pulse-width modulation)

    • Software PWM available on all pins

    • Hardware PWM available on GPIO12, GPIO13, GPIO18, GPIO19

  • SPI

    • SPI0: MOSI (GPIO10); MISO (GPIO9); SCLK (GPIO11); CE0 (GPIO8), CE1 (GPIO7)

    • SPI1: MOSI (GPIO20); MISO (GPIO19); SCLK (GPIO21); CE0 (GPIO18); CE1 (GPIO17); CE2 (GPIO16)

  • I2C

    • Data: (GPIO2); Clock (GPIO3)

    • EEPROM Data: (GPIO0); EEPROM Clock (GPIO1)

  • Serial

    • TX (GPIO14); RX (GPIO15)

 

 

 

 

 

 

 

posted @ 2016-12-19 13:02  papering  阅读(994)  评论(0编辑  收藏  举报