AN2131-DK001 Cypress Semiconductor Corp, AN2131-DK001 Datasheet - Page 159

KIT EZ-USB DEVELOPMENT BOARD

AN2131-DK001

Manufacturer Part Number
AN2131-DK001
Description
KIT EZ-USB DEVELOPMENT BOARD
Manufacturer
Cypress Semiconductor Corp
Datasheet

Specifications of AN2131-DK001

Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
Other names
428-1333
FRD# strobes[00] and [01], along with the OSC24 clock signal are typically used to con-
nect to an external synchronous FIFO. The on-clock-wide read strobe ensures that the
FIFO address advances only once per clock. The second strobe [01] is for FIFOs that put
data on the bus one clock after the read strobe. Stretch values above 000 serve only to
extend the 8051 cycle times, without affecting the width of the FRD# strobe.
FRD# strobes [10] and [11] are typically connected to an external asynchronous FIFO,
where no clock is required. Strobe [10] samples the data at the same time as strobe [11],
but provides a wider pulse width (for stretch=000), which is required by some audio
CODECS. Timing values for these strobe signals are given in Chapter 13, “EZ-USB AC/
DC Parameters.”
The 8051 code example in Figure 8-13 shows a transfer loop for moving external FIFO
data into the endpoint 8-IN FIFO. This code moves data from an external FIFO attached
to the EZ-USB data bus and strobed by the FRD# signal, into the FIFO register IN8DATA
This routine uses a combination of in-line and looped code to transfer 640 bytes into the
EP8IN FIFO from an external FIFO. The loop transfers eight bytes in 19 cycles, and it
takes 80 times through the loop to transfer 640 bytes. Therefore, the total transfer time is
80 times 19 cycles, or 1,520 cycles. The 640 byte transfer thus takes 1,520*166 ns or 252
Using this routine, the time to completely fill one isochronous FIFO with 1,024 bytes
(assuming all 1,024 isochronous FIFO bytes are assigned to one endpoint) would be 128
Page 8-14
8.8
s, or approximately one-fourth of the 1-ms USB frame time.
(init)
;
loop:
Figure 8-13. 8051 Code to Transfer 640 Bytes of External Data to an Isochronous IN FIFO
Fast Transfer Speed
mov
mov
movx
mov
mov
movx
movx
movx
movx
movx
movx
movx
movx
djnz
dptr,#FASTXFR
a,#10000000b
@dptr,a
dptr,#IN8DATA
r7,#80
@dptr,a
@dptr,a
@dptr,a
@dptr,a
@dptr,a
@dptr,a
@dptr,a
@dptr,a
r7,loop
Chapter 8. EZ-USB CPU
; set up the fast ISO transfer mode
; FISO=1, RPOL=0, RM1-0 = 00
; load the FASTXFR register
; pointer to IN endpoint FIFO
; r7 is loop counter, 8 bytes per loop
; (2) write IN FIFO using byte from external bus
; (2) again
; (2) again
; (2) again
; (2) again
; (2) again
; (2) again
; (2) again
; (3) do eight more, ‘r7’ times
EZ-USB TRM v1.9

Related parts for AN2131-DK001