em78p613 ELAN Microelectronics Corp, em78p613 Datasheet

no-image

em78p613

Manufacturer Part Number
em78p613
Description
Universal Serial Bus Series Microcontroller
Manufacturer
ELAN Microelectronics Corp
Datasheet
EM78P613
Universal Serial Bus
Series Microcontroller
Product
Specification
D
. V
1.0
OC
ERSION
ELAN MICROELECTRONICS CORP.
January 2009

Related parts for em78p613

em78p613 Summary of contents

Page 1

... EM78P613 Universal Serial Bus Series Microcontroller Specification ELAN MICROELECTRONICS CORP. Product ERSION January 2009 1.0 ...

Page 2

... Trademark Acknowledgments: IBM is a registered trademark and PS trademark of IBM. Windows is a trademark of Microsoft Corporation. ELAN and ELAN logo © 2009 by ELAN Microelectronics Corporation Copyright All Rights Reserved Printed in Taiwan The contents of this specification are subject to change without further notice. ELAN Microelectronics assumes no responsibility concerning the accuracy, adequacy, or completeness of this specification ...

Page 3

Contents 1 General Description .................................................................................................. 1 2 Features ..................................................................................................................... 1 3 Application................................................................................................................. 2 4 Pin Assignment ......................................................................................................... 3 5 Pin Description.......................................................................................................... 4 6 Block Diagram ........................................................................................................... 5 7 Functional Description ............................................................................................. 6 7.1 Program Memory................................................................................................ 6 7.2 Data Memory ...................................................................................................... ...

Page 4

Contents 7.5 Reset ................................................................................................................ 24 7.5.1 Power-on Reset.................................................................................................25 7.5.2 Watchdog Reset................................................................................................25 7.5.3 USB Reset.........................................................................................................25 7.6 Power Saving Mode ......................................................................................... 25 7.6.1 Power Down Mode ............................................................................................25 7.6.2 Dual Clock Mode ...............................................................................................26 7.7 Interrupt ............................................................................................................ 26 7.8 Serial Peripheral Interface (SPI) Function........................................................ ...

Page 5

... With no firmware involved, these series of microcontrollers can automatically identify and decode Standard USB Command to Endpoint Zero. The EM78P613 has 8-level stacks and 6 interrupt sources. It has 208 bytes of general purpose SRAM and 6K bytes of OTP ROM. 2 Features Operating voltage: 4 ...

Page 6

... Pull-up source for the external USB resistor on D+pin Package Type: 18-pin SOP(300mil) 20-pin SOP(300mil) 24-pin SOP (300mil) 3 Application USB and PS/2 both compatible with mouse USB Mouse USB Joystick 2 • : EM78P613AM : EM78P613BM : EM78P613CM Product Specification (V1.0) 01.09.2009 (This specification is subject to change without further notice) ...

Page 7

... Pin Assignment Figure 4-1 EM78P613AM (18-Pin SOP) Figure 4-3 EM78P613CM (24-Pin SOP) Product Specification (V1.0) 01.09.2009 (This specification is subject to change without further notice) Universal Serial Bus Series Microcontroller Figure 4-2 EM78P613BM (20-Pin SOP) EM78P613 • 3 ...

Page 8

... When the EM78P613 is running in USB mode, this pin will have an internally pulled high resistor (1.5KΩ), with V33=3.3V. USB minus data line interface or DATA for PS/2 mouse. I/O When the EM78P613 is running in PS/2 mode, this pin will have an internally pulled high resistor (2.2KΩ), with VDD=5V MHz / 12/16 MHz Crystal input. ...

Page 9

... VDD V3 3.3V Transceiver Regulator USB Device Controller Prescaler TCC RAM R1 (TCC) R4 (RSR) DATA & CONTROL BUS I/O P92 P93 Port 9 P94 EM78P613 R2 (PC) ROM Instruction Register Interrupt Control Instruction Decoder P60 P61 I/O P62 I/O P63 Port 5 Port 6 P64 P65 P66 Stack 1 Stack 2 Stack 3 ...

Page 10

... ROM space, Data Memory in 208 bytes SRAM space, USB Application FIFOs for EndPoint0, EndPoint1, and EndPoint2. 7.1 Program Memory The program space of the EM78P613 is 6K words, and is divided into six pages. Each page is 1K words long. After a reset, the 13-bit Program Counter (PC) points to location zero of the program space. ...

Page 11

... Register : 1F Extra RAM0 000 001 20 32x8 Bank 32x8 Bank 21 Register Register : (Bank 0) (Bank 1) 3F Figure 7-1 Data RAM Organization of EM78P613 Product Specification (V1.0) 01.09.2009 (This specification is subject to change without further notice) Universal Serial Bus Series Microcontroller Endpoint EndPoint : 6 address ...

Page 12

... R2 (Program Counter and Stack) Default Value: (0B_0000_0000) The EM78P613 Program Counter is a 13-bit register that allows accessing of the 6k words of the Program Memory with 8 level stacks. The eight LSB bits, A0~A7, are located at R2, while the three MSB bits, A12~A10, are located at R3. The Program Counter is cleared after Power-on reset or Watchdog reset ...

Page 13

... Page 0 13FF 1400 Page 0 17FF Figure 7-2 Program Counter and Stack Bit 6 Bit 5 Bit 4 PS1 PS0 T NOTE NOTE For Borrow, the polarity is reversed. EM78P613 Call Interrupt Stack 1 RET Stack 2 RETL Stack 3 RETI Stack 4 Stack 5 Stack 6 Stack 7 Stack 8 0000 : Reset Vector 0001 : Interrupt Vector ...

Page 14

... EM78P613 Universal Serial Bus Series Microcontroller R3 [2] Zero flag. It will be set to 1 when the result of an arithmetic or logic operation is zero. R3 [3] Power down flag. It will be set to 1 during Power-on phase or by “WDTC” command and cleared when the MCU enters into Power down mode. It remains in its previous state after a Watchdog Reset ...

Page 15

... P56 P55 P54 Bit 6 Bit 5 Bit 4 P66 P65 P64 Bit 5 Bit P75 / DATA D+ / P74 / CLK Bit 5 Bit 4 SSE RBF /P5 Weakup EM78P613 Bit 3 Bit 2 Bit 1 Ad3 Ad2 Ad1 RAM Bank # Bank 0 Bank 1 Bank 2 Bank 3 Bit 3 Bit 2 Bit 1 − − − Bit 3 ...

Page 16

... EM78P613 Universal Serial Bus Series Microcontroller R8[6]: SRO SPI Read Overflow bit overflow new data is received while the previous data is still being held in the R8[5]: SSE SPI Shift Enable bit 0 = Reset as soon as the shifting is complete, and the next transmission Start to shift, and keep at 1 while the current transmission is still being ...

Page 17

... Bit 6 Bit 5 Bit 4 − − Delay noise NOTE Bit 5 Bit 4 Bit 3 EP1_R EP2_R EP2_W flag. When this bit is equal to “1,” it indicates that the UDC is EM78P613 Bit 3 Bit 2 Bit 1 − P93 P92 Bit 3 Bit 2 Bit 1 − − − Bit 2 Bit 1 Host_Suspend ...

Page 18

... EM78P613 Universal Serial Bus Series Microcontroller Therefore, before writing data into the FIFO, the firmware will first check this bit to avoid overwriting the data. These three bits can only be set by firmware and cleared by hardware. RC [7] EP0_W flag. After the UDC completes writing data to the FIFO, this bit will be set automatically. The firmware will clear it as soon as it gets the data from EP0’ ...

Page 19

... Vendor/Customer Command to EndPoint Zero. This bit is cleared by firmware. RF [2] USB Suspend interrupt flag. It will be set when the EM78P613 finds the USB Suspend Signal on the USB bus. This bit is cleared by firmware. RF [3] USB Reset interrupt flag. It will be set when the host issues a USB Reset signal ...

Page 20

... EM78P613 Universal Serial Bus Series Microcontroller 7.2.2.16 R10 SPIRB (SPI Read Register) : Default Value: (0b00000000) Bit 7 SRB7 SRB7~SRB0 are the 8-bit data when there’s complete transmission by SPI. 7.2.2.17 R11 SPIWB (SPI Write Register) : Default Value: (0b0000_0000) Bit 7 SWB7 SWB6 SWB7~SWB0 are the 8-bit data that are waiting for transmission by SPI. ...

Page 21

... Universal Serial Bus Series Microcontroller PSR1/TSR1 PSR0/TSR0 NOTE 7 = 1024 ms EM78P613 TCC Rate WDT Rate 128 256 1: 128 • 17 ...

Page 22

... EM78P613 Universal Serial Bus Series Microcontroller IOC8: (SPIC) SPI Control Register. (Default Value :0b00000000) Bit 7 CES IOC8 [7]: CES Clock Edge Select bit 0 : Data shifts out on rising edge, and shifts in on falling edge. Data Data shifts out on falling edge, and shifts in on rising edge. Data is on ...

Page 23

... The Remote Wake-up field can be modified by SetFeature () and ClearFeature () requests Not support remote wake Supports remote wake up IOCA[4]: Remote_Wake up bit EM78M611 does NOT support this function. Only EM78P613, EM78P611F, EM78611E and EM78M611E do. IOCA[5] Pull-high resistor of P77 and P76. This is applicable USB mode only Pull-high is enabled ...

Page 24

... EM78P613 Universal Serial Bus Series Microcontroller 7.2.3.5 IOCB (Port 9 Wake-up Pin Select Register) Default Value: (0B_X111_1111) Bit 7 − IOCB [5~7; 0~1] : Reserved IOCB [2~4]: These bits are used to select which of the Port 9 pins assigned to wake up the MCU while in Power down mode Enable the function 1 : Disable the function 7 ...

Page 25

... MCU enters into Power down mode. At the transition of a wake-up signal from high to low, this bit is set to enable the system clock Sleep mode. The EM78P613 is in power down mode Run mode. The EM78P613 is working normally. IOCE [5] Watchdog Timer enable bit. The bit disables/enables the Watchdog Timer. ...

Page 26

... EM78P613 Universal Serial Bus Series Microcontroller 7.2.3.9 IOCF (Interrupt Mask Register) Default Value: (0B_0000_0000) Bit 7 USB Host Resume_ IE IOCF [0~7] TCC / EP0 / USB Suspend / USB Reset / Port 7 State Change /SPI /USB Host Resume interrupt enable bits. These eight bits control the TCC interrupt function, EP0 interrupt, USB Suspend interrupt, USB Reset interrupt, Port 7 State Change interrupt, SPI interrupt and USB Host Resume interrupt respectively ...

Page 27

... USB Application The EM78P613 is designed specially for USB device application and has many powerful functions that support the firmware to free itself from complex situation in various aspects of USB application. Product Specification (V1.0) 01.09.2009 (This specification is subject to change without further notice) ...

Page 28

... EP1 and EP2 for interrupt endpoints. Sending data to the USB host in EM78P613 is very easy. Just write data into the EP’s FIFO, set the flag, and the UDC will handle the rest. It will then confirm that the USB host has received the correct data from EM78P613 ...

Page 29

... Power Down mode and Dual clock mode. 7.6.1 Power Down Mode The EM78P613 enters into Power Down mode by clearing the RUN register (IOCE[4]). During this mode, the oscillator is turned off and the MCU enters sleep mode. It will wake up when a signal from the USB host is resumed, or when a Watchdog reset occurs or when an input port state changes ...

Page 30

... USB Host Resume: When the UDC detects that the USB bus is no longer in Suspend IOCF is an interrupt mask register which can be set bit by bit. While their respective bit is written to 0, the hardware interrupt will be inhibited, that is, the EM78P613 will not jump to the interrupt vector to execute instructions. But the interrupt status flags still records the conditions no matter whether the interrupt is masked or not ...

Page 31

... SPI module. If EM78P613 is a master controller, it sends clock through the SCK pin. A couple of 8-bit data are transmitted and received at the same time. However, if the EM78P613 is defined as a slave, its SCK pin could be programmed as an input pin. Data will continue to be shifted based on both the clock rate and the selected edge ...

Page 32

... EM78P613 Universal Serial Bus Series Microcontroller Slave Device 1 SPIC The following describes the function of each block and explains how to carry out the SPI communication with the signals depicted in Figure 7-5 : P54/SDI: Serial Data In P55/SDO: Serial Data Out P56/SCK: Serial Clock P57//SS: /Slave Select (Option). This pin (/SS) may be required in a slave mode. ...

Page 33

... Users can determine if the next write attempt is available. SBRS2~SBRS0: Programs the clock frequency/rates and sources. Edge Select: Selects the appropriate clock edges by programming the CES bit. Product Specification (V1.0) 01.09.2009 (This specification is subject to change without further notice) Universal Serial Bus Series Microcontroller EM78P613 • 29 ...

Page 34

... Universal Serial Bus Series Microcontroller 7.8.2 SPI Mode Timing The SCK edge is selected by programming bit CES. The waveform shown in Figure 7-6 is applicable regardless whether the EM78P613 is in master or slave mode, with /SS disabled. However, the waveform in Figure 7-7 can only be implemented in slave mode with /SS enabled. ...

Page 35

... Input High Voltage IH V Input Low Voltage IL Output High Voltage IOH1 (Port 5, Port 6, P76~77 and P92~93) Product Specification (V1.0) 01.09.2009 (This specification is subject to change without further notice) Universal Serial Bus Series Microcontroller Symbol Parameter EM78P613 Min Max 0 70 -65 150 -0.5 6.0 -0.5 6.0 Condition Min. Typ. Max. Unit ...

Page 36

... EM78P613 Universal Serial Bus Series Microcontroller Symbol Output High Voltage IOH2 (P74, P75 in PS2 mode) Output Low Voltage IOL1 (Ports 5, 6; P92, P93, P76, P77 in normal mode) Output Low Voltage IOL2 (P74, P75 in PS2 Mode) Output Low Voltage IOL3 (P92, P93, P76, P77 sink LED) ...

Page 37

... B. C1 (bypass capacitor) : placed adjacent to the V C. C2, C3 (power capacitor) : placed adjacent to the Power source, to improve the transient response and ripple rejection. Product Specification (V1.0) 01.09.2009 (This specification is subject to change without further notice) Universal Serial Bus Series Microcontroller NOTE pin, to minimize noise. DD EM78P613 • 33 ...

Page 38

... EM78P613 Universal Serial Bus Series Microcontroller A Special Register Map Operation Registers Addr. Name Bit 7 Bit 6 × Indirect Addressing Register × (TCC) Timer/Clock Counter × (PC) Program Counter R3 × PS2 PS1 (Status) × (RSR) BK1 BK0 × ...

Page 39

... P93 P92 − /P93 /P92 Device_R WTE RUN /PU8 esume Port 7 USB SPI_ state USB Suspend IE change Reset_IE _IE _1F EM78P613 Bit 1 Bit 0 Default Value PSR1 PSR0 0B_0011_1111 0B_1111_1111 0B_1111_1111 0B_1111_1111 0B_0000_0000 0B_1111_1111 − PS/2 USB 0B_1110_0011 − − 0B_xxx1_11xx 0B_xxxx_00xx 0B_xxxx_00xx ...

Page 40

... EM78P613 Universal Serial Bus Series Microcontroller B Instruction Set Each instruction in the instruction set is a 13-bit word divided into an OP code and one or more operands. All instructions are executed within one single instruction cycle (consisting of two oscillator periods), unless the program counter is changed by (a) Executing the instruction " ...

Page 41

... MOV A,k A ∨ k → A 19kk OR A,k A & k → A 1Akk AND A,k A ⊕ k → A 1Bkk XOR A,k k → A, [Top of Stack] → 1Ckk RETL k PC k-A → A 1Dkk SUB A,k k+A → A 1Fkk ADD A,k EM78P613 Status Affected None None ...

Page 42

... EM78P613 Universal Serial Bus Series Microcontroller C Code Option Register EM78P613 has two Code option registers, which are not part of the normal program memory. The option bits cannot be accessed during normal program execution. Address 000: Bit Pack EP2 Mnemonic /R.S age_ Ena ...

Page 43

... Bit 0 (EP2_Dir) : Endpoint 2 Direction 0 : OUT Bits 3~1 (EP2_Maxsize_4~0) : Endpoint 2 maximum size 0000 : reserved 00001 : 1 Bytes 00010 : 2 Bytes 00011 : 3 Bytes : : 10000 : 16 Bytes Bits 12~6 : Values are fixed Product Specification (V1.0) 01.09.2009 (This specification is subject to change without further notice) Universal Serial Bus Series Microcontroller EM78P613 • 39 ...

Page 44

... EM78P613 Universal Serial Bus Series Microcontroller D Package Out-line Dimension EM78P613AM 40 • Product Specification (V1.0) 01.09.2009 (This specification is subject to change without further notice) ...

Page 45

... EM78P613BM Product Specification (V1.0) 01.09.2009 (This specification is subject to change without further notice) Universal Serial Bus Series Microcontroller EM78P613 • 41 ...

Page 46

... EM78P613 Universal Serial Bus Series Microcontroller EM78P613CM E OTP Program Pin IC Pin Name P94 P57 P56 P55 VSS OSCI VDD P54 42 • 18-pin Package 20-pin Package Product Specification (V1.0) 01.09.2009 (This specification is subject to change without further notice) ...

Related keywords