|
If you can't view the Datasheet, Please click here to try to view without PDF Reader . |
|
Datasheet File OCR Text: |
cy7c63411/12/13 cy7c63511/12/13 cy7c63612/13 cypress semiconductor corporation ? 3901 north first street san jose ca 95134 408-943-2600 document #: 38-08027 rev. ** revised june 4, 2002 cy7c63411/12/13 cy7c63511/12/13 cy7c63612/13 low-speed usb peripheral controller
cy7c63411/12/13 cy7c63511/12/13 cy7c63612/13 for for document #: 38-08027 rev. ** page 2 of 36 table of contents 1.0 features ................................................................................................................. .................... 5 2.0 functional overview ...................................................................................................... ....... 6 3.0 pin assignments .......................................................................................................... ............. 8 4.0 programming model ........................................................................................................ ....... 8 4.1 14-bit program counter (pc) .............................................................................................. ............. 8 4.2 8-bit accumulator (a) .................................................................................................... ................... 8 4.3 8-bit index register (x) ................................................................................................. ................... 8 4.4 8-bit program stack pointer (psp) ........................................................................................ ..........9 4.5 8-bit data stack pointer (dsp) ........................................................................................... ............. 9 4.6 address modes ............................................................................................................ .................... 9 4.6.1 data ................................................................................................................... ..................................... 9 4.6.2 direct ................................................................................................................. ..................................... 9 4.6.3 indexed ................................................................................................................ ................................... 9 5.0 instruction set summary .................................................................................................. .11 6.0 memory organization ...................................................................................................... .... 12 6.1 program memory organization .............................................................................................. ........ 12 6.2 data memory organization ................................................................................................. ........... 13 6.3 i/o register summary ..................................................................................................... .............. 14 7.0 clocking ................................................................................................................. ................... 15 8.0 reset .................................................................................................................... ....................... 15 8.1 power-on reset (por) ..................................................................................................... ............ 15 8.2 watch dog reset (wdr) .................................................................................................... ........... 16 9.0 general purpose i/o ports ............................................................................................... 1 6 9.1 gpio interrupt enable ports .............................................................................................. ............ 17 9.2 gpio configuration port .................................................................................................. .............. 18 10.0 dac port ................................................................................................................ .................. 19 10.1 dac port interrupts ..................................................................................................... ................ 19 10.2 dac isink registers ..................................................................................................... ................ 20 11.0 usb serial interface engine (sie) ................................................................................. 20 11.1 usb enumeration ......................................................................................................... ............... 20 11.2 ps/2 operation .......................................................................................................... .................. 20 11.3 usb port status and control ............................................................................................. .......... 21 12.0 usb device .............................................................................................................. ................. 21 12.1 usb ports ............................................................................................................... ..................... 21 12.2 device endpoints (3) .................................................................................................... ............... 21 13.0 12-bit free-running timer ............................................................................................... .. 22 13.1 timer (lsb) ............................................................................................................. .................... 22 13.2 timer (msb) ............................................................................................................. ................... 22 14.0 processor status and control register ............................................................... 23 15.0 interrupts .............................................................................................................. ................ 24 15.1 interrupt vectors ....................................................................................................... ................... 24 cy7c63411/12/13 cy7c63511/12/13 cy7c63612/13 for for document #: 38-08027 rev. ** page 3 of 36 15.2 interrupt latency ....................................................................................................... ................... 25 15.2.1 usb bus reset interrupt ............................................................................................... ..................... 25 15.2.2 timer interrupt ....................................................................................................... ............................. 25 15.2.3 usb endpoint interrupts ............................................................................................... ...................... 25 15.2.4 dac interrupt ......................................................................................................... ............................. 25 15.2.5 gpio interrupt ........................................................................................................ ............................ 25 16.0 truth tables ............................................................................................................ ............. 26 17.0 absolute maximum ratings ............................................................................................. 29 18.0 dc characteristics ...................................................................................................... ...... 30 19.0 switching characteristics ............................................................................................. 31 20.0 ordering information .................................................................................................... ... 33 21.0 package diagrams ........................................................................................................ ...... 34 cy7c63411/12/13 cy7c63511/12/13 cy7c63612/13 for for document #: 38-08027 rev. ** page 4 of 36 list of figures figure 6-1. program memory space with interrupt vector table ......................................................... 12 figure 7-1. clock oscillator on-chip circuit ................................................................................. ......... 15 figure 8-1. watch dog reset (wdr) ............................................................................................ ....... 16 figure 9-1. block diagram of a gpio line ..................................................................................... ...... 16 figure 9-2. port 1 data 0x01h (read/write) ................................................................................... ........ 17 figure 9-3. port 2 data 0x02h (read/write) ................................................................................... ........ 17 figure 9-4. port 3 data 0x03h (read/write) ................................................................................... ........ 17 figure 9-5. dac port data 0x30h (read/write) ................................................................................. ..... 17 figure 9-6. port 0 interrupt enable 0x04h (write only) ....................................................................... ... 17 figure 9-7. port 1 interrupt enable 0x05h (write only) ....................................................................... ... 17 figure 9-8. port 2 interrupt enable 0x06h (write only) ....................................................................... ... 17 figure 9-9. port 3 interrupt enable 0x07h (write only) ....................................................................... ... 17 figure 10-1. block diagram of dac port ....................................................................................... ....... 19 figure 10-2. dac port data 0x30h (read/write) ................................................................................ .... 19 figure 10-3. dac port interrupt enable 0x31h (write only) .................................................................. 19 figure 10-4. dac port interrupt polarity 0x32h (write only) ................................................................. 1 9 figure 10-5. dac port isink 0x38h to 0x3fh (write only) ..................................................................... 2 0 figure 11-1. usb status and control register 0x1fh .......................................................................... 2 1 figure 12-1. usb device address register 0x10h (read/write) ........................................................... 21 figure 12-2. usb device counter registers 0x11h, 0x13h, 0x15h (read/write) .................................. 22 figure 13-1. timer block diagram ............................................................................................. ........... 23 figure 15-1. usb end point interrupt enable register 0x21h (read/write) .......................................... 24 figure 19-1. clock timing .................................................................................................... ................. 32 figure 19-2. usb data signal timing .......................................................................................... ......... 32 figure 19-3. receiver jitter tolerance ....................................................................................... .......... 32 figure 19-4. differential to eop transition skew and eop width ....................................................... 33 figure 19-5. differential data jitter ........................................................................................ ............... 33 list of tables table 6-1. i/o register summary .............................................................................................. .......... 14 table 15-1. interrupt vector assignments ..................................................................................... ...... 24 table 16-1. usb register mode encoding ....................................................................................... ... 26 table 16-2. decode table for table 16-3 : ? details of modes for differing traffic conditions ? .............. 27 table 16-3. details of modes for differing traffic conditions .............................................................. 28 cy7c63411/12/13 cy7c63511/12/13 cy7c63612/13 for for document #: 38-08027 rev. ** page 5 of 36 1.0 features ? low-cost solution for low-speed applications such as mice, gamepads, keyboards, joystick and others usb specification compliance ? conforms to usb specification, versions 1.1 and 2.0 ? conforms to usb hid specification, version 1.1 ? supports 1 device address and 3 data endpoints ? integrated usb transceiver 8-bit risc microcontroller ? harvard architecture ? 6-mhz external ceramic resonator ? 12-mhz internal cpu clock internal memory ? 256 bytes of ram ? 4 kbytes of eprom (cy7c63411, cy7c63511) ? 6 kbytes of eprom (cy7c63412, cy7c63512, cy7c63612) ? 8 kbytes of eprom (cy7c63413, cy7c63513, cy7c63613) interface can auto-configure to operate as ps2 or usb i/o port ? the cy7634xx/5xx have 24 general purpose i/o (gpio) pins (port 0 to 2) capable of sinking 7 ma per pin (typical) ? the cy7c636xx have 12 general-purpose i/o (gpio) pins (port 0 to 2) capable of sinking 7 ma per pin (typical) ? the cy7c634xx/5xx have eight gpio pins (port 3) capable of sinking 12 ma per pin (typical) which can drive leds ? the cy7c636xx have four gpio pins (port 3) capable of sinking 12 ma per pin (typical) which can drive leds ? higher current drive is available by connecting multiple gpio pins together to drive a common output ? each gpio port can be configured as inputs with internal pull-ups or open drain outputs or traditional cmos outputs ? the cy7c635xx has an additional eight i/o pins on a dac port which has programmable current sink outputs ? maskable interrupts on all i/o pins 12-bit free-running timer with one microsecond clock ticks watch dog timer (wdt) internal power-on reset (por) improved output drivers to reduce emi operating voltage from 4.0v to 5.5v dc operating temperature from 0 to 70 degrees celsius cy7c634xx available in 40-pin pdip, 48-pin ssop for production cy7c635xx available in 48-pin ssop packages for production cy7c636xx available in 24-pin soic packages for production industry-standard programmer support cy7c63411/12/13 cy7c63511/12/13 cy7c63612/13 for for document #: 38-08027 rev. ** page 6 of 36 2.0 functional overview the cy7c634xx/5xx/6xx are 8-bit risc one time programmable (otp) microcontrollers. the instruction set has been opti- mized specifically for usb operations although, the microcontrollers can be used for a variety of non-usb embedded applications . the cy7c634xx/5xx feature 32 general-purpose i/o (gpio) pins and the cy7c636xx features 16 general-purpose i/o (gpio) pins to support usb and other applications. the i/o pins are grouped into four ports (port 0, 1, 2, and 3) where each po rt can be configured as inputs with internal pull-ups, open drain outputs, or traditional cmos outputs. the cyc634xx/5xx have 24 gpio pins (ports 0, 1, and 2) and the cy7c636xx has 12 gpio pins (ports 0 and 1) that are rated at 7 ma typical sink current . the cyc634xx/5xx has 8 gpio pins (port 3) and the cy7c636xx has 4 gpio pins (port 3) which are rated at 12 ma typical sink current, which allows these pins to drive leds. multiple gpio pins can be connected together to drive a single output for more drive current capacity. additionally, each i/o pin can be used to generate a gpio interrupt to the microcontroller. note t he gpio interrupts all share the same ? gpio ? interrupt vector. the cy7c635xx features an additional 8 i/o pins in the dac port. every dac pin includes an integrated 14-kohm pull-up resistor. when a ? 1 ? is written to a dac i/o pin, the output current sink is disabled and the output pin is driven high by the internal pull-up resistor. when a ? 0 ? is written to a dac i/o pin, the internal pull-up is disabled and the output pin provides the programmed amount of sink current. a dac i/o pin can be used as an input with an internal pull-up by writing a ? 1 ? to the pin. the sink current for each dac i/o pin can be individually programmed to one of sixteen values using dedicated isink registers. dac bits [1:0] can be used as high current outputs with a programmable sink current range of 3.2 to 16 ma (typical). dac bits [7:2] have a programmable current sink range of 0.2 to 1.0 ma (typical). again, multiple dac pins can be connected together to drive a single output that requires more sink current capacity. each i/o pin can be used to generate a dac interrupt to the microcontroller and the interrupt polarity for each dac i/o pin is individually programmable. the dac port interrupts share a separate ? dac ? interrupt vector. the cypress microcontrollers use an external 6-mhz ceramic resonator to provide a reference to an internal clock generator. thi s clock generator reduces the clock-related noise emissions (emi). the clock generator provides the 6- and 12-mhz clocks that remain internal to the microcontroller. the cy7c64xx/5xx/6xx are offered with multiple eprom options to maximize flexibility and minimize cost. the cy7c63411 and the cy7c63511 have 4 kilobytes of eprom. the cy7c63412, cy7c63512, and cy7c63612 have 6 kbytes of eprom. the cy7c63413, cy7c63513, and cy7c63613 have 8 kbytes of eprom. these parts include power-on reset logic, a watch dog timer, a vectored interrupt controller, and a 12-bit free-running timer. the power-on reset (por) logic detects when power is applied to the device, resets the logic to a known state, and begins executing instructions at eprom address 0x0000h. the watch dog timer can be used to ensure the firmware never gets stalled for more than approximately 8 ms. the firmware can get stalled for a variety of reasons, including errors in the code or a hard ware failure such as waiting for an interrupt that never occurs. the firmware should clear the watch dog timer periodically. if the watch dog timer is not cleared for approximately 8 ms, the microcontroller will generate a hardware watch dog reset. the microcontroller supports eight maskable interrupts in the vectored interrupt controller. interrupt sources include the usb bus- reset, the 128- s and 1.024-ms outputs from the free-running timer, three usb endpoints, the dac port, and the gpio ports. the timer bits cause an interrupt (if enabled) when the bit toggles from low ? 0 ? to high ? 1. ? the usb endpoints interrupt after either the usb host or the usb controller sends a packet to the usb. the dac ports have an additional level of masking that allows the user to select which dac inputs can cause a dac interrupt. the gpio ports also have a level of masking to select which gpio inputs can cause a gpio interrupt. for additional flexibility, the input transition polarity that causes an interrup t is programmable for each pin of the dac port. input transition polarity can be programmed for each gpio port as part of the port configuration. the interrupt polarity can be either rising edge ( ? 0 ? to ? 1 ? ) or falling edge ( ? 1 ? to ? 0 ? ). the free-running 12-bit timer clocked at 1 mhz provides two interrupt sources as noted above (128- s and 1.024-ms). the timer can be used to measure the duration of an event under firmware control by reading the timer twice: once at the start of the eve nt, and once after the event is complete. the difference between the two readings indicates the duration of the event measured in microseconds. the upper four bits of the timer are latched into an internal register when the firmware reads the lower eight bi ts. a read from the upper four bits actually reads data from the internal register, instead of the timer. this feature eliminates t he need for firmware to attempt to compensate if the upper four bits happened to increment right after the lower 8 bits are read. the cy7c634xx/5xx/6xx include an integrated usb serial interface engine (sie) that supports the integrated peripherals. the hardware supports one usb device address with three endpoints. the sie allows the usb host to communicate with the function integrated into the microcontroller. finally, the cy7c634xx/5xx/6xx support ps/2 operation. with appropriate firmware the d+ and d ? usb pins can also be used as ps/2 clock and data signals. products utilizing these devices can be used for usb and/or ps/2 operation with appropriate firmware. cy7c63411/12/13 cy7c63511/12/13 cy7c63612/13 for for document #: 38-08027 rev. ** page 7 of 36 . note: 1. cy7c63612/13 is not bonded out for all gpio pins shown in logic block diagram. refer to pin configuration diagram for bonded out pins. see note on page 17 for firmware code needed for unused gpio pins. logic block diagram interrupt controller eprom 12-bit timer reset watch dog timer power-on gpio port 1 gpio port 0 p0[0] p0[7] p1[0] p1[7] 8-bit bus 6-mhz ceramic resonator ram usb sie usb transceiver d+ d ? usb gpio port 3 gpio port 2 p2[0] p2[7] p3[0] p3[7] dac port dac[0] dac[7] high current outputs 256 byte 4/6/8 kbyte osc 6 mhz 12-mhz 8-bit cpu 12 mhz pin configuration ps/2 port cy7c63612/13 1 2 3 4 5 6 7 9 11 12 d ? 10 8 15 14 13 17 16 19 18 21 20 23 22 24 v cc v ss p3[6] p3[4] p1[2] p1[0] p0[6] p0[4] p3[7] p3[5] p1[3] p1[1] p0[7] p0[5] p0[3] p0[1] v pp vss d+ p0[2] p0[0] xtal out xtal in 24-pin soic top view see note 1 cy7c63411/12/13 1 2 3 4 5 6 7 9 11 12 13 14 15 16 18 17 d ? 10 8 19 20 31 30 29 33 32 35 34 37 36 39 38 40 25 27 26 28 v cc v ss p3[6] p3[4] p3[2] p3[0] p2[6] p2[4] p3[7] p3[5] p3[3] p3[1] p2[7] p2[5] p2[3] p2[1] p1[7] p1[5] p1[3] p1[1] p0[7] p0[5] p0[3] p0[1] v pp vss d+ p2[2] p2[0] p1[6] p1[4] p1[2] p1[0] p0[6] p0[4] p0[2] p0[0] xtal out xtal in 40-pin pdip 48-pin ssop top view 1 2 3 4 5 6 7 9 11 12 13 14 15 16 18 17 d ? 10 8 19 20 31 30 29 33 32 35 34 37 36 39 38 41 40 43 42 45 44 46 48 47 21 22 23 24 25 27 26 28 v cc vss p3[6] p3[4] p3[2] p3[0] p2[6] p2[4] p3[7] p3[5] p3[3] p3[1] p2[7] p2[5] p2[3] p2[1] p1[7] p1[5] p1[3] p1[1] nc nc p0[7] p0[5] p0[3] p0[1] nc nc v pp vss d+ p2[2] p2[0] p1[6] p1[4] p1[2] p1[0] nc nc p0[6] p0[4] p0[2] p0[0] nc nc xtal out xtal in 48-pin ssop 1 2 3 4 5 6 7 9 11 12 13 14 15 16 18 17 d ? 10 8 19 20 31 30 29 33 32 35 34 37 36 39 38 41 40 43 42 45 44 46 48 47 21 22 23 24 25 27 26 28 v cc vss p3[6] p3[4] p3[2] p3[0] p2[6] p2[4] p3[7] p3[5] p3[3] p3[1] p2[7] p2[5] p2[3] p2[1] p1[7] p1[5] p1[3] p1[1] dac[7] dac[5] p0[7] p0[5] p0[3] p0[1] dac[3] dac[1] v pp vss d+ p2[2] p2[0] p1[6] p1[4] p1[2] p1[0] dac[6] dac[4] p0[6] p0[4] p0[2] p0[0] dac[2] dac[0] xtal out xtal in 21 23 22 24 40-pin cerdip 48-pin sidebraze 48-pin sidebraze top view cy7c63411/12/13 cy7c63511/12/13 cy7c63612/13 for for document #: 38-08027 rev. ** page 8 of 36 4.0 programming model 4.1 14-bit program counter (pc) the 14-bit program counter (pc) allows access for up to 8 kilobytes of eprom using the cy7c634xx/5xx/6xx architecture. the program counter is cleared during reset, such that the first instruction executed after a reset is at address 0x0000h. this is typically a jump instruction to a reset handler that initializes the application. the lower eight bits of the program counter are incremented as instructions are loaded and executed. the upper six bits of the program counter are incremented by executing an xpage instruction. as a result, the last instruction executed within a 256-byte ? page ? of sequential code should be an xpage instruction. the assembler directive ? xpageon ? will cause the assembler to insert xpage instructions automatically. as instructions can be either one or two bytes long, the assembler may occasionally need to insert a nop followed by an xpage for correct execution. the program counter of the next instruction to be executed, carry flag, and zero flag are saved as two bytes on the program sta ck during an interrupt acknowledge or a call instruction. the program counter, carry flag, and zero flag are restored from the program stack only during a reti instruction. please note the program counter cannot be accessed directly by the firmware. the program stack can be examined by reading sram from location 0x00 and up. 4.2 8-bit accumulator (a) the accumulator is the general purpose, do everything register in the architecture where results are usually calculated. 4.3 8-bit index register (x) the index register ? x ? is available to the firmware as an auxiliary accumulator. the x register also allows the processor to perform indexed operations by loading an index value into x. 3.0 pin assignments name i/o cy7c63411/12/13 cy7c635 11/12/13 cy7c636 12/13 description 40-pin 48-pin 48-pin 24-pin d+, d ? i/o 1,2 1,2 1,2 1,2 usb differential data; ps/2 clock and data signals p0[7:0] i/o 15,26,16, 25,17,24, 18,23 17,32,18, 31,19,30, 20,29 17,32,18, 31,19,30, 20,29 7,18,8, 17,9,16, 10,15 gpio port 0 capable of sinking 7 ma (typical) p1[3:0] i/o 11,30,12, 29,13,28, 14,27 11,38,12, 37,13,36, 14,35 11,38,12, 37,13,36, 14,35 5,20,6, 19 gpio port 1 capable of sinking 7 ma (typical). p1[7:4] not bonded out on cy7c63612/13. see note on page 17 for firmware code needed for unused pins. p2 i/o 7,34,8, 33,9,32, 10,31 7,42,8, 41,9,40, 10,39 7,42,8, 41,9,40, 10,39 n/a gpio port 2 not bonded out on cy7c63612/13. see note on page 17 for firmware code needed for unused pins. p3[7:4] i/o 3,38,4, 37,5,36, 6,35 3,46,4, 45,5,44, 6,43 3,46,4, 45,5,44, 6,43 3,22,4, 21 gpio port 3 capable of sinking 12 ma (typical). p3[3:0] not bonded out on cy7c63612/13. see note on page 17 for firmware code needed for unused pins. dac i/o n/a n/a 15,34,16, 33,21,28, 22,27 n/a dac i/o port with programmable current sink outputs. dac[1:0] offer a programmable range of 3.2 to 16 ma typical. dac[7:2] have a programmable sink current range of 0.2 to 1.0 ma typical. dac i/o port not bonded out on cy7c63612/13. see note on page 17 for firmware code needed for unused pins. xtal in in 21 25 25 13 6-mhz ceramic resonator or external clock input xtal out out 22 26 26 14 6-mhz ceramic resonator v pp 19 23 23 11 programming voltage supply, ground during operation v cc 40 48 48 24 voltage supply vss 20,39 24,47 24,47 12,23 ground cy7c63411/12/13 cy7c63511/12/13 cy7c63612/13 for for document #: 38-08027 rev. ** page 9 of 36 4.4 8-bit program stack pointer (psp) during a reset, the program stack pointer (psp) is set to zero. this means the program ? stack ? starts at ram address 0x00 and ? grows ? upward from there. note the program stack pointer is directly addressable under firmware control, using the mov psp,a instruction. the psp supports interrupt service under hardware control and call, ret, and reti instructions under firmware control. during an interrupt acknowledge, interrupts are disabled and the 14-bit program counter, carry flag, and zero flag are written as two bytes of data memory. the first byte is stored in the memory addressed by the program stack pointer, then the psp is incremented. the second byte is stored in memory addressed by the program stack pointer and the psp is incremented again. the net effect is to store the program counter and flags on the program ? stack ? and increment the program stack pointer by two. the return from interrupt (reti) instruction decrements the program stack pointer, then restores the second byte from memory addressed by the psp. the program stack pointer is decremented again and the first byte is restored from memory addressed by the psp. after the program counter and flags have been restored from stack, the interrupts are enabled. the effect is to res tore the program counter and flags from the program stack, decrement the program stack pointer by two, and re-enable interrupts. the call subroutine (call) instruction stores the program counter and flags on the program stack and increments the psp by two. the return from subroutine (ret) instruction restores the program counter, but not the flags, from program stack and decre- ments the psp by two. 4.5 8-bit data stack pointer (dsp) the data stack pointer (dsp) supports push and pop instructions that use the data stack for temporary storage. a push instruction will pre-decrement the dsp, then write data to the memory location addressed by the dsp. a pop instruction will rea d data from the memory location addressed by the dsp, then post-increment the dsp. during a reset, the data stack pointer will be set to zero. a push instruction when dsp equal zero will write data at the top o f the data ram (address 0xff). this would write data to the memory area reserved for a fifo for usb endpoint 0. in non-usb applications, this works fine and is not a problem. for usb applications, it is strongly recommended that the dsp is loaded aft er reset just below the usb dma buffers. 4.6 address modes the cy7c63612/13 microcontrollers support three addressing modes for instructions that require data operands: data, direct, and indexed. 4.6.1 data the ? data ? address mode refers to a data operand that is actually a constant encoded in the instruction. as an example, consider the instruction that loads a with the constant 0xe8h: mov a,0e8h this instruction will require two bytes of code where the first byte identifies the ? mov a ? instruction with a data operand as the second byte. the second byte of the instruction will be the constant ? 0xe8h ? . a constant may be referred to by name if a prior ? equ ? statement assigns the constant value to the name. for example, the following code is equivalent to the example shown above: dspinit: equ 0e8h mov a,dspinit 4.6.2 direct ? direct ? address mode is used when the data operand is a variable stored in sram. in that case, the one byte address of the variable is encoded in the instruction. as an example, consider an instruction that loads a with the contents of memory address location 0x10h: mov a, [10h] in normal usage, variable names are assigned to variable addresses using ? equ ? statements to improve the readability of the assembler source code. as an example, the following code is equivalent to the example shown above: buttons: equ 10h mov a,[buttons] 4.6.3 indexed ? indexed ? address mode allows the firmware to manipulate arrays of data stored in sram. the address of the data operand is the sum of a constant encoded in the instruction and the contents of the ? x ? register. in normal usage, the constant will be the ? base ? address of an array of data and the x register will contain an index that indicates which element of the array is actually addressed: cy7c63411/12/13 cy7c63511/12/13 cy7c63612/13 for for document #: 38-08027 rev. ** page 10 of 36 array: equ 10h mov x,3 mov a,[x+array] this would have the effect of loading a with the fourth element of the sram ? array ? that begins at address 0x10h. the fourth element would be at address 0x13h. cy7c63411/12/13 cy7c63511/12/13 cy7c63612/13 for for document #: 38-08027 rev. ** page 11 of 36 5.0 instruction set summary mnemonic operand opcode cycles mnemonic operand opcode cycles halt 00 7 nop 20 4 add a,expr data 01 4 inc a acc 21 4 add a,[expr] direct 02 6 inc x x 22 4 add a,[x+expr] index 03 7 inc [expr] direct 23 7 adc a,expr data 04 4 inc [x+expr] index 24 8 adc a,[expr] direct 05 6 dec a acc 25 4 adc a,[x+expr] index 06 7 dec x x 26 4 sub a,expr data 07 4 dec [expr] direct 27 7 sub a,[expr] direct 08 6 dec [x+expr] index 28 8 sub a,[x+expr] index 09 7 iord expr address 29 5 sbb a,expr data 0a 4 iowr expr address 2a 5 sbb a,[expr] direct 0b 6 pop a 2b 4 sbb a,[x+expr] index 0c 7 pop x 2c 4 or a,expr data 0d 4 push a 2d 5 or a,[expr] direct 0e 6 push x 2e 5 or a,[x+expr] index 0f 7 swap a,x 2f 5 and a,expr data 10 4 swap a,dsp 30 5 and a,[expr] direct 11 6 mov [expr],a direct 31 5 and a,[x+expr] index 12 7 mov [x+expr],a index 32 6 xor a,expr data 13 4 or [expr],a direct 33 7 xor a,[expr] direct 14 6 or [x+expr],a index 34 8 xor a,[x+expr] index 15 7 and [expr],a direct 35 7 cmp a,expr data 16 5 and [x+expr],a index 36 8 cmp a,[expr] direct 17 7 xor [expr],a direct 37 7 cmp a,[x+expr] index 18 8 xor [x+expr],a index 38 8 mov a,expr data 19 4 iowx [x+expr] index 39 6 mov a,[expr] direct 1a 5 cpl 3a 4 mov a,[x+expr] index 1b 6 asl 3b 4 mov x,expr data 1c 4 asr 3c 4 mov x,[expr] direct 1d 5 rlc 3d 4 reserved 1e rrc 3e 4 xpage 1f 4 ret 3f 8 mov a,x 40 4 di 70 4 mov x,a 41 4 ei 72 4 mov psp,a 60 4 reti 73 8 call addr 50-5f 10 jmp addr 80-8f 5 jc addr c0-cf 5 call addr 90-9f 10 jnc addr d0-df 5 jz addr a0-af 5 jacc addr e0-ef 7 jnz addr b0-bf 5 index addr f0-ff 14 cy7c63411/12/13 cy7c63511/12/13 cy7c63612/13 for for document #: 38-08027 rev. ** page 12 of 36 6.0 memory organization 6.1 program memory organization after reset address 14-bit pc 0x0000 program execution begins here after a reset 0x0002 usb bus reset interrupt vector 0x0004 128- s timer interrupt vector 0x0006 1.024-ms timer interrupt vector 0x0008 usb address a endpoint 0 interrupt vector 0x000a usb address a endpoint 1 interrupt vector 0x000c usb address a endpoint 2 interrupt vector 0x000e reserved 0x0010 reserved 0x0012 reserved 0x0014 dac interrupt vector 0x0016 gpio interrupt vector 0x0018 reserved 0x001a program memory begins here 0x0fff 0x17ff 6-kb prom ends here (cy7c63612) (8k - 32 bytes) 0x1fdf 8-kb prom ends here (cy7c63613) figure 6-1. program memory space with interrupt vector table cy7c63411/12/13 cy7c63511/12/13 cy7c63612/13 for for document #: 38-08027 rev. ** page 13 of 36 6.2 data memory organization the cy7c63612/13 microcontrollers provide 256 bytes of data ram. in normal usage, the sram is partitioned into four areas: program stack, data stack, user variables and usb endpoint fifos as shown below: after reset address 8-bit psp 0x00 program stack begins here and grows upward 8-bit dsp user data stack begins here and grows downward the user determines the amount of memory required user variables 0xe8 usb fifo for address a endpoint 2 0xf0 usb fifo for address a endpoint 1 0xf8 usb fifo for address a endpoint 0 top of ram memory 0xff cy7c63411/12/13 cy7c63511/12/13 cy7c63612/13 for for document #: 38-08027 rev. ** page 14 of 36 6.3 i/o register summary i/o registers are accessed via the i/o read (iord) and i/o write (iowr, iowx) instructions. iord reads the selected port into the accumulator. iowr writes data from the accumulator to the selected port. indexed i/o write (iowx) adds the contents of x to the address in the instruction to form the port address and writes data from the accumulator to the specified port. note tha t specifying address 0 (e.g., iowx 0h) means the i/o port is selected solely by the contents of x. table 6-1. i/o register summary register name i/o address read/write function port 0 data 0x00 r/w gpio port 0 port 1 data 0x01 r/w gpio port 1 port 2 data 0x02 r/w gpio port 2 port 3 data 0x03 r/w gpio port 3 port 0 interrupt enable 0x04 w interrupt enable for pins in port 0 port 1 interrupt enable 0x05 w interrupt enable for pins in port 1 port 2 interrupt enable 0x06 w interrupt enable for pins in port 2 port 3 interrupt enable 0x07 w interrupt enable for pins in port 3 gpio configuration 0x08 r/w gpio ports configurations usb device address a 0x10 r/w usb device address a ep a0 counter register 0x11 r/w usb address a, endpoint 0 counter register ep a0 mode register 0x12 r/w usb address a, endpoint 0 configuration register ep a1 counter register 0x13 r/w usb address a, endpoint 1 counter register ep a1 mode register 0x14 r/c usb address a, endpoint 1 configuration register ep a2 counter register 0x15 r/w usb address a, endpoint 2 counter register ep a2 mode register 0x16 r/c usb address a, endpoint 2 configuration register usb status & control 0x1f r/w usb upstream port traffic status and control register global interrupt enable 0x20 r/w global interrupt enable register endpoint interrupt enable 0x21 r/w usb endpoint interrupt enables timer (lsb) 0x24 r lower eight bits of free-running timer (1 mhz) timer (msb) 0x25 r upper four bits of free-running timer that are latched when the lower eight bits are read. wdr clear 0x26 w watch dog reset clear dac data 0x30 r/w dac i/o [2] dac interrupt enable 0x31 w interrupt enable for each dac pin [2] dac interrupt polarity 0x32 w interrupt polarity for each dac pin [2] dac isink 0x38-0x3f w one four bit sink current register for each dac pin [2] processor status & control 0xff r/w microprocessor status and control note: 2. dac i/o port not bonded out on cy7c63612/13. see note on page 17 for firmware code needed for unused gpio pins. cy7c63411/12/13 cy7c63511/12/13 cy7c63612/13 for for document #: 38-08027 rev. ** page 15 of 36 7.0 clocking the xtal in and xtal out are the clock pins to the microcontroller. the user can connect a low-cost ceramic resonator or an external oscillator can be connected to these pins to provide a reference frequency for the internal clock distribution and clo ck doubler. an external 6 mhz clock can be applied to the xtal in pin if the xtal out pin is left open. please note that grounding the xtal out pin is not permissible as the internal clock is effectively shorted to ground. 8.0 reset the usb controller supports three types of resets. all registers are restored to their default states during a reset. the usb d evice addresses are set to 0 and all interrupts are disabled. in addition, the program stack pointer (psp) and data stack pointer (ds p) are set to 0x00. for usb applications, the firmware should set the dsp below 0xe8h to avoid a memory conflict with ram dedicated to usb fifos. the assembly instructions to do this are shown below: mov a, e8h ; move 0xe8 hex into accumulator swap a,dsp ; swap accumulator value into dsp register the three reset types are: 1. power-on reset (por) 2. watch dog reset (wdr) 3. usb bus reset (non hardware reset) the occurrence of a reset is recorded in the processor status and control register located at i/o address 0xff. bits 4, 5, and 6 are used to record the occurrence of por, usb reset, and wdr respectively. the firmware can interrogate these bits to determine the cause of a reset. the microcontroller begins execution from rom address 0x0000h after a por or wdr reset. although this looks like interrupt vector 0, there is an important difference. reset processing does not push the program counter, carry flag, and zero flag onto program stack. that means the reset handler in firmware should initialize the hardware and begin executing the ? main ? loop of code. attempting to execute either a ret or reti in the reset handler will cause unpredictable execution results. 8.1 power-on reset (por) power-on reset (por) occurs every time the v cc voltage to the device ramps from 0v to an internally defined trip voltage (vrst) of approximately 1/2 full supply voltage. in addition to the normal reset initialization noted under ? reset, ? bit 4 (pors) of the processor status and control register is set to ? 1 ? to indicate to the firmware that a power-on reset occurred. the por event forces the gpio ports into input mode (high impedance), and the state of port 3 bit 7 is used to control how the part will resp ond after the por releases. if port 3 bit 7 is high (pulled to v cc ) and the usb io are at the idle state (dm high and dp low) the part will go into a semi- permanent power down/suspend mode, waiting for the usb io to go to one of bus reset, k (resume) or se0. if port 3 bit 7 is still high when the part comes out of suspend, then a 128- s timer starts, delaying cpu operation until the ceramic resonator has stabilized. if port 3 bit 7 was low (pulled to v ss ) the part will start a 96-ms timer, delaying cpu operation until v cc has stabilized, then continuing to run as reset. firmware should clear the por status (pors) bit in register ffh before going into suspend as this status bit selects the 128- s or 96-ms start-up timer value as follows: if port 3 bit 7 is high then 128- s is always used; else if pors is high then 128-ms is used; else 128- s is used. figure 7-1. clock oscillator on-chip circuit xtalout xtalin clock distribution clk2x clock doubler clk1x (to microcontroller) (to usb sie) 30 pf 30 pf cy7c63411/12/13 cy7c63511/12/13 cy7c63612/13 for for document #: 38-08027 rev. ** page 16 of 36 8.2 watch dog reset (wdr) the watch dog timer reset (wdr) occurs when the most significant bit (msb) of the 2-bit watch dog timer register transitions from low to high. in addition to the normal reset initialization noted under ? reset, ? bit 6 of the processor status and control register is set to ? 1 ? to indicate to the firmware that a watch dog reset occurred. figure 8-1. watch dog reset (wdr) the watch dog timer is a 2-bit timer clocked by a 4.096-ms clock (bit 11) from the free-running timer. writing any value to the write-only watch dog clear i/o port (0x26h) will clear the watch dog timer. in some applications, the watch dog timer may be cleared in the 1.024-ms timer interrupt service routine. if the 1.024-ms timer interrupt service routine does not get executed for 8.192 ms or more, a watch dog timer reset will occur. a watch dog timer reset lasts for 2.048 ms after which the microcontroller begins execution at rom address 0x0000h. the usb transmitter is disabled by a watch dog reset because the usb device address register is cleared. otherwise, the usb controller would respond to all address 0 transactions. the usb transmitter remains disabled until the msb of the usb address register is set. 9.0 general purpose i/o ports ports 0 to 2 provide 24 gpio pins that can be read or written. each port (8 bits) can be configured as inputs with internal pul l- ups, open drain outputs, or traditional cmos outputs. please note an open drain output is also a high-impedance (no pull-up) input. all of the i/o pins within a given port have the same configuration. ports 0 to 2 are considered low current drive with typical current sink capability of 7 ma. the internal pull-up resistors are typically 7 k ? . two factors govern the enabling and disabling of the internal pull-up resistors: the port configuration selected in the gpio configuration register and the state of the output data bit. if the gpio configuration selected is ? resistive ? and the output data bit is ? 1, ? then the internal pull-up resistor is enabled for that gpio pin. otherwise, q1 is turned off and the 7-k ? pull-up is disabled. q2 is ? on ? to sink current whenever the output data bit is written as a ? 0. ? q3 figure 9-1. block diagram of a gpio line at least 8.192 ms wdr goes high execution begins at reset vector 0x00 8.192 ms 2.048 ms since last write to wdt for 2.048 ms to 14.336 ms gpio pin v cc 7 k ? esd gpio cfg mode 2 bits data out latch internal data bus port read port write interrupt enable control control to interrupt controller q1 q2 q3 internal buffer cy7c63411/12/13 cy7c63511/12/13 cy7c63612/13 for for document #: 38-08027 rev. ** page 17 of 36 provides ? high ? source current when the gpio port is configured for cmos outputs and the output data bit is written as a ? 1 ? . q2 and q3 are sized to sink and source, respectively, roughly the same amount of current to support traditional cmos outputs with symmetric drive. port 3 has eight gpio pins. port 3 (8 bits) can be configured as inputs with internal pull-ups, open drain outputs, or traditio nal cmos outputs. an open drain output is also a high-impedance input. port 3 offers high current drive with a typical current sink capability of 12 ma. the internal pull-up resistors are typically 7 k ? . note: special care should be exercised with any unused gpio data bits. an unused gpio data bit, either a pin on the chip or a port bit that is not bonded on a particular package, must not be left floating when the device enters the suspend state. if a g pio data bit is left floating, the leakage current caused by the floating bit may violate the suspend current limitation specified by the usb specification. if a ? 1 ? is written to the unused data bit and the port is configured with open drain outputs, the unused data bit will be in an indeterminate state. therefore, if an unused port bit is programmed in open-drain mode, it must be written with a ? 0. ? notice that the cy7c63612/13 will always require that data bits p1[7:4], p2[7:0], p3[3:0] and dac[7:0] be written with a ? 0. ? during reset, all of the gpio pins are set to output ? 1 ? (input) with the internal pull-up enabled. in this state, a ? 1 ? will always be read on that gpio pin unless an external current sink drives the output to a ? 0 ? state. writing a ? 0 ? to a gpio pin enables the output current sink to ground (low) and disables the internal pull-up for that pin. 9.1 gpio interrupt enable ports during a reset, gpio interrupts are disabled by clearing all of the gpio interrupt enable ports. writing a ? 1 ? to a gpio interrupt enable bit enables gpio interrupts from the corresponding input pin. p0[7] p0[6] p0[5] p0[4] p0[3] p0[2] p0[1] p0[0] p1[7] p1[6] p1[5] p1[4] p1[3] p1[2] p1[1] p1[0] figure 9-2. port 1 data 0x01h (read/write) p2[7] p2[6] p2[5] p2[4] p2[3] p2[2] p2[1] p2[0] figure 9-3. port 2 data 0x02h (read/write) p3[7] p3[6] p3[5] p3[4] p3[3] p3[2] p3[1] p3[0] figure 9-4. port 3 data 0x03h (read/write) low current outputs 0.2 ma to 1.0 ma typical high current outputs 3.2 ma to 16 ma typical dac[7] dac[6] dac[5] dac[4] dac[3] dac[2] dac[1] dac[0] figure 9-5. dac port data 0x30h (read/write) p0[7] p0[6] p0[5] p0[4] p0[3] p0[2] p0[1] p0[0] figure 9-6. port 0 interrupt enable 0x04h (write only) p1[7] p1[6] p1[5] p1[4] p1[3] p1[2] p1[1] p1[0] figure 9-7. port 1 interrupt enable 0x05h (write only) p2[7] p2[6] p2[5] p2[4] p2[3] p2[2] p2[1] p2[0] figure 9-8. port 2 interrupt enable 0x06h (write only) p3[7] p3[6] p3[5] p3[4] p3[3] p3[2] p3[1] p3[0] figure 9-9. port 3 interrupt enable 0x07h (write only) cy7c63411/12/13 cy7c63511/12/13 cy7c63612/13 for for document #: 38-08027 rev. ** page 18 of 36 9.2 gpio configuration port every gpio port can be programmed as inputs with internal pull-ups, open drain outputs, and traditional cmos outputs. in ad- dition, the interrupt polarity for each port can be programmed. with positive interrupt polarity, a rising edge ( ? 0 ? to ? 1 ? ) on an input pin causes an interrupt. with negative polarity, a falling edge ( ? 1 ? to ? 0 ? ) on an input pin causes an interrupt. as shown in the table below, when a gpio port is configured with cmos outputs, interrupts from that port are disabled. the gpio configuration port register provides two bits per port to program these features. the possible port configurations are: in ? resistive ? mode, a 7-k ? pull-up resistor is conditionally enabled for all pins of a gpio port. the resistor is enabled for any pin that has been written as a ? 1. ? the resistor is disabled on any pin that has been written as a ? 0. ? an i/o pin will be driven high through a 7-k ? pull-up resistor when a ? 1 ? has been written to the pin. or the output pin will be driven low, with the pull-up dis- abled, when a ? 0 ? has been written to the pin. an i/o pin that has been written as a ? 1 ? can be used as an input pin with an inte- grated 7-k ? pull-up resistor. resistive mode selects a negative (falling edge) interrupt polarity on all pins that have the gpio interrupt enabled. in ? cmos ? mode, all pins of the gpio port are outputs that are actively driven. the current source and sink capacity are roughly the same (symmetric output drive). a cmos port is not a possible source for interrupts. a port configured in cmos mode has interrupt generation disabled, yet the interrupt mask bits serve to control port direction. if a port ? s associated interrupt mask bits are cleared, those port bits are strictly outputs. if the interrupt mask bits are set then tho se bits will be open drain inputs. as open drain inputs, if their data output values are ? 1 ? those port pins will be cmos inputs (high z output). in ? open drain ? mode the internal pull-up resistor and cmos driver (high) are both disabled. an i/o pin that has been written as a ? 1 ? can be used as either a high-impedance input or a three-state output. an i/o pin that has been written as a ? 0 ? will drive the output low. the interrupt polarity for an open drain gpio port can be selected as either positive (rising edge) or negative (falling edge). during reset, all of the bits in the gpio configuration register are written with ? 0. ? this selects the default configuration: open drain output, positive interrupt polarity for all gpio ports. port configuration bits pin interrupt bit driver mode interrupt polarity 11 x resistive - 10 0 cmos output disabled 10 1 open drain disabled 01 x open drain - 00 x open drain + (default) 7 6 5 4 3 2 1 0 port 3 config bit 1 port 3 config bit 0 port 2 config bit 1 port 2 config bit 0 port 1 config bit 1 port 1 config bit 0 port 0 config bit 1 port 0 config bit 0 cy7c63411/12/13 cy7c63511/12/13 cy7c63612/13 for for document #: 38-08027 rev. ** page 19 of 36 10.0 dac port the dac port provides the cy7c63511/12/13 with 8 programmable current sink i/o pins. writing a ? 1 ? to a dac i/o pin disables the output current sink (isink dac) and drives the i/o pin high through an integrated 14 kohm resistor. when a ? 0 ? is written to a dac i/o pin, the isink dac is enabled and the pull-up resistor is disabled. a ? 0 ? output will cause the isink dac to sink current to drive the output low. the amount of sink current for the dac i/o pin is programmable over 16 values based on the contents of the dac isink register for that output pin. dac[1:0] are the two high current outputs that are programmable from a minimum of 3.2 ma to a maximum of 16 ma (typical). dac[7:2] are low current outputs that are programmable from a minimum of 0.2 ma to a maximum of 1.0 ma (typical). when a dac i/o bit is written as a ? 1, ? the i/o pin is either an output pulled high through the 14 kohm resistor or an input with an internal 14 kohm pull-up resistor. all dac port data bits are set to ? 1 ? during reset. 10.1 dac port interrupts a dac port interrupt can be enabled/disabled for each pin individually. the dac port interrupt enable register provides this fe ature with an interrupt mask bit for each dac i/o pin. writing a ? 1 ? to a bit in this register enables interrupts from the corresponding bit position. writing a ? 0 ? to a bit in the dac port interrupt enable register disables interrupts from the corresponding bit position. all of the dac port interrupt enable register bits are cleared to ? 0 ? during a reset. as an additional benefit, the interrupt polarity for each dac pin is programmable with the dac port interrupt polarity register . writing a ? 0 ? to a bit selects negative polarity (falling edge) that will cause an interrupt (if enabled) if a falling edge transition occur s on the corresponding input pin. writing a ? 1 ? to a bit in this register selects positive polarity (rising edge) that will cause an interrupt (if enabled) if a rising edge transition occurs on the corresponding input pin. all of the dac port interrupt polarity register bits are cleared during a reset. figure 10-1. block diagram of dac port low current outputs 0.2 ma to 1.0 ma typical high current outputs 3.2 ma to 16 ma typical dac[7] dac[6] dac[5] dac[4] dac[3] dac[2] dac[1] dac[0] figure 10-2. dac port data 0x30h (read/write) dac[7] dac[6] dac[5] dac[4] dac[3] dac[2] dac[1] dac[0] figure 10-3. dac port interrupt enable 0x31h (write only) dac[7] dac[6] dac[5] dac[4] dac[3] dac[2] dac[1] dac[0] figure 10-4. dac port interrupt polarity 0x32h (write only) v cc 14 k ? esd data out latch internal data bus dac read dac write interrupt enable interrupt logic to interrupt controller q1 internal buffer interrupt polarity isink dac isink register 4 bits dac i/o pin cy7c63411/12/13 cy7c63511/12/13 cy7c63612/13 for for document #: 38-08027 rev. ** page 20 of 36 10.2 dac isink registers each dac i/o pin has an associated dac isink register to program the output sink current when the output is driven low. the first isink register (0x38h) controls the current for dac[0], the second (0x39h) for dac[1], and so on until the isink register at 0x3fh controls the current to dac[7]. 11.0 usb serial interface engine (sie) the sie allows the microcontroller to communicate with the usb host. the sie simplifies the interface between the microcontroll er and usb by incorporating hardware that handles the following usb bus activity independently of the microcontroller: bit stuffing/unstuffing checksum generation/checking ack/nak token type identification address checking firmware is required to handle the rest of the usb interface with the following tasks: coordinate enumeration by responding to set-up packets fill and empty the fifos suspend/resume coordination verify and select data toggle values 11.1 usb enumeration the enumeration sequence is shown below: 1. the host computer sends a setup packet followed by a data packet to usb address 0 requesting the device descriptor. 2. the usb controller decodes the request and retrieves its device descriptor from the program memory space. 3. the host computer performs a control read sequence and the usb controller responds by sending the device descriptor over the usb bus. 4. after receiving the descriptor, the host computer sends a setup packet followed by a data packet to address 0 assigning a new usb address to the device. 5. the usb controller stores the new address in its usb device address register after the no-data control sequence is complete. 6. the host sends a request for the device descriptor using the new usb address. 7. the usb controller decodes the request and retrieves the device descriptor from the program memory. 8. the host performs a control read sequence and the usb controller responds by sending its device descriptor over the usb bus. 9. the host generates control reads to the usb controller to request the configuration and report descriptors. 10.the usb controller retrieves the descriptors from its program space and returns the data to the host over the usb. 11.2 ps/2 operation ps/2 operation is possible with the cy7c634xx/5xx/6xx series through the use of firmware and several operating modes. the first enabling feature: 1. usb bus reset on d+ and d ? is an interrupt that can be disabled; 2. usb traffic can be disabled via bit 7 of the usb register; 3. d+ and d ? can be monitored and driven via firmware as independent port bits. bits 5 and 4 of the upstream status and control register are directly connected to the d+ and d ? usb pins of the cy7c634xx/ 5xx/6xx. these pins constantly monitor the levels of these signals with cmos input thresholds. firmware can poll and decode these signals as ps/2 clock and data. bits [2:0] defaults to ? 000 ? at reset which allows the usb sie to control output on d+ and d ? . firmware can override the sie and directly control the state of these pins via these 3 control bits. since ps/2 is an open drain signaling protocol, these modes allow all 4 ps/2 states to be generated on the d+ and d ? pins reserved isink value isink[3] isink[2] isink[1] isink[0] figure 10-5. dac port isink 0x38h to 0x3fh (write only) cy7c63411/12/13 cy7c63511/12/13 cy7c63612/13 for for document #: 38-08027 rev. ** page 21 of 36 11.3 usb port status and control usb status and control is regulated by the usb status and control register located at i/o address 0x1fh as shown in figure 11-1 . this is a read/write register. all reserved bits must be written to zero. all bits in the register are cleared during reset. the bus activity bit is a ? sticky ? bit that indicates if any non-idle usb event has occurred on the usb bus. the user firmware should check and clear this bit periodically to detect any loss of bus activity. writing a ? 0 ? to the bus activity bit clears it while writing a ? 1 ? preserves the current value. in other words, the firmware can clear the bus activity bit, but only the sie can set it. the 1.024-ms timer interrupt service routine is normally used to check and clear the bus activity bit. the following table show s how the control bits are encoded for this register. 12.0 usb device usb device address a includes three endpoints: epa0, epa1, and epa2. end point 0 (epa0) allows the usb host to recognize, set up, and control the device. in particular, epa0 is used to receive and transmit control (including set-up) packets. 12.1 usb ports the usb controller provides one usb device address with three endpoints. the usb device address register contents are cleared during a reset, setting the usb device address to zero and marking this address as disabled. figure 12-1 shows the format of the usb address register. bit 7 (device address enable) in the usb device address register must be set by firmware before the serial interface engine (sie) will respond to usb traffic to this address. the device address in bits [6:0] must be set by firmware during the usb enu- meration process to an address assigned by the usb host that does not equal zero. this register is cleared by a hardware reset or the usb bus reset. 12.2 device endpoints (3) the usb controller communicates with the host using dedicated fifos, one per endpoint. each endpoint fifo is implemented as 8 bytes of dedicated sram. there are three endpoints defined for device ? a ? that are labeled ? epa0, ? ? epa1, ? and epa2. ? all usb devices are required to have an endpoint number 0 (epa0) that is used to initialize and control the usb device. end poi nt 0 provides access to the device configuration information and allows generic usb status and control accesses. end point 0 is bidirectional as the usb controller can both receive and transmit data. the endpoint mode registers are cleared during reset. the epa0 endpoint mode register uses the format shown below: 7 6 5 4 3 2 1 0 r r r/w r/w r/w r/w reserved reserved d+ d ? bus activity control bit 2 control bit 1 control bit 0 figure 11-1. usb status and control register 0x1fh control bits control action 000 not forcing (sie controls driver) 001 force k (d+ high, d ? low) 010 force j (d+ low, d ? high) 011 force se0 (d+ low, d ? low) 100 force se0 (d ? low, d+ low) 101 force d ? low, d+ hiz 110 force d ? hiz, d+ low 111 force d ? hiz, d+ hiz device address enable device address bit 6 device address bit 5 device address bit 4 device address bit 3 device address bit 2 device address bit 1 device address bit 0 figure 12-1. usb device address register 0x10h (read/write) cy7c63411/12/13 cy7c63511/12/13 cy7c63612/13 for for document #: 38-08027 rev. ** page 22 of 36 bits[7:5] in the endpoint 0 mode registers (epa0) are ? sticky ? status bits that are set by the sie to report the type of token that was most recently received. the sticky bits must be cleared by firmware as part of the usb processing. the endpoint mode registers for epa1 and epa2 do not use bits [7:5] as shown below: the ? acknowledge ? bit is set whenever the sie engages in a transaction that completes with an ? ack ? packet. the ? set-up ? pid status (bit[7]) is forced high from the start of the data packet phase of the set-up transaction, until the start of the ack packet returned by the sie. the cpu is prevented from clearing this bit during this interval, and subsequently until th e cpu first does an iord to this endpoint 0 mode register. bits[6:0] of the endpoint 0 mode register are locked from cpu iowr operations only if the sie has updated one of these bits, which the sie does only at the end of a packet transaction (set-up ... data ... ack, or out ... data ... ack, or in ... data .. . ack). the cpu can unlock these bits by doing a subsequent i/o read of this register. firmware must do an iord after an iowr to an endpoint 0 register to verify that the contents have changed and that the sie has not updated these values. while the ? set-up ? bit is set, the cpu cannot write to the dma buffers at memory locations 0xe0 through 0xe7 and 0xf8 through 0xff. this prevents an incoming set-up transaction from conflicting with a previous in data buffer filling operation by firmwar e. the mode bits (bits [3:0]) in an endpoint mode register control how the endpoint responds to usb bus traffic. the mode bit encoding is shown in section 16.0. the format of the endpoint device counter registers is shown below: bits 0 to 3 indicate the number of data bytes to be transmitted during an in packet, valid values are 0 to 8 inclusive. data va lid bit 6 is used for out and set-up tokens only. data 0/1 toggle bit 7 selects the data packet ? s toggle state: 0 for data0, 1 for data1. 13.0 12-bit free-running timer the 12-bit timer provides two interrupts (128 s and 1.024 ms) and allows the firmware to directly time events that are up to 4 ms in duration. the lower 8 bits of the timer can be read directly by the firmware. reading the lower 8 bits latches the upper 4 bits into a temporary register. when the firmware reads the upper 4 bits of the timer, it is actually reading the count stored in the temporary register. the effect of this logic is to ensure a stable 12-bit timer value can be read, even when the two reads are separated in time. 13.1 timer (lsb) 13.2 timer (msb) endpoint 0 set-up received endpoint 0 in received endpoint 0 out received acknowledge mode bit 3 mode bit 2 mode bit 1 mode bit 0 reserved reserved reserved acknowledge mode bit 3 mode bit 2 mode bit 1 mode bit 0 data 0/1 toggle data valid reserved reserved byte count bit 3 byte count bit 2 byte count bit 1 byte count bit 0 figure 12-2. usb device counter registers 0x11h, 0x13h, 0x15h (read/write) timer bit 7 timer bit 6 timer bit 5 timer bit 4 timer bit 3 timer bit 2 timer bit 1 timer bit 0 reserved reserved reserved reserved timer bit 11 timer bit 10 timer bit 9 timer bit 8 cy7c63411/12/13 cy7c63511/12/13 cy7c63612/13 for for document #: 38-08027 rev. ** page 23 of 36 14.0 processor status and control register the ? run ? (bit 0) is manipulated by the halt instruction. when halt is executed, the processor clears the run bit and halts at the end of the current instruction. the processor remains halted until a reset (power on or watch dog). notice, when writing to the processor status and control register, the run bit should always be written as a ? 1. ? the ? single step ? (bit 1) is provided to support a hardware debugger. when single step is set, the processor will execute one instruction and halt (clear the run bit). this bit must be cleared for normal operation. the ? interrupt mask ? (bit 2) shows whether interrupts are enabled or disabled. the firmware has no direct control over this bit as writing a zero or one to this bit position will have no effect on interrupts. instructions di, ei, and reti manipulate the inte rnal hardware that controls the state of the interrupt mask bit in the processor status and control register. writing a ? 1 ? to ? suspend, wait for interrupts ? (bit 3) will halt the processor and cause the microcontroller to enter the ? suspend ? mode that significantly reduces power consumption. a pending interrupt or bus activity will cause the device to come out of suspend. after coming out of suspend, the device will resume firmware execution at the instruction following the iowr which put the part into suspend. an iowr that attempts to put the part into suspend will be ignored if either bus activity or an interrup t is pending. the ? power-on reset ? (bit 4) is only set to ? 1 ? during a power on reset. the firmware can check bits 4 and 6 in the reset handler to determine whether a reset was caused by a power on condition or a watch dog timeout. pors is used to determine suspend start-up timer value of 128 s or 128 ms. the ? usb bus reset ? (bit 5) will occur when a usb bus reset is received. the usb bus reset is a singled-ended zero (se0) that lasts more than 8 microseconds. an se0 is defined as the condition in which both the d+ line and the d ? line are low at the same time. when the sie detects this condition, the usb bus reset bit is set in the processor status and control register and an usb bus reset interrupt is generated. please note this is an interrupt to the microcontroller and does not actually reset th e processor. the ? watch dog reset ? (bit 6) is set during a reset initiated by the watch dog timer. this indicates the watch dog timer went for more than 8 ms between watch dog clears. the ? irq pending ? (bit 7) indicates one or more of the interrupts has been recognized as active. the interrupt acknowledge sequence should clear this bit until the next interrupt is detected. during power-on reset, the processor status and control register is set to 00010001, which indicates a power-on reset (bit 4 set) has occurred and no interrupts are pending (bit 7 clear) yet. during a watch dog reset, the processor status and control register is set to 01000001, which indicates a watch dog reset (bit 6 set) has occurred and no interrupts are pending (bit 7 clear) yet. figure 13-1. timer block diagram 7 6 5 4 3 2 1 0 r r/w r/w r/w r/w r r/w r/w irq pending watch dog reset usb bus reset power-on reset suspend, wait for interrupt interrupt mask single step run 10 9 7 85 6432 1-mhz clock 1.024-ms interrupt 128- s interrupt to timer register 8 1 0 11 l1 l0 l2 l3 d3 d2 d1 d0 d7 d6 d5 d4 d3 d2 d1 d0 cy7c63411/12/13 cy7c63511/12/13 cy7c63612/13 for for document #: 38-08027 rev. ** page 24 of 36 15.0 interrupts all interrupts are maskable by the global interrupt enable register and the usb end point interrupt enable register. writing a ? 1 ? to a bit position enables the interrupt associated with that bit position. during a reset, the contents the global interrupt e nable register and usb end point interrupt enable register are cleared, effectively disabling all interrupts. pending interrupt requests are recognized during the last clock cycle of the current instruction. when servicing an interrupt, the hardware will first disable all interrupts by clearing the interrupt enable bit in the processor status and control register. n ext, the interrupt latch of the current interrupt is cleared. this is followed by a call instruction to the rom address associated with the interrupt being serviced (i.e., the interrupt vector). the instruction in the interrupt table is typically a jmp instruction to the address of the interrupt service routine (isr). the user can re-enable interrupts in the interrupt service routine by executing an ei instruction. interrupts can be nested to a level limited only by the available stack space. the program counter value as well as the carry and zero flags (cf, zf) are automatically stored onto the program stack by the call instruction as part of the interrupt acknowledge process. the user firmware is responsible for insuring that the processor state is preserved and restored during an interrupt. the push a instruction should be used as the first command in the isr to save the accumulator value and the pop a instruction should be used just before the reti instruction to restore the accumulator value. the program counter cf and zf are restored and interrupts are enabled when the reti instruction is executed. 15.1 interrupt vectors the interrupt vectors supported by the usb controller are listed in table 15-1 . although reset is not an interrupt, per se, the first instruction executed after a reset is at prom address 0x0000h ? which corresponds to the first entry in the interrupt vector table. because the jmp instruction is 2 bytes long, the interrupt vectors occupy 2 bytes. 7 6 5 4 3 2 1 0 r/w r/w r/w r/w r/w reserved reserved gpio interrupt enable dac interrupt enable reserved 1.024-ms interrupt enable 128- sec interrupt enable usb bus rst interrupt enable 7 6 5 4 3 2 1 0 r/w r/w r/w reserved reserved reserved reserved reserved epa2 interrupt enable epa1 interrupt enable epa0 interrupt enable figure 15-1. usb end point interrupt enable register 0x21h (read/write) table 15-1. interrupt vector assignments interrupt vector number rom address function not applicable 0x0000h execution after reset begins here 1 0x0002h usb bus reset interrupt 2 0x0004h 128- s timer interrupt 3 0x0006h 1.024-ms timer interrupt 4 0x0008h usb address a endpoint 0 interrupt 5 0x000ah usb address a endpoint 1 interrupt 6 0x000ch usb address a endpoint 2 interrupt 7 0x000eh reserved 8 0x0010h reserved 9 0x0012h reserved 10 0x0014h dac interrupt 11 0x0016h gpio interrupt 12 0x0018h reserved cy7c63411/12/13 cy7c63511/12/13 cy7c63612/13 for for document #: 38-08027 rev. ** page 25 of 36 15.2 interrupt latency interrupt latency can be calculated from the following equation: interrupt latency = (number of clock cycles remaining in the current instruction) + (10 clock cycles for the call instruction) + (5 clock cycles for the jmp instruction) for example, if a 5 clock cycle instruction such as jc is being executed when an interrupt occurs, the first instruction of the interrupt service routine will execute a min. of 16 clocks (1+10+5) or a max. of 20 clocks (5+10+5) after the interrupt is issu ed. remember that the interrupt latches are sampled at the rising edge of the last clock cycle in the current instruction. 15.2.1 usb bus reset interrupt the usb bus reset interrupt is asserted when a usb bus reset condition is detected. a usb bus reset is indicated by a single ended zero (se0) on the upstream port for more than 8 microseconds. 15.2.2 timer interrupt there are two timer interrupts: the 128- s interrupt and the 1.024-ms interrupt. the user should disable both timer interrupts before going into the suspend mode to avoid possible conflicts between servicing the interrupts first or the suspend request fi rst. 15.2.3 usb endpoint interrupts there are three usb endpoint interrupts, one per endpoint. the usb endpoints interrupt after the either the usb host or the usb controller sends a packet to the usb. 15.2.4 dac interrupt each dac i/o pin can generate an interrupt, if enabled.the interrupt polarity for each dac i/o pin is programmable. a positive polarity is a rising edge input while a negative polarity is a falling edge input. all of the dac pins share a single interrupt vector, which means the firmware will need to read the dac port to determine which pin or pins caused an interrupt. please note that if one dac pin triggered an interrupt, no other dac pins can cause a dac interrupt until that pin has returned to its inactive (non-trigger) state or the corresponding interrupt enable bit is cleared. the usb controller does not assign in terrupt priority to different dac pins and the dac interrupt enable register is not cleared during the interrupt acknowledge process. 15.2.5 gpio interrupt each of the 32 gpio pins can generate an interrupt, if enabled. the interrupt polarity can be programmed for each gpio port as part of the gpio configuration. all of the gpio pins share a single interrupt vector, which means the firmware will need to rea d the gpio ports with enabled interrupts to determine which pin or pins caused an interrupt. please note that if one port pin triggered an interrupt, no other port pins can cause a gpio interrupt until that port pin has returned to its inactive (non-trigger) state or its corresponding port interrupt enable bit is cleared. the usb controller does not assi gn interrupt priority to different port pins and the port interrupt enable registers are not cleared during the interrupt acknowle dge process. cy7c63411/12/13 cy7c63511/12/13 cy7c63612/13 for for document #: 38-08027 rev. ** page 26 of 36 16.0 truth tables the ? in ? column represents the sie ? s response to the token type. a disabled endpoint will remain such until firmware changes it, and all endpoints reset to disabled. any setup packet to an enabled and accepting endpoint will be changed by the sie to 0001 (naking). any mode which indicates the acceptance of a setup will acknowledge it. most modes that control transactions involving an ending ack will be changed by the sie to a corresponding mode which naks follow on packets. a control endpoint has three extra status bits for pid (setup, in and out), but must be placed in the correct mode to function as such. also a non-control endpoint can be made to act as a control endpoint if it is placed in a non appropriate mode. a ? check ? on an out token during a status transaction checks to see that the out is of zero length and has a data toggle (dtog) of 1. table 16-1. usb register mode encoding mode encoding setup in out comments disable 0000 ignore ignore ignore ignore all usb traffic to this endpoint nak in/out 0001 accept nak nak forced from set-up on control endpoint, from modes other than 0000 status out only 0010 accept stall check for control endpoints stall in/out 0011 accept stall stall for control endpoints ignore in/out 0100 accept ignore ignore for control endpoints isochronous out 0101 ignore ignore always available to low speed devices, future usb spec enhancements status in only 0110 accept tx 0 stall for control endpoints isochronous in 0111 ignore tx cnt ignore available to low speed devices, future usb spec enhancements nak out 1000 ignore ignore nak an ack from mode 1001 --> 1000 ack out 1001 ignore ignore ack this mode is changed by sie on issuance of ack --> 1000 nak out - status in 1010 accept tx 0 nak an ack from mode 1011 --> 1010 ack out - status in 1011 accept tx 0 ack this mode is changed by sie on issuance of ack --> 1010 nak in 1100 ignore nak ignore an ack from mode 1101 --> 1100 ack in 1101 ignore tx cnt ignore this mode is changed by sie on issuance of ack --> 1100 nak in - status out 1110 accept nak check an ack from mode 1111 --> 111 ack in - status out ack in - status out 1111 accept tx cnt check this mode is changed by sie on issuance of ack -->1110 cy7c63411/12/13 cy7c63511/12/13 cy7c63612/13 for for document #: 38-08027 rev. ** page 27 of 36 the response of the sie can be summarized as follows: 1. the sie will only respond to valid transactions, and will ignore non-valid ones; 2. the sie will generate irq when a valid transaction is completed or when the dma buffer is corrupted 3. an incoming data packet is valid if the count is <= 10 (crc inclusive) and passes all error checking; 4. a setup will be ignored by all non-control endpoints (in appropriate modes); 5. an in will be ignored by an out configured endpoint and vice versa. the in and out pid status is updated at the end of a transaction. the setup pid status is updated at the beginning of the data packet phase. the entire endpoint 0 mode and the count register are locked to cpu writes at the end of any transaction in which an ack is transferred. these registers are only unlocked upon a cpu read of these registers, and only if that read happens after the transaction completes. this represents about a 1- s window to which to the cpu is locked from register writes to these usb registers. normally the firmware does a register read at the beginning of the isr to unlock and get the mode register informati on. the interlock on the mode and count registers ensures that the firmware recognizes the changes that the sie might have made during the previous transaction. table 16-2. decode table for table 16-3 : ? details of modes for differing traffic conditions ? properties of incoming packet encoding status bits what the sie does to mode bits pid status bits interrupt? end point mode end point mode 3 2 1 0 token count buffer dval dtog dval count setup in out ack 3 2 1 0 response int setup in out the validity of the received data the quality status of the dma buffer cy7c63411/12/13 cy7c63511/12/13 cy7c63612/13 for for document #: 38-08027 rev. ** page 28 of 36 table 16-3. details of modes for differing traffic conditions end point mode pid set end point mode 3 2 1 0 token count buffer dval dtog dval count setup in out ack 3 2 1 0 response int setup packet (if accepting) see table 16-1 setup <= 10 data valid updates 1 updates 1 uc uc 1 0 0 0 1 ack yes see table 16-1 setup > 10 junk x updates updates updates 1 uc uc uc nochange ignore yes see table 16-1 setup x junk invalid updates 0 updates 1 uc uc uc nochange ignore yes disabled 0 0 0 0 x x uc x uc uc uc uc uc uc uc nochange ignore no nak in/out 0 0 0 1 out x uc x uc uc uc uc uc 1 uc nochange nak yes 0 0 0 1 in x uc x uc uc uc uc 1 uc uc nochange nak yes ignore in/out 0 1 0 0 out x uc x uc uc uc uc uc uc uc nochange ignore no 0 1 0 0 in x uc x uc uc uc uc uc uc uc nochange ignore no stall in/out 0 0 1 1 out x uc x uc uc uc uc uc 1 uc nochange stall yes 0 0 1 1 in x uc x uc uc uc uc 1 uc uc nochange stall yes control write normal out/premature status in 1 0 1 1 out <= 10 data valid updates 1 updates uc uc 1 1 1 0 1 0 ack yes 1 0 1 1 out > 10 junk x updates updates updates uc uc 1 uc nochange ignore yes 1 0 1 1 out x junk invalid updates 0 updates uc uc 1 uc nochange ignore yes 1 0 1 1 in x uc x uc uc uc uc 1 uc 1 nochange tx 0 yes nak out/premature status in 1 0 1 0 out <= 10 uc valid uc uc uc uc uc 1 uc nochange nak yes 1 0 1 0 out > 10 uc x uc uc uc uc uc uc uc nochange ignore no 1 0 1 0 out x uc invalid uc uc uc uc uc uc uc nochange ignore no 1 0 1 0 in x uc x uc uc uc uc 1 uc 1 nochange tx 0 yes status in/extra out 0 1 1 0 out <= 10 uc valid uc uc uc uc uc 1 uc 0 0 1 1 stall yes 0 1 1 0 out > 10 uc x uc uc uc uc uc uc uc nochange ignore no 0 1 1 0 out x uc invalid uc uc uc uc uc uc uc nochange ignore no 0 1 1 0 in x uc x uc uc uc uc 1 uc 1 nochange tx 0 yes control read normal in/premature status out 1 1 1 1 out 2 uc valid 1 1 updates uc uc 1 1 nochange ack yes 1 1 1 1 out 2 uc valid 0 1 updates uc uc 1 uc 0 0 1 1 stall yes 1 1 1 1 out !=2 uc valid updates 1 updates uc uc 1 uc 0 0 1 1 stall yes 1 1 1 1 out > 10 uc x uc uc uc uc uc uc uc nochange ignore no 1 1 1 1 out x uc invalid uc uc uc uc uc uc uc nochange ignore no 1 1 1 1 in x uc x uc uc uc uc 1 uc 1 1 1 1 0 ack (back) yes 3 2 1 0 token count buffer dval dtog dval count setup in out ack 3 2 1 0 response int nak in/premature status out 1 1 1 0 out 2 uc valid 1 1 updates uc uc 1 1 nochange ack yes 1 1 1 0 out 2 uc valid 0 1 updates uc uc 1 uc 0 0 1 1 stall yes 1 1 1 0 out !=2 uc valid updates 1 updates uc uc 1 uc 0 0 1 1 stall yes 1 1 1 0 out > 10 uc x uc uc uc uc uc uc uc nochange ignore no 1 1 1 0 out x uc invalid uc uc uc uc uc uc uc nochange ignore no 1 1 1 0 in x uc x uc uc uc uc 1 uc uc nochange nak yes status out/extra in 0 0 1 0 out 2 uc valid 1 1 updates uc uc 1 1 nochange ack yes 0 0 1 0 out 2 uc valid 0 1 updates uc uc 1 uc 0 0 1 1 stall yes cy7c63411/12/13 cy7c63511/12/13 cy7c63612/13 for for document #: 38-08027 rev. ** page 29 of 36 17.0 absolute maximum ratings storage temperature ........................................................................................................... ............................... ? 65 c to +150 c ambient temperature with power applied ......................................................................................... ...................... ? 0 c to +70 c supply voltage on v cc relative to v ss .................................................................................................................... ? 0.5v to +7.0v dc input voltage............................................................................................................... ............................ ? 0.5v to +v cc +0.5v dc voltage applied to outputs in high z state .................................................................................. ......... ? 0.5v to + v cc +0.5v max. output current into port 0,1,2,3 and dac[1:0] pins ........................................................................ ........................... 60 ma max. output current into dac[7:2] pins ......................................................................................... .................................... 10 ma power dissipation .............................................................................................................. ................................................300 mw static discharge voltage ...................................................................................................... ............................................ > 2000v latch-up current .............................................................................................................. ............................................. > 200 ma end point mode pid set end point mode 3 2 1 0 token count buffer dval dtog dval count setup in out ack 3 2 1 0 response int 0 0 1 0 out !=2 uc valid updates 1 updates uc uc 1 uc 0 0 1 1 stall yes 0010out > 10 uc x uc uc uc uc ucuc uc u c u c u c u c ignore no 0 0 1 0 out x uc invalid uc uc uc uc uc uc uc u c u c u c u c ignore no 0 0 1 0 in x uc x uc uc uc uc 1 uc uc 0 0 1 1 stall yes out endpoint normal out/erroneous in 1 0 0 1 out <= 10 data valid updates 1 updates uc uc 1 1 1 0 0 0 ack yes 1 0 0 1 out > 10 junk x updates updates updates uc uc 1 uc nochange ignore yes 1 0 0 1 out x junk invalid updates 0 updates uc uc 1 uc nochange ignore yes 1 0 0 1 in x uc x uc uc uc uc uc uc uc nochange ignore no nak out/erroneous in 1 0 0 0 out <= 10 uc valid uc uc uc uc uc 1 uc nochange nak yes 1 0 0 0 out > 10 uc x uc uc uc uc uc uc uc nochange ignore no 1 0 0 0 out x uc invalid uc uc uc uc uc uc uc nochange ignore no 1 0 0 0 in x uc x uc uc uc uc uc uc uc nochange ignore no isochronous endpoint (out) 0 1 0 1 out x updates updates updates updates updates uc uc 1 1 nochange rx yes 0 1 0 1 in x uc x uc uc uc uc uc uc uc nochange ignore no in endpoint normal in/erroneous out 1 1 0 1 out x uc x uc uc uc uc uc uc uc nochange ignore no 1 1 0 1 in x uc x uc uc uc uc 1 uc 1 1 1 0 0 ack (back) yes nak in/erroneous out 1 1 0 0 out x uc x uc uc uc uc uc uc uc nochange ignore no 1 1 0 0 in x uc x uc uc uc uc 1 uc uc nochange nak yes isochronous endpoint (in) 0 1 1 1 out x uc x uc uc uc uc uc uc uc nochange ignore no 0 1 1 1 in x uc x uc uc uc uc 1 uc uc nochange tx yes table 16-3. details of modes for differing traffic conditions (continued) cy7c63411/12/13 cy7c63511/12/13 cy7c63612/13 for for document #: 38-08027 rev. ** page 30 of 36 18.0 dc characteristics fosc = 6 mhz; operating temperature = 0 to 70 c parameter min. max. unit conditions general v cc (1) operating voltage 4.0 5.5 v non usb activity (note 3) v cc (2) operating voltage 4.35 5.25 v usb activity (note 4) i cc1 v cc operating supply current 40 ma v cc = 5.5v i cc2 v cc = 4.35v 15 ma i sb1 supply current - suspend mode 30 a oscillator off, d ? > voh min v pp programming voltage (disabled) ? 0.4 0.4 v t start resonator start-up interval 256 s vcc = 5.0v, ceramic resonator t int1 internal timer #1 interrupt period 128 128 s t int2 internal timer #2 interrupt period 1.024 1.024 ms t watch watch dog timer period 8.192 14.33 ms i il input leakage current 1 a any pin i sm max i ss io sink current 60 ma cumulative across all ports (note 10) power-on reset t vccs v cc reset slew 0.001 200 ms linear ramp: 0 to 4.35v (notes 6,7) usb interface v oh static output high 2.8 3.6 v 15k 5% ohms to gnd (note 4) v ol static output low 0.3 v v di differential input sensitivity 0.2 v |(d+) ? (d ? )| v cm differential input common mode range 0.8 2.5 v 9-1 v se single-ended receiver threshold 0.8 2.0 v c in transceiver capacitance 20 pf i lo hi-z state data line leakage ? 10 10 a0 v < v in <3.3 v r pu bus pull-up resistance (v cc option) 7.35k 7.65 k ? 7.5 k ? 2% to v cc (note 13) r pu bus pull-up resistance (ext. 3.3v option) 1.425 1.575 k ? 1.5 k ? 5% to 3.0 ? 3.6v r pd bus pull-down resistance 14.25 15.75 k ? 15 k ? 5% general purpose i/o interface r up pull-up resistance 4.9k 9.1k ohms v ith input threshold voltage 45% 65% v cc all ports, low to high edge v h input hysteresis voltage 6% 12% v cc all ports, high to low edge i ol sink current 7.2 16.5 ma port 3, vout = 1.0v (note 3) i ol sink current 3.5 10.6 ma port 0,1,2, vout = 2.0v (note 3) i oh source current 1.4 7.5 ma voh = 2.4v (all ports 0,1,2,3) (note 3) dac interface r up pull-up resistance 8.0k 20.0k ohms (note 14) i sink0(0) dac[7:2] sink current (0) 0.1 0.3 ma vout = 2.0 v dc (note 4,14) i sink0(f) dac[7:2] sink current (f) 0.5 1.5 ma vout = 2.0 v dc (note 4,14) i sink1(0) dac[1:0] sink current (0) 1.6 4.8 ma vout = 2.0 v dc (note 4,14) i sink1(f) dac[1:0] sink current (f) 8 24 ma vout = 2.0 v dc (note 4,14) i range programmed isink ratio: max/min 4 6 vout = 2.0 v dc (notes 4,11,14) cy7c63411/12/13 cy7c63511/12/13 cy7c63612/13 for for document #: 38-08027 rev. ** page 31 of 36 19.0 switching characteristics notes: 3. functionality is guaranteed of the v cc (1) range, except usb transmitter and dacs. 4. usb transmitter functionality is guaranteed over the v cc (2) range, as well as dac outputs. 5. per table 7-7 of revision 1.1 of usb specification, for c load of 50 ? 600 pf. 6. port 3 bit 7 controls whether the parts goes into suspend after a por event or waits 128 ms to begin running. 7. por will re-occur whenever v cc drops to approximately 2.5v. 8. measured as largest step size vs. nominal according to measured full scale and zero programmed values. 9. t ratio = isink1[1:0](n)/isink0[7:2](n) for the same n, programmed. 10. total current cumulative across all port pins flowing to v ss is limited to minimize ground-drop noise effects. 11. irange: isinkn(15)/ isinkn(0) for the same pin. 12. measured at crossover point of differential data signals. 13. limits total bus capacitance loading (c load ) to 400 pf per section 7.1.5 of revision 1.1 of usb specification. 14. dac i/o port not bonded out on cy7c63612/13. see note on page 17 for firmware code needed for unused pins. i lin differential nonlinearity 0.5 lsb any pin (note 8,14) t sink current sink response time 0.8 s full scale transition (note 14) t ratio tracking ratio dac[1:0] to dac[7:2] 14 21 vout = 2.0v (note 9,14) parameter description min. max. unit conditions clock t cyc input clock cycle time 165.0 168.3 ns t ch clock high time 0.45 t cyc ns t cl clock low time 0.45 t cyc ns usb driver characteristics t r transition rise time 75 ns cload = 50 pf [4, 5] t r transition rise time 300 ns cload = 600 pf [4, 5] t f transition fall time 75 ns cload = 50 pf [4, 5] t f transition fall time 300 ns cload = 600 pf [4, 5] t rfm rise/fall time matching 80 125 % t r /t f [4, 5] v crs output signal crossover voltage 1.3 2.0 v [4, 5] usb data timing t drate low speed data rate 1.4775 1.5225 mbs ave. bit rate (1.5 mb/s 1.5%) t djr1 receiver data jitter tolerance ? 75 75 ns to next transition [12] t djr2 receiver data jitter tolerance ? 45 45 ns for paired transitions [12] t deop differential to eop transition skew ? 40 100 ns [10] t eopr1 eop width at receiver 330 ns rejects as eop [12] t eopr2 eop width at receiver 675 ns accepts as eop [12] t eopt source eop width 1.25 1.50 s t udj1 differential driver jitter ? 95 95 ns to next transition, figure 19-5 t udj2 differential driver jitter ? 150 150 ns to paired transition, figure 19-5 parameter min. max. unit conditions cy7c63411/12/13 cy7c63511/12/13 cy7c63612/13 for for document #: 38-08027 rev. ** page 32 of 36 . figure 19-1. clock timing figure 19-2. usb data signal timing figure 19-3. receiver jitter tolerance clock t cyc t cl t ch 90% 10% 90% 10% d ? d + t r t f v crs v oh v ol differential data lines paired transitions n * t period + t jr2 t period consecutive transitions n * t period + t jr1 t jr t jr1 t jr2 cy7c63411/12/13 cy7c63511/12/13 cy7c63612/13 for for document #: 38-08027 rev. ** page 33 of 36 figure 19-4. differential to eop transition skew and eop width figure 19-5. differential data jitter 20.0 ordering information ordering code eprom size package name package type operating range cy7c63411-pc 4 kb p17 40-pin (600-mil) pdip commercial cy7c63411-pvc 4 kb o48 48-lead shrunk small outline package commercial cy7c63412-pc 6 kb p17 40-pin (600-mil) pdip commercial cy7c63412-pvc 6 kb o48 48-lead shrunk small outline package commercial cy7c63413-pc 8 kb p17 40-pin (600-mil) pdip commercial cy7c63413-pvc 8 kb o48 48-lead shrunk small outline package commercial cy7c63511-pvc 4 kb o48 48-lead shrunk small outline package commercial cy7c63512-pvc 6 kb o48 48-lead shrunk small outline package commercial cy7c63513-pvc 8 kb o48 48-lead shrunk small outline package commercial CY7C63612-SC 6 kb s13 24-pin (300-mil) soic commercial cy7c63613-sc 8 kb s13 24-pin (300-mil) soic commercial t period differential data lines crossover point crossover point extended source eop width: t eopt receiver eop width: t eopr1 , t eopr2 diff. data to se0 skew n * t period + t deop t period differential data lines crossover points paired transitions n * t period + t xjr2 consecutive transitions n * t period + t xjr1 cy7c63411/12/13 cy7c63511/12/13 cy7c63612/13 for for document #: 38-08027 rev. ** page 34 of 36 21.0 package diagrams 48-lead shrunk small outline package o48 51-85061-*c 51-85019-a 40-lead (600-mil) molded dip p17 cy7c63411/12/13 cy7c63511/12/13 cy7c63612/13 document #: 38-08027 rev. ** page 35 of 36 ? cypress semiconductor corporation, 2002. the information contained herein is subject to change without notice. cypress semico nductor corporation assumes no responsibility for the use of any circuitry other than circuitry embodied in a cypress semiconductor product. nor does it convey or imply any license unde r patent or other rights. cypress semiconductor does not authorize its products for use as critical components in life-support systems where a malfunction or failure may reasonably be expected t o result in significant injury to the user. the inclusion of cypress semiconductor products in life-support systems application implies that the manufacturer assumes all risk of such use and in do i ng so indemnifies cypress semiconductor against all charges. 21.0 package diagrams (continued) 24-lead (300-mil) molded soic s13 51-85025-a cy7c63411/12/13 cy7c63511/12/13 cy7c63612/13 for for document #: 38-08027 rev. ** page 36 of 36 document title: cy7c63411/12/13, cy7c63511/12/13, cy7c63612/13 low-speed usb peripheral controller document number: 38-08027 rev. ecn no. issue date orig. of change description of change ** 116224 06/12/02 dsg change from spec number: 38-00754 to 38-08027 |
Price & Availability of CY7C63612-SC |
|
|
All Rights Reserved © IC-ON-LINE 2003 - 2022 |
[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy] |
Mirror Sites : [www.datasheet.hk]
[www.maxim4u.com] [www.ic-on-line.cn]
[www.ic-on-line.com] [www.ic-on-line.net]
[www.alldatasheet.com.cn]
[www.gdcy.com]
[www.gdcy.net] |