following features: it can send and receive serial data at the same time, work as a host or slave machine, provide a frequency programmable clock, send end interrupt sign, write conflict protection, and bus competition protection. Figure 3 shows the four modes in which the SPI bus works, among which the most widely used are the spi0 and SPI3 modes (expressed by solid line ):
Figure 2 four modes of SPI bus
MCU simulation SPI interface-deep understanding of SPI bus protocol SPI (serial peripheral interfacer serial peripheral interface) is a synchronous serial communication interface launch
Through the introduction of the previous article, we know that the SPI Universal interface layer is used to connect the specific SPI device protocol driver and SPI Controller driver, the general interface layer in addition to the
bit1 (value 1) is the output at the time of the half-clock cycle before the SCK signal is valid (independent of the CS signal),The rising edge of the first clock cycle of the sck is precisely sampled from the device. Figure 4In Figure 4, watch the CS and miso signals. We can see that after the CS signal is valid, the bit1 (value 1) is immediately output from the device.Usually we do 16-bit SPI operations. Figure 5 Records the
Bus Technology2010-01-15 17:14:34 Read282 Comment0 Font Size:LargeMediumSmallSubscription
Classification: embedded multi-media
1. SPI protocol Overview
SPI, short for serial peripheral interface, is a serial peripheral interface
application design of serial interface SPI interface
The synchronous serial three-wire SPI interface is used, which can be conveniently connected with the peripheral of SPI Communication proto
Added the AXI4 specification (the specification for in-SOC IP interconnect developed by ARM and XILINX), with the addition of the Advanced System Bus (ASB) and advanced Peripheral Bus (APB) to the latest version of AMBA4.0, from the very beginning of the AMBA1.0 version definition to the AHB APB, the Advanced tracking bus ATB, et. The AHP APB Axi can be considered as the bus protocol or specification within the scope CPU, however we often refer to the
the baud rate generator, and we can control its output baud rate by the baud rate control bit (BR).The control register CR1 governs the main control circuit, and the Protocol settings (clock polarity, phase, etc.) of the STM32 SPI module are made by it. The control register CR2 is used to set various interrupt enable.Finally, the NSS pin, which plays the role of the SS-select signal line in the
SPI Communication Protocol
The SPI is a synchronous serial communication interface.SPI is the abbreviation of English serial Peripheral interface, as the name implies is the serial peripheral device interface. SPI is a high-speed
I still remember that the first time I used the SPI device was my junior summer vacation. At that time, I bought a wireless module with my teammates and used a single-chip microcomputer for wireless transmission, but the code was not written by myself, although this function was implemented, I still had no idea about SPI at the time. Senior, I felt ashamed to ask how to use
SPI bus protocol Introduction 1. Technical Performance
The SPI interface is the serial peripheral interface first proposed by Motorola for full duplex three-line synchronization. It adopts the master-slave mode architecture and supports multi-Slave Mode Applications. General
Whether in the network or communication field, as long as it is related to electronics or intelligence, you can find that they all have certain protocols. Now we will introduce the SPI bus protocol. The SPI bus protocol is a communication protocol. What is its concept? Now l
Introduction to SPI
The SPI is all called (Service Provider Interface), a service discovery mechanism built into the JDK.
A service usually refers to a known interface or abstract class, the service provider is the implementation of the interface or abstract class, and then
The LCD and CPU cables are divided into control lines and data lines. The control lines are generally based on the SPI protocol. We initialize the LCD registers through this. Under the premise that the output format of the main chip is fixed, LCD adjustment is the rest of the initial registers. Generally, we need to care about this part of LCD transplantation. The data line is used to transmit pixel data to
SPI is all called (Service Provider Interface) and is a service delivery discovery mechanism built into the JDK. There are many frameworks that use it to do service expansion discovery, simply put, it is a dynamic substitution discovery mechanism, for example, there is an interface, want to run the dynamic to add to it implementation, you just need to add an impl
more than one transfer on the bus, the DMA unit generates the next memory address and the initial transfer.3. Once the DMA transfer is complete, the DMA controller has a interrupt to the CPU.
Compare
Polling
Interrupt-driven I/O
Dma
Advantages
Easy to perform, can use software to change the CPU polling sequence
Without a lot of time on polling.
Suitable for high speed devicesWithout a lot of time on polling.
//Main.m05-protoco//Created by Apple on 13-8-11.Copyright (c) 2013 itcast. All rights reserved.///*1. Definition of the Agreement@protocol Agreement name Method declaration List ....@end2. How to comply with the agreement1> Class Compliance Agreement@interface Class Name: Parent class name @end2> Protocol Compliance Agreement@
// Obtain friend informationVer = 1.0 cmd = getinfo seq = uin = Lv = 2 UN =// Add friendsVer = 1.0 cmd = addtolist seq = uin = UN =// Respond to the other party's request and add you as a friend's responseVer = 1.0 cmd = ack_addtolist seq = uin = UN = Cd = rs =// Delete a friendVer = 1.0 cmd = delfromlist seq = uin = UN =// Search for friendsVer = 1.0 cmd = finger seq = uin = Ag = SX = Pv =// Change your status. The st code should be consistent with the code for getting
Document directory
1. Study descriptionTencent has an http qq interface in 8000 of tqq.tencent.com. Through this interface, you can perform some basic operations, such: login, logout, and change login status (online, busy, offline, and invisible) add and delete friends, view friends information, send verification information (accept added as friends, apply to add peer as friends, reject added as friend
-way stream (Bidrectional stream). GRPC and protocol buffer is to solve the above problems.
A brief introduction to GRPC and Protobuf can be seen in this article: Google Protocol buffer and GRPC profile Grpc Protocol Buffer Practice
My local Gopath directory for/users/hww/work/go, a new catalog for our demo Project CD $GOPATH/src mkdir rpc-protobuf definition
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.