欢迎访问ic37.com |
会员登录 免费注册
发布采购

AN2131QC 参数 Datasheet PDF下载

AN2131QC图片预览
型号: AN2131QC
PDF下载: 下载PDF文件 查看货源
内容描述: 在EZ - USBTM集成电路 [The EZ-USBTM Integrated Circuit]
分类和应用:
文件页数/大小: 334 页 / 1468 K
品牌: CYPRESS [ CYPRESS ]
 浏览型号AN2131QC的Datasheet PDF文件第113页浏览型号AN2131QC的Datasheet PDF文件第114页浏览型号AN2131QC的Datasheet PDF文件第115页浏览型号AN2131QC的Datasheet PDF文件第116页浏览型号AN2131QC的Datasheet PDF文件第118页浏览型号AN2131QC的Datasheet PDF文件第119页浏览型号AN2131QC的Datasheet PDF文件第120页浏览型号AN2131QC的Datasheet PDF文件第121页  
OUT2BC is used as a loop counter in R7 to transfer the exact number of bytes that were  
received over endpoint 2-OUT.  
When the transfer is complete, the program loads the endpoint 2-IN byte count register  
IN2BC with the number of loaded bytes (from R6) to arm the next endpoint 2-IN transfer  
in lines 29-31. Finally, the 8051 loads any value into the endpoint 2 OUT byte count reg-  
ister OUT2BC to arm the next OUT transfer in lines 35-36. Then the program loops back  
to check for more endpoint 2-OUT data.  
5.  
Initialize the endpoints and enable the interrupts.  
start:  
;
mov  
SP,#STACK-1  
; set stack  
; Enable USB interrupts and Autovector  
;
mov  
dptr,#USBBAV  
a,@dptr,a  
acc.0  
; enable Autovector  
movx  
setb  
movx  
; AVEN bit is bit 0  
@dptr,a  
;
;
;
mov  
mov  
movx  
dptr,#OUT07IEN  
a,#01000000b  
@dptr,a  
; ‘EP0-7 OUT int enables’ register  
; set bit 6 for EP2OUT interrupt enable  
; enable EP2OUT interrupt  
; Enable INT2 and 8051 global interrupts  
;
setb  
setb  
clr  
ex2  
EA  
got_EP2_data  
; enable int2 (USB interrupt)  
; enable 8051 interrupts  
; clear my flag  
Figure 6-11. Initialization Routine  
The initialization routine sets the stack pointer, and enables the EZ-USB Autovector by  
setting USBBAV.0 to 1. Then it enables the endpoint 2-OUT interrupt, all USB interrupts  
(INT2), and the 8051 global interrupt (EA) and finally clears the flag indicating that end-  
point 2-OUT requires service.  
Once this structure is put into place, it is quite easy to service any or all of the bulk end-  
points. To add service for endpoint 2-IN, for example, simply write an endpoint 2-IN  
interrupt service routine with starting address EP2IN_ISR (to match the address in the  
jump table in step 1), and add its valid and interrupt enable bits to the “init” routine.  
Page 6-20  
Chapter 6. EZ-USB CPU  
EZ-USB TRM v1.9  
 复制成功!