embedded sys16

Page 1

Exam zone


Universal Serial Interface USI

CS423 Dick Steflik


What is it for? 

Basic hardware needed for serial comm: 

SPI (4-wire bus)‫‏‬   

MMC/SD Ethernet, UARTs, USARTs, JTAG (IEEE 1149.1)‫‏‬

I2C/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 Data Register 

8-bit, parallel load/read shift register

SFR I/O8 (0x0F)‫‏‬

Port B

 

PB5 - DI/SDA

PB6 - DO

PB7 – 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 – Counter Overflow Interrupt Flag

5 – USIPF – Stop Cond. Interrupt Flag

4 – USIDC – Data Output Collision

3 – USICNT3 – 4-bit Counter MSB

2 - USICNT2

1 - USICNT1

0 – USICNT0 – 4-bit Counter LSB


USI Control Register 

7 – USISIE – Start Cond. Interrupt Enable

6 – USIOIE – Counter Overflow Interrupt Enable

5 & 4 - USWWM1..0 – Wire Mode

3 & 2 - USICS1..0 – Clock Select

1 – USICLK -

0 – USITC – USI Timer/Counter Strobe bit


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.