获得徽章 0
- What Every Computer Scientist Should Know About Floating-Point Arithmetic评论1
- A visual proof that neural nets can compute any function评论1
- Cross-validation is often used to improve the robustness of the algorithm by preventing overfitting from occurring.评论1
- SPI
The SPI protocol, on the other hand, simplifies the issue of addressing by breaking out a separate, son-select (SS) line for every son device (you may also see CS for chip-select). The mother then indicates which son device it is communicating with by pulling the son-select line for that son low. This advantage of simpler, faster addressing comes with the disadvantage of each additional son device requiring another wire, whereas an I2C bus is always only two wires. An SPI bus, on the other hand, requires a serial clock line, like I2C, in addition to two data lines for simultaneous bidirectional, or full duplex, data transfer, plus one son-select line for every son on the bus. Thus, SPI is significantly more complex to wire than both UART and I2C, but achieves the fastest data transfer of the three due to simple addressing and fast clock rates (typically in the range of a few MHz).展开评论1 - I2C
For systems where you would like your MCU to communicate with multiple modules, without needing to wire up separate links for each module, the I2C and SPI protocols allow the creation of a serial bus. On a serial bus, many son, or peripheral, devices can communicate with a single mother, or controller, using the same data lines. I2C, like UART, only uses two wires: SDA, serial data, and SCL, serial clock. The SCL line allows the mother to explicitly set the data transfer rate, contrasted with UART, where both devices need to know the bit-rate beforehand. This simple wiring does come at the cost of data transfer being half duplex, meaning in one direction at a time. In addition, when initiating a data transfer on an I2C bus, the mother device must specify which device it is sending data to or requesting data from by first indicating the address of the intended son device.展开评论1 - UART
While UART is remarkably simple to wire up and permits simultaneous bidirectional data transfer, there is no explicit understanding of transfer rates that is shared between each, hence the term “asynchronous” being a part of its name. Instead, both sides of a UART channel must have an agreed upon rate of data transfer in bits per second, referred to as the baud rate. Modules that communicate via UART will often have a pre-defined baud rate, that you as a designer must program your microcontroller to match in order to communicate. One of the most crucial drawbacks of UART is that it is a strictly point-to-point communication protocol, meaning it is designed for one device to communicate with only one other device.展开评论1