AN2131SC Cypress Semiconductor Corp, AN2131SC Datasheet - Page 117

no-image

AN2131SC

Manufacturer Part Number
AN2131SC
Description
IC MCU 8051 8K RAM 24MHZ 44QFP
Manufacturer
Cypress Semiconductor Corp
Series
EZ-USB®r
Datasheet

Specifications of AN2131SC

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
16
Voltage - Supply
3 V ~ 3.6 V
Operating Temperature
0°C ~ 70°C
Mounting Type
Surface Mount
Package / Case
44-QFP
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
Other names
428-1306
AN2131SC

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
AN2131SC
Manufacturer:
CYPRESS
Quantity:
5 510
Part Number:
AN2131SC
Manufacturer:
Cypress Semiconductor Corp
Quantity:
10 000
Part Number:
AN2131SC
Manufacturer:
CY
Quantity:
1 000
Part Number:
AN2131SC
Manufacturer:
PANASONIC
Quantity:
1 000
Part Number:
AN2131SC
Manufacturer:
CYPRESS
Quantity:
8 000
Part Number:
AN2131SC
Manufacturer:
CYPRSS
Quantity:
20 000
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.
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
start:
;
; Enable USB interrupts and Autovector
;
;
;
;
; Enable INT2 and 8051 global interrupts
;
Initialize the endpoints and enable the interrupts.
mov
mov
movx
setb
movx
mov
mov
movx
setb
setb
clr
SP,#STACK-1
dptr,#USBBAV
a,@dptr,a
acc.0
@dptr,a
dptr,#OUT07IEN
a,#01000000b
@dptr,a
ex2
EA
got_EP2_data
Figure 6-11. Initialization Routine
Chapter 6. EZ-USB CPU
; set stack
; enable Autovector
; AVEN bit is bit 0
; ‘EP0-7 OUT int enables’ register
; set bit 6 for EP2OUT interrupt enable
; enable EP2OUT interrupt
; enable int2 (USB interrupt)
; enable 8051 interrupts
; clear my flag
EZ-USB TRM v1.9

Related parts for AN2131SC