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

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
The 8051 code example in Figure 6-13 uses the Autopointer to transfer a block of eight
data bytes from the endpoint 4 OUT buffer to internal 8051 memory.
As the comment in the penultimate line indicates, the Autopointer saves an “inc dptr”
instruction that would be necessary if one of the 8051 data pointers were used to access
the OUT4BUF RAM data. This improves the transfer time.
As described in Chapter 8, "EZ-USB Isochronous Transfers," the EZ-USB core provides a
method for transferring data directly between an internal FIFO and external memory in
two 8051 cycles (333 ns). The fast transfer mode is active for bulk data when:
The 8051 code example in Figure 6-14 shows a transfer loop for moving 64 bytes of exter-
nal FIFO data into the endpoint 4-IN buffer. The FASTXFR register bits are explained in
Chapter 8, "EZ-USB Isochronous Transfers."
EZ-USB TRM v1.9
Note
Fastest bulk transfer speed in and out of EZ-USB bulk buffers is achieved when the
Autopointer is used in conjunction with the EZ-USB Fast Transfer mode.
Init:
;
loop:
The 8051 sets FBLK=1 in the FASTXFR register, enabling fast bulk transfers,
The 8051 DPTR points to the AUTODATA register, and
The 8051 executes a “movx a,@dptr” or a “movx @dptr,a” instruction.
mov
mov
movx
mov
mov
movx
mov
mov
mov
movx
mov
inc
djnz
dptr,#AUTOPTRH
a,#HIGH(OUT4BUF)
@dptr,a
dptr,#AUTOPTRL
a,#LOW(OUT4BUF)
@dptr,a
dptr,#AUTODATA
r0,#80H
r2,#8
a,@dptr
@r0,a
r0
r2,loop
Figure 6-13. Use of the Autopointer
Chapter 6. EZ-USB CPU
; High portion of OUT4BUF buffer
; Load OUTOPTRH
; Low portion of OUT4BUF buffer address
; Load AUTOPTRL
; point to the ‘fifo’ register
; store data in upper 128 bytes of 8051 RAM
; loop counter
; get a ‘fifo’ byte
; store it
; bump destination pointer
; (NOTE: no ‘inc dptr’ required here)
; do it eight times
Page 6-23

Related parts for AN2131-DK001