Universal Serial Interface USI CS 423 Dick Steflik

  • Slides: 6
Download presentation
Universal Serial Interface USI CS 423 Dick Steflik

Universal Serial Interface USI CS 423 Dick Steflik

What is it for? Basic hardware needed for serial comm: SPI (4 -wire bus)

What is it for? Basic hardware needed for serial comm: SPI (4 -wire bus) MMC/SD Ethernet, UARTs, USARTs, JTAG (IEEE 1149. 1) I 2 C/TWI (Inter-Integrated Circuit) (2/3 -wire bus) appropriate for peripherals where simplicity and low manufacturing cost are more important than speed Accessing DACs and ADCs Interfacing OLEDs/LCDs Computer diagnistic sensors (fans, overtemp)

USI Block Diagram

USI Block Diagram

USI Data Register 8 -bit, parallel load/read shift register SFR I/O 8 (0 x

USI Data Register 8 -bit, parallel load/read shift register SFR I/O 8 (0 x 0 F) Port B PB 5 - DI/SDA PB 6 - DO PB 7 – UCSK/SCL Must set DDR for Port B appropriately Data must be read from USIDR immediately as the register is not buffered

USI Status register 7 – USISIF – Start Cond. Interrupt Flag 6 – USIOIF

USI Status register 7 – USISIF – Start Cond. Interrupt Flag 6 – USIOIF – Counter Overflow Interrupt Flag 5 – USIPF – Stop Cond. Interrupt Flag 4 – USIDC – Data Output Collision 3 – USICNT 3 – 4 -bit Counter MSB 2 - USICNT 2 1 - USICNT 1 0 – USICNT 0 – 4 -bit Counter LSB

USI Control Register 7 – USISIE – Start Cond. Interrupt Enable 6 – USIOIE

USI Control Register 7 – USISIE – Start Cond. Interrupt Enable 6 – USIOIE – Counter Overflow Interrupt Enable 5 & 4 - USWWM 1. . 0 – Wire Mode 3 & 2 - USICS 1. . 0 – Clock Select 1 – USICLK - 0 – USITC – USI Timer/Counter Strobe bit