PIC18F2450/4450
DS39760A-page 134
Advance Information
2006 Microchip Technology Inc.
14.2.3
USB STATUS REGISTER (USTAT)
The USB Status register reports the transaction status
within the SIE. When the SIE issues a USB transfer
complete interrupt, USTAT should be read to determine
the status of the transfer. USTAT contains the transfer
endpoint number, direction and Ping-Pong Buffer
Pointer value (if used).
The USTAT register is actually a read window into a
four-byte status FIFO, maintained by the SIE. It allows
the microcontroller to process one transfer while the
SIE processes additional endpoints (Figure 14-4).
When the SIE completes using a buffer for reading or
writing data, it updates the USTAT register. If another
USB transfer is performed before a transaction
complete interrupt is serviced, the SIE will store the
status of the next transfer into the status FIFO.
Clearing the transfer complete flag bit, TRNIF, causes
the SIE to advance the FIFO. If the next data in the
FIFO holding register is valid, the SIE will immediately
reassert the interrupt. If no additional data is present,
TRNIF will remain clear; USTAT data will no longer be
reliable.
FIGURE 14-4:
USTAT FIFO
Note:
The data in the USB Status register is valid
only when the TRNIF interrupt flag is
asserted.
Note:
If an endpoint request is received while the
USTAT
FIFO
is
full,
the
SIE
will
automatically issue a NAK back to the
host.
Data Bus
USTAT from SIE
4-byte FIFO
for USTAT
Clearing TRNIF
Advances FIFO
REGISTER 14-3:
USTAT: USB STATUS REGISTER
U-0
R-x
U-0
ENDP3
ENDP2
ENDP1
ENDP0
DIR
PPBI(1)
bit 7
bit 0
Legend:
R = Readable bit
W = Writable bit
U = Unimplemented bit, read as ‘0’
-n = Value at POR
‘1’ = Bit is set
‘0’ = Bit is cleared
x = Bit is unknown
bit 7
Unimplemented: Read as ‘0’
bit 6-3
ENDP3:ENDP0: Encoded Number of Last Endpoint Activity bits
(represents the number of the BDT updated by the last USB transfer)
1111
= Endpoint 15
1110
= Endpoint 14
....
0001
= Endpoint 1
0000
= Endpoint 0
bit 2
DIR: Last BD Direction Indicator bit
1
= The last transaction was an IN token
0
= The last transaction was an OUT or SETUP token
bit 1
PPBI: Ping-Pong BD Pointer Indicator bit(1)
1
= The last transaction was to the Odd BD bank
0
= The last transaction was to the Even BD bank
bit 0
Unimplemented: Read as ‘0’
Note 1:
This bit is only valid for endpoints with available Even and Odd BD registers.
相关PDF资料
22-02-3093 CONN FFC/FPC VERTICAL 9POS .100
PIC16C620A-04/P IC MCU OTP 512X14 COMP 18DIP
PIC16F722-I/SP IC PIC MCU FLASH 2KX14 28-DIP
PIC16F684-I/P IC PIC MCU FLASH 2KX14 14DIP
PIC16LC782T-I/SO IC MCU OTP 2KX14 A/D D/A 20SOIC
PIC18LC601T-I/PT IC MCU ROMLESS A/D PWM 64TQFP
PIC18C601T-I/PT IC MCU ROMLESS A/D PWM 64TQFP
PIC18C801T-I/PT IC MCU ROMLESS A/D PWM 80TQFP
相关代理商/技术参数
PIC16C54C-04/P 制造商:Microchip Technology Inc 功能描述:IC 8BIT CMOS MCU 16C54 DIP18
PIC16C54C04/SO 制造商:Microchip Technology 功能描述:8 PIC16C 4MHz 18SOIC 制造商:Microchip Technology 功能描述:8 PIC16C 4MHz 18SOIC Bulk
PIC16C54C-04/SO 功能描述:8位微控制器 -MCU .75KB 25 RAM 12 I/O 4MHz SOIC18 RoHS:否 制造商:Silicon Labs 核心:8051 处理器系列:C8051F39x 数据总线宽度:8 bit 最大时钟频率:50 MHz 程序存储器大小:16 KB 数据 RAM 大小:1 KB 片上 ADC:Yes 工作电源电压:1.8 V to 3.6 V 工作温度范围:- 40 C to + 105 C 封装 / 箱体:QFN-20 安装风格:SMD/SMT
PIC16C54C-04/SO 制造商:Microchip Technology Inc 功能描述:8BIT CMOS MCU SMD 16C54 SOIC18
PIC16C54C-04/SO 制造商:Microchip Technology Inc 功能描述:Microcontroller IC Number of I/Os:12
PIC16C54C-04/SS 功能描述:8位微控制器 -MCU .75KB 25 RAM 12 I/O 4MHz SSOP20 RoHS:否 制造商:Silicon Labs 核心:8051 处理器系列:C8051F39x 数据总线宽度:8 bit 最大时钟频率:50 MHz 程序存储器大小:16 KB 数据 RAM 大小:1 KB 片上 ADC:Yes 工作电源电压:1.8 V to 3.6 V 工作温度范围:- 40 C to + 105 C 封装 / 箱体:QFN-20 安装风格:SMD/SMT
PIC16C54C-04E/P 功能描述:8位微控制器 -MCU .75KB 25 RAM 12 I/O 4MHz ExtTemp PDIP18 RoHS:否 制造商:Silicon Labs 核心:8051 处理器系列:C8051F39x 数据总线宽度:8 bit 最大时钟频率:50 MHz 程序存储器大小:16 KB 数据 RAM 大小:1 KB 片上 ADC:Yes 工作电源电压:1.8 V to 3.6 V 工作温度范围:- 40 C to + 105 C 封装 / 箱体:QFN-20 安装风格:SMD/SMT
PIC16C54C-04E/SO 功能描述:8位微控制器 -MCU .75KB 25 RAM 12 I/O 4MHz Ext Temp SOIC18 RoHS:否 制造商:Silicon Labs 核心:8051 处理器系列:C8051F39x 数据总线宽度:8 bit 最大时钟频率:50 MHz 程序存储器大小:16 KB 数据 RAM 大小:1 KB 片上 ADC:Yes 工作电源电压:1.8 V to 3.6 V 工作温度范围:- 40 C to + 105 C 封装 / 箱体:QFN-20 安装风格:SMD/SMT