CY7C63001
A
CY7C63101
A
Document #: 38-08026 Rev. *A Page 4 of 25
6.1.3 Data Memory Organization
The USB Controller includes 128 bytes of data RAM. The
upper 16 bytes of the data memory are used as USB FIFOs
for Endpoint 0 and Endpoint 1. Each endpoint is associated
with an 8-byte FIFO.
The USB controller includes two pointers into data RAM, the
Program Stack Pointer (PSP) and the Data Stack Pointer
(DSP). The value of PSP after reset is 0x00. The PSP incre-
ments by two whenever a CALL instruction is executed and it
decrements by two whenever a RET instruction is used.
The DSP pre-decrements by one whenever a PUSH
instruction is executed and it increments by one after a POP
instruction is used. The default value of the DSP after reset is
0x00, which would cause the first PUSH to write into USB
FIFO space for Endpoint 1. Therefore, the DSP should be
mapped to a location such as 0x70 before initiating any data
stack operations. Refer to the Reset section for more infor-
mation about DSP remapping after reset. Figure 6-2 illustrates
the Data Memory Space.
after reset Address
PC 0x0000 Reset Vector
0x0002 Interrupt Vector – 128 µs
0x0004 Interrupt Vector – 1.024 ms
0x0006 Interrupt Vector – USB Endpoint 0
0x0008 Interrupt Vector – USB Endpoint 1
0x000A Reserved
0x000C Interrupt Vector – GPIO
0x000E Interrupt Vector – Cext
0x0010 On-chip program Memory
0x07FF 2K ROM (CY7C63000A, CY7C63100A)
0x0FFF 4K ROM (CY7C63001A, CY7C63101A)
Figure 6-1. Program Memory Space
CY7C63001
A
CY7C63101
A
Document #: 38-08026 Rev. *A Page 5 of 25
6.2 I/O Register Summary
I/O registers are accessed via the I/O Read (IORD) and I/O
Write (IOWR, IOWX) instructions.
after reset
Address
DSP PSP
0x00
user
firmware
0x02
0x04
DSP
0x70 USB FIFO – Endpoint 0
0x77
0x78 USB FIFO – Endpoint 1
0x7F
Figure 6-2. Data Memory Space
Table 6-1. I/O Register Summary
Register Name I/O Address Read/Write Function Page
P0 Data 0x00 R/W General purpose I/O Port (low current) Figure 6-8
P1 Data 0x01 R/W General purpose I/O Port (high current) Figure 6-9
P0 IE 0x04 W Interrupt enable for Port 0 pins Figure 6-17
P1 IE 0x05 W Interrupt enable for Port 1 pins Figure 6-18
P0 Pull-up 0x08 W Pull-up resistor control for Port 0 pins Figure 6-11
P1 Pull-up 0x09 W Pull-up resistor control for Port 1 pins Figure 6-12
EP0 TX Config. 0x10 R/W USB Endpoint 0 transmit configuration Figure 6-22
EP1 TX Config. 0x11 R/W USB Endpoint 1 transmit configuration Figure 6-23
USB DA 0x12 R/W USB device address Figure 6-20
USB SCR 0x13 R/W USB status and control Figure 6-24
EP0 RX Status 0x14 R/W USB Endpoint 0 receive status Figure 6-21
GIE 0x20 R/W Global Interrupt Enable Figure 6-15
WDT 0x21 W Watchdog Timer clear Figure 6-4
Cext 0x22 R/W External R-C Timing circuit control Figure 6-5
Timer 0x23 R Free-running timer Figure 6-6
P0 Isink 0x30-0x37 W Input sink current control for Port 0 pins. There is one
Isink register for each pin. Address of the Isink register
for pin 0 is located at 0x30 and the register address for
pin 7 is located at 0x37.
Figure 6-13
CY7C63001
A
CY7C63101
A
Document #: 38-08026 Rev. *A Page 6 of 25
6.3 Reset
The USB Controller supports three types of resets. All
registers are restored to theirWatchdog default states during a
reset. The USB Device Address is set to 0 and all interrupts
are disabled. In addition, the Program Stack Pointer (PSP) is
set to 0x00 and the Data Stack Pointer (DSP) is set to 0x00.
The user should set the DSP to a location such as 0x70 to
reserve 16 bytes of USB FIFO space. The assembly instruc-
tions to do so are:
MOV A, 70h ; Move 70 hex into Accumulator, use 70
instead of 6F because the dsp is
; always decremented by 1 before the
data transfer of the PUSH instruction occurs
SWAP A, DSP ; Move Accumulator value into dsp
The three reset types are:
1. Power-On Reset (POR)
2. Watchdog Reset (WDR)
3. USB Reset
The occurrence of a reset is recorded in the Status and Control
Register located at I/O address 0xFF (Figure 6-3). Reading
and writing this register are supported by the IORD and IOWR
instructions. Bits 1, 2, and 7 are reserved and must be written
as zeros during a write. During a read, reserved bit positions
should be ignored. Bits 4, 5, and 6 are used to record the
occurrence of POR, USB, and WDR Reset respectively. The
firmware can interrogate these bits to determine the cause of
a reset. If a Watchdog Reset occurs, firmware must clear the
WDR bit (bit 6) in the Status and Control Register to re-enable
the USB transmitter (please refer to the Watchdog Reset
section for further details). Bit 0, the “Run” control, is set to 1
at POR. Clearing this bit stops the microcontroller (firmware
normally should not clear this bit). Once this bit is set to LOW,
only a reset can set this bit HIGH.
The microcontroller resumes execution from ROM address
0x00 after a reset unless the Suspend bit (bit 3) of the Status
and Control Register is set. Setting the Suspend bit stops the
clock oscillator and the interrupt timers and powers down the
microcontroller. The detection of any USB activity, the occur-
rence of a GPIO Interrupt, or the occurrence of the Cext
Interrupt terminates the suspend condition.
6.3.1 Power-On Reset
Power-On Reset (POR) occurs every time the power to the
device is switched on. Bit 4 of the Status and Control Register
is set to record this event (the register contents are set to
00011001 by the POR). The USB Controller is placed in
suspended mode at the end of POR to conserve power (the
clock oscillator, the timers, and the interrupt logic are turned
off in suspend mode). After POR, only a non-idle USB Bus
state terminates the suspend mode. The microcontroller then
begins execution from ROM address 0x00.
P1 Isink 0x38-0x3F W Input sink current control for Port 1 pins. There is one
Isink register for each pin. Address of the Isink register
for pin 0 is located at 0x38 and the register address for
pin 7 is located at 0x3F. The number of Port 1 pins
depends on package type.
Figure 6-13
SCR 0xFF R/W Processor status and control register Figure 6-3
Table 6-1. I/O Register Summary (continued)
Register Name I/O Address Read/Write Function Page
b7 b6 b5 b4 b3 b2 b1 b0
Reserved WDR USBR POR SUSPEND Reserved Reserved RUN
R/W R/W R/W R/W R/W
00010001
Figure 6-3. Status and Control Register (SCR – Address 0xFF)

CY7C63001A-SC

Mfr. #:
Manufacturer:
Cypress Semiconductor
Description:
IC MCU 4K LS USB MCU 20-SOIC
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union