zoukankan      html  css  js  c++  java
  • Bit banging

    Bit banging

    Bit banging is a technique for serial communications using software instead of dedicated hardware. Software directly sets and samples the state of pins on the microcontroller, and is responsible for all parameters of the signal: timing, levels, synchronization, etc. In contrast to bit banging, dedicated hardware (such as a modem, UART, or shift register) handles these parameters and provides a (buffered) data interface in other systems, so software is not required to perform signal demodulation. Bit banging can be implemented at very low cost, and is used in, for example, embedded systems.[1]
    Although it is often considered to be something of a hack, bit banging does allow the same device to use different protocols with minimal or no hardware changes required. In many cases, bit banging is made possible because more recent hardware operates much more quickly than hardware did when standard communications protocols were created.

    也就是使用 software 搭配 gpio 來實作硬體的 protocol 溝通,
    所以軟體需要注意 timing,level,synchronization 等等
    如:I2C,SPI,
    優點是 low cost,
    缺點是 software 負擔大。

    Reference

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

  • 相关阅读:
    STL常用容器☞String容器
    初识STL
    函数模板
    多态
    运算符重载
    友元
    对象的初始化和清理
    C++内存分区模型
    传值和传地址
    const的使用
  • 原文地址:https://www.cnblogs.com/youchihwang/p/7216069.html
Copyright © 2011-2022 走看看