Electrical(Hardware) Protocols:
- JTAG(Joint Test Action Group), JTAG is actually a protocol over SPI.
5 pins/connections(GND, TMS, TCK, TDI, TDO),
Output type: Maximum voltage: 5.5volts (5volt safe), 3.3volt normal, or open collector (pull-up resistors required).
Pull-up resistors: required for open collector output mode (2K – 10K). - SPI(Serial Peripheral Interface): Innovated by MOTOROLA Inc.,
5 pins/connections(GND, CS、SCK、MISO、MOSI), - SWD(Serial Wire Debug): ARM debug interface,
3 pins/connections(GND, SWDCLK, SWDIO), - IIC(Inter-Integrated Circuits): Innovated by PHILIPS Inc.,
3 pins/connections(GND, SCL, SDA), - UART(Universal Asynchronous Receiver/Transmitter,Serial, RS232/485)
4 pins/connections(GND, RX, TX, VCC:OnlyWhenActAsPowerSource), - FIFO: High bandwidth, High transmit rate: CPU/Video/Camera FIFO
- IIS/I2S(Integrate Interface of Sound), Innovated by PHILIPS Inc. for Digital Audio devices use,
5 pins/connections(GND, DI, DO, CLK, LRCK), - ICSP: 多用于Microchip
- CAN bus / ModBus : usually Industrial/Automotive application
Serial Bus 有Sync./Async., Duplex/Half-Duplex, Bidirection/SingleDirection 三类Categories.
Serial Bus因占用较少管脚被广泛应用, 几乎所有的CPU/MCU/MicroController都有SPI/I2C和UART接口,而且不止一个。
过去几十年有3种最常用的SPI、I2C和UART; 这3种串行总线的主要区别:
- SPI - Serial Peripheral Interface(串行外设接口), 有时钟同步串行总线, Motorola 首创;
有leader/follwer之分,只有一个leader, 其他为follwer, follwer器件寻址是靠专用SS(片选信号)线实现;
信号线不需要电阻上拉; - I2C - Inter-Integrated Circuits(集成电路之间的连接), 有时钟同步串行总线, Philips 首创;
没Leader/Follwer之分, 所有挂在总线上的器件都是平等的,都有唯一的地址(身份证护照);
信号线要通过电阻上拉; - UART - Universal Asynchronous Receiver/Transmitter(通用异步收/发串行总线, 不必用时钟同步信号)。
由于很多芯片都采用管脚功能复用, 同一个管脚既用于SPI,也用于I2C,根据具体连接方式进行选用。
当器件的管脚配置为I2C时,要记住在I2C的两线(SCL、SDA)上一定要有上拉电阻,SPI则不需要。
SPI(Serial Peripheral Interface - 串行外设接口)是一种用于短距离通信(大多嵌入式系统)的同步串行通信接口规范,
这种接口由Motorola发明,已经成了一种事实标准。广泛用于各种处理器, 传感器, 串行ADC、DAC、存储器、SD卡以及LCD等进行数据连接。