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

AN2131QC 参数 Datasheet PDF下载

AN2131QC图片预览
型号: AN2131QC
PDF下载: 下载PDF文件 查看货源
内容描述: 在EZ - USBTM集成电路 [The EZ-USBTM Integrated Circuit]
分类和应用:
文件页数/大小: 334 页 / 1468 K
品牌: CYPRESS [ CYPRESS ]
 浏览型号AN2131QC的Datasheet PDF文件第111页浏览型号AN2131QC的Datasheet PDF文件第112页浏览型号AN2131QC的Datasheet PDF文件第113页浏览型号AN2131QC的Datasheet PDF文件第114页浏览型号AN2131QC的Datasheet PDF文件第116页浏览型号AN2131QC的Datasheet PDF文件第117页浏览型号AN2131QC的Datasheet PDF文件第118页浏览型号AN2131QC的Datasheet PDF文件第119页  
2.  
Write the INT2 interrupt vector.  
; -----------------  
; Interrupt Vectors  
; -----------------  
org  
43h  
; int2 is the USB vector  
ljmp  
USB_Jump_Table  
; Autovector will replace byte 45  
Figure 6-8. INT2 Interrupt Vector  
3.  
Write the interrupt service routine.  
Put it anywhere in memory and the jump table in step 1 will automatically jump to it.  
; -----------------------------  
; USB Interrupt Service Routine  
; -----------------------------  
EP2OUT_ISR  
push  
push  
push  
push  
push  
push  
dps  
dpl  
dph  
dpl1  
dph1  
acc  
; save both dptrs, dps, and acc  
mov  
clr  
mov  
a,EXIF  
acc.4  
EXIF,a  
; clear USB IRQ (INT2)  
mov  
mov  
movx  
setb  
dptr,#OUT07IRQ  
a,#01000000b  
@dptr,a  
;
a “1” clears the IRQ bit  
; clear OUT2 int request  
; set my flag  
got_EP2_data  
pop  
pop  
pop  
pop  
pop  
pop  
reti  
acc  
; restore vital registers  
dph1  
dpl1  
dph  
dpl  
dps  
Figure 6-9. Interrupt Service Routine (ISR) for Endpoint 2-OUT  
In this example, the ISR simply sets the 8051 flag “got_EP2_data” to indicate to the back-  
ground program that the endpoint requires service. Note that both data pointers and the  
DPS (Data Pointer Select) registers must be saved and restored in addition to the accumu-  
lator.  
Page 6-18  
Chapter 6. EZ-USB CPU  
EZ-USB TRM v1.9  
 复制成功!