|
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.〔 〕 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. ==C code example== Sending a byte on an SPI bus. // transmit byte serially, MSB first void send_8bit_serial_data(unsigned char data) 抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)』 ■ウィキペディアで「Bit banging」の詳細全文を読む スポンサード リンク
|