AN2131QC Cypress Semiconductor Corp, AN2131QC Datasheet - Page 116

no-image

AN2131QC

Manufacturer Part Number
AN2131QC
Description
IC MCU 8051 8K RAM 24MHZ 80BQFP
Manufacturer
Cypress Semiconductor Corp
Series
EZ-USB®r
Datasheet

Specifications of AN2131QC

Applications
USB Microcontroller
Core Processor
8051
Program Memory Type
ROMless
Controller Series
AN213x
Ram Size
8K x 8
Interface
I²C, USB
Number Of I /o
24
Voltage - Supply
3 V ~ 3.6 V
Operating Temperature
0°C ~ 70°C
Mounting Type
Surface Mount
Package / Case
80-QFP
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
Other names
428-1307

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
AN2131QC
Manufacturer:
BUSSMANN
Quantity:
3 000
Part Number:
AN2131QC
Manufacturer:
CYPRESS
Quantity:
528
Part Number:
AN2131QC
Manufacturer:
Cypress Semiconductor Corp
Quantity:
10 000
Part Number:
AN2131QC
Manufacturer:
CYPRESS
Quantity:
20 000
4.
The main program loop tests the “got_EP2_data” flag, waiting until it is set by the end-
point 2 OUT interrupt service routine in Figure 6-10. This indicates that a new data
packet has arrived in OUT2BUF. Then the service routine is entered, where the flag is
cleared in line 2. The number of bytes received in OUT2BUF is retrieved from the
OUT2BC register (Endpoint 2 Byte Count) and saved in registers R6 and R7 in lines 7-10.
The dual data pointers are initialized to the source (OUT2BUF) and destination (IN2BUF)
buffers for the data transfer in lines 15-18. These labels represent the start of the 64-byte
buffers for endpoint 2-OUT and endpoint 2-IN, respectively. Each byte is read from the
OUT2BUF buffer and written to the IN2BUF buffer in lines 19-25. The saved value of
EZ-USB TRM v1.9
1
2
3
4
5
6
7
8
9
10
11 ;
12 ; Transfer the bytes received on the OUT2 endpoint to the IN2 endpoint
13 ; buffer.
14 ;
15
16
17
18
19 transfer:
20
21
22
23
24
25
26 ;
27 ; Load the byte count into IN2BC.
28 ;
29
30
31
32 ;
33 ; Load any byte count into OUT2BC.
34 ;
35
36
37
loop:
;
; The user sent bytes to OUT2 endpoint using the USB Control Panel.
; Find out how many bytes were sent.
;
Write the endpoint 2 transfer program.
Figure 6-10. Background Program Transfers Endpoint 2-OUT Data to Endpoint 2-IN
Number of bytes in r6 and r7.
jnb
clr
mov
movx
mov
mov
mov
inc
mov
inc
movx
inc
inc
movx
inc
inc
djnz
mov
mov
movx
mov
movx
sjmp
got_EP2_data,loop
got_EP2_data
dptr,#OUT2BC
a,@dptr
r7,a
r6,a
dptr,#OUT2BUF
dps
dptr,#IN2BUF
dps
movx
dptr
dps
@dptr,a
dptr
dps
r7,transfer
dptr,#IN2BC
a,r6
@dptr,a
dptr,#OUT2BC
@dptr,a
loop
Chapter 6. EZ-USB CPU
This arms in IN transfer
This arms the next OUT transfer.
; clear my flag
; point to OUT2 byte count register
; get the value
; stash the byte count
; save here also
; first data pointer points to EP2OUT buffer
; select the second data pointer
; second data pointer points to EP2IN buffer
; back to first data pointer
get OUT byte
; bump the pointer
; second data pointer
; put into IN buffer
; bump the pointer
; first data pointer
; get other saved copy of byte count
; this arms the IN transfer
; use whatever is in acc
; start checking for another OUT2 packet
Page 6-19

Related parts for AN2131QC