Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
ATtiny2313A ATtiny4313.pdf
Скачиваний:
40
Добавлен:
11.05.2015
Размер:
6.13 Mб
Скачать

16. USI – Universal Serial Interface

16.1Features

Two-wire Synchronous Data Transfer (Master or Slave)

Three-wire Synchronous Data Transfer (Master or Slave)

Data Received Interrupt

Wakeup from Idle Mode

In Two-wire Mode: Wake-up from All Sleep Modes, Including Power-down Mode

Two-wire Start Condition Detector with Interrupt Capability

16.2Overview

The Universal Serial Interface (USI), provides the basic hardware resources needed for serial communication. Combined with a minimum of control software, the USI allows significantly higher transfer rates and uses less code space than solutions based on software only. Interrupts are included to minimize the processor load.

A simplified block diagram of the USI is shown in Figure 16-1 For actual placement of I/O pins refer to “Pinout ATtiny2313A/4313” on page 2. Device-specific I/O Register and bit locations are listed in the “Register Description” on page 163.

Figure 16-1. Universal Serial Interface, Block Diagram

 

 

 

 

 

 

 

 

 

 

 

D Q

DO

(Output only)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

LE

 

 

 

Bit7

 

 

 

 

 

 

Bit0

 

DI/SDA

(Input/Open Drain)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3

 

 

 

 

 

 

 

 

USIDR

 

 

2

 

 

 

 

 

 

 

 

 

 

1

TIM0 COMP

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0

 

 

 

 

 

 

 

 

USIBR

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3

0

 

(Input/Open Drain)

 

 

 

 

 

 

 

 

2

1

USCK/SCL

 

 

 

 

 

 

4-bit Counter

 

 

BUS

USISIF

USIOIF

USIPF

USIDC

 

 

 

1

 

 

 

 

 

 

0

 

CLOCK

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

HOLD

 

DATA

 

 

 

 

 

 

 

 

[1]

Two-wire Clock

 

 

 

 

 

USISR

 

 

 

 

 

 

 

 

 

 

 

 

 

Control Unit

 

 

 

 

 

 

2

 

 

 

 

 

 

 

USISIE

USIOIE

USIWM1

USIWM0

USICS1

USICS0

USICLK

USITC

 

 

 

 

 

 

 

 

USICR

 

 

 

 

 

 

The 8-bit USI Data Register (USIDR) contains the incoming and outgoing data. It is directly accessible via the data bus but a copy of the contents is also placed in the USI Buffer Register (USIBR) where it can be retrieved later. If reading the USI Data Register directly, the register must be read as quickly as possible to ensure that no data is lost.

The most significant bit of the USI Data Register is connected to one of two output pins (depending on the mode configuration, see “Analog Comparator” on page 168). There is a transparent latch between the output of the USI Data Register and the output pin, which delays the change

156 ATtiny2313A/4313

8246B–AVR–09/11

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]