Sensor/Actuator interface with micro controller

  • Sensor data has to be processed and transmitted
  • Sensor connect to a microcontroller through establish interfaces

Serial interface: UART

  • Asyncronous: No clock
  • Simple connection
  • COmmon porotocl used for full duplex serial communcation
  • Send one bit at a time

CS3237-11-1.PNG

Serial interface: SPI

  • Synchronous
  • One master and one slave
  • Short distance communication (embedded system)
  • Max clock rate: 12.5 MHZ

    Signals:

  • Clock
  • Chip select
  • Master out, slave in
  • Master in, slave out

  • The device that gen the clock sig is master
  • data trans mitted between master and slave is sych to the clock generated by the master

Serial Interace:I2C

  • Syncrhonous
  • Follows the clk data
  • Both master and slave can send data
  • There are multiple slaves, address bits define which slave to communcate to
  • Read write bit: Show if the master wants to request or send data
  • All the slaves will look at the address and see ifits matches it address
    • Yes: Pulls the data line to low (This data line is shared to low but only one can pull) - Master will then knows that the slave exist
      • Data is sent
      • This is followed by the ack lines that show that the data is send or recieved
  • Ends when the SDA goes high after SCL

Difference between SPI and I2C

  • SPI: Can keep sending data I2C: Based on data frame

Slide