SerialIO.pptVIP

  • 14
  • 0
  • 约2.01千字
  • 约 20页
  • 2017-05-04 发布于湖北
  • 举报
SerialIO

Serial I/O;Serial I/O with the BASIC Stamp;Parallel Interface;Serial Interface;Synchronous and Asynchronous Serial Communication;Asynchronous Serial Communication;Asynchronous Serial Communication;Using the SEROUT Command;Using the SERIN Command;Synchronous Serial I/O;The I2C Bus;The I2C bus master generates SCL and initiates communication with one of the slave devices. Each device has a unique address for device selection. A device address can be a combination of bits that are “hard-wired” into the chip design and one or more pins on the device. These pins can be wired High or Low to select an address that doesn’t conflict with other devices on the I2C bus. Pull-up resistors are required on both the clock and data lines. A variety of special function integrated circuits are available with I2C interfaces, including memory chips, analog-to-digital converters, digital-to-analog converters and real-time-clocks. ;A START sequence begins a bus transmission by transitioning SDA from High to Low while SCL is High. A STOP sequence ends a transmission. The Stop sequence occurs when the master brings SDA from Low to High while SCL is High.;A typical I2C bus sequence for writing to a slave: Send a START sequence Send the I2C device address with the R/W Low (for Write) Send the data byte Optionally send additional data bytes (after repeating START) Send the STOP sequence after all data bytes have been sent The Slave responds by setting the ACK bit (Acknowledge);Reading an I2C Slave device usually begins by writing to it. You must tell the chip which internal register you want to read. I2C Read Sequence Send the START condition Send the device address with R/W held Low (for a Write) Send the number of the register you want to read Send a repeated START condition Send the device address with R/W set High (for a Read) Read the data byte from the slave Send the STOP sequence;;I2C Programming on the BASIC Stamp;The I2COUT Instruction;The I2CIN Instruction;Other Synchronous Serial Pr

文档评论(0)

1亿VIP精品文档

相关文档