General Description ... 1 Features ... 1 Type Definition... 3 Application... 3 Pin Assignment ... 4 Pin Description ... 6 Block Diagram ... 7 Function Description... 8 Program Memory ... 8 Data Memory ... 9 8.2.1 Special Purpose Register ...9 8.2.2 Operation Registers ...10 8.2.2.1...
Page 4
Contents Extra Control Register... 21 USB Application FIFOs ... 21 USB Application ... 22 8.5.1 USB Device Controller ...22 8.5.2 Device Address and Endpoints ...23 Reset ... 23 8.6.1 Power-on Reset...23 8.6.2 Watchdog Reset ...23 8.6.3 USB Reset...23 Saving Power Mode... 23 8.7.1 Power Down Mode ...23 8.7.2...
Identifying and decoding of Standard USB commands to EndPoint Zero PS/2 Application Support Built-in PS/2 port interface for keyboard and mouse Product Specification (V1.11) 04.20.2007 (This specification is subject to change without further notice) Universal Serial Bus Series Microcontroller EM78M611E • • • • 1...
Page 6
EM78M611E Universal Serial Bus Series Microcontroller Built-in 8-bit RISC MCU 8-level stacks for subroutine nesting and interrupt 8-bit real time clock/counter (TCC) with overflow interrupt Six available interrupts Built-in RC oscillator free running for Watchdog Timer and Dual clock mode...
24-pin PDIP (600mil)/SOP (300mil) (EM78M611EXCP/CM) 24-pin SSOP (150mil) (EM78M611EXEM) Type Definition The EM78M611E series has six types of packaging. Each type is divided into two modules, namely; original, and with both E packaging configuration for each series is defined. Table 3.1 below summarizes which series of the EM78M611E belong to which module.
PWM output pins. USB plus data line interface or CLK for PS/2 keyboard. When the EM78M611E is running in PS/2 mode, this pin will have an internal pulled-high resistor (2.2KΩ), with VDD=5.0V. USB minus data line interface or DATA for PS/2 keyboard.
Universal Serial Bus Series Microcontroller V3.3 3.3V Transceiver Regulator Device Controller Interrupt Control (RSR) DATA & CONTROL BUS Port 9 Port 8 EM78M611E Stack 1 (PC) Stack 2 Stack 3 Stack 4 Stack 5 Stack 6 Stack 7 Stack 8 Instruction Register (Status)
Furthermore, several registers are used for special purposes. 8.1 Program Memory The program space of the EM78M611E 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.
1 6 x 8 C o m m o n R e g is te r Product Specification (V1.11) 04.20.2007 (This specification is subject to change without further notice) Universal Serial Bus Series Microcontroller Fig. 8-1 Data RAM Organization of EM78M611E EM78M611E • • • • 9...
8.2.2.3 R2 (Program Counter & Stack) Default Value: (0B_0000_0000) The EM78M611E 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 0 13FF 1400 Page 0 17FF Bit 6 Bit 5 Bit 4 NOTE NOTE For Borrow, the polarity is reversed. EM78M611E Call Interrupt Stack 1 Stack 2 RETL Stack 3 RETI Stack 4 Stack 5 Stack 6 Stack 7...
Page 16
EM78M611E 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”...
EM78M611E Universal Serial Bus Series Microcontroller 8.2.2.11 RA (EEPROM Control Register) Default Value: (0B_1111_1111) RA is a command register for EEPROM control. For detailed usage of this register, refer to Section 8.2.3 which describes the EEPROM embedded in the EM78M611E.
TCC Overflow interrupt flag. It will be set while TCC overflows, and is cleared by firmware. RF [1] EndPoint Zero interrupt flag. It will be set when the EM78M611E receives Vendor/Customer Command to EndPoint Zero. This bit is cleared by firmware.
EM78M611E Universal Serial Bus Series Microcontroller RF [2] USB Suspend interrupt flag. It will be set when the EM78M611E finds the USB Suspend Signal on USB bus. This bit is cleared by the firmware. RF [3] USB Reset interrupt flag. It will be set when the host issues the USB Reset signal.
(This specification is subject to change without further notice) Universal Serial Bus Series Microcontroller Bit 6 Bit 5 Bit 4 TSR2 TSR1 Watchdog Timer prescaler. PSR1/TSR1 PSR0/TSR0 NOTE EM78M611E Bit 3 Bit 2 Bit 1 TSR0 PSR2 PSR1 TCC Rate WDT Rate 1: 2 1: 1...
ClearFeature () requests. 0 : Do Not support remote wake up 1 : Supports remote wake up IOCA[4]: Remote_Wake up bit EM78M611 do NOT support this function. Only EM78M611E does. 18 • • • • Bit 6 Bit 5 Bit 4 Dual_Frq.0...
/P94 Bit 6 Bit 5 Bit 4 − capacity of P90 ~ P97 Bit 6 Bit 5 Bit 4 − /PH95 Port 9. EM78M611E Frequency 500Hz 4kHz 32kHz 256kHz Bit 3 Bit 2 Bit 1 /P93 /P92 /P91 Bit 3...
0 : Sleep mode. The EM78M611E is in power down mode. 1 : Run mode. The EM78M611E is working normally. IOCE [5] Watchdog Timer enable bit. The bit disables/enables the Watchdog Timer.
8.4 USB Application FIFOs For USB Application, EM78M611E provides an 8-byte First-In-First-Out (FIFO) buffer for each endpoint. The buffer cannot be accessed directly. However, a corresponding Data Byte Pointer register for each endpoint is made available to address the individual byte of the FIFO buffer.
FIFO. Only when it receives unsupported command will the UDC notify the MCU through interrupt. Hence, the EM78M611E is very flexible under USB application since the developer can freely choose the method of decoding the USB command as dictated by different situation.
EP1 and EP2 for interrupt endpoint. Sending data to USB host in EM78M611E is very easy. Just write data into EP’s FIFO, then set flag, and the UDC will handle the rest. It will then confirm that the USB host has received the correct data from EM78M611E.
USB Bus. 8.8 Interrupt The EM78M611E has one interrupt vector in 0x0001. When an interrupt occurs during an MCU program run, it will jump to the interrupt vector (0x0001) and execute the instructions sequentially from the interrupt vector. RF is the interrupt status register, which records the interrupt status in the relative flags/bits.
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 inhibit, that is, the EM78M611E 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.
EM78M611E Universal Serial Bus Series Microcontroller Pattern Detect Application (PDA) can calculate the length of one pattern and interrupt the MCU while the serial signal is transiting from high to low (or vise-versa). Then the MCU reads the length value from a specified register.
EM78M611E Universal Serial Bus Series Microcontroller After the PDA function is enabled (by setting IOCA[2] to 1), user can write a default value to the High Pattern counter register and Low Pattern counter register. Then set the corresponding interrupt enable bit (IOCF[5]). When the counting value of one “H”...
ERA (AD Channel Select Register) Default Value: (0B_0001_1111) Bit 7 Product Specification (V1.11) 04.20.2007 (This specification is subject to change without further notice) Universal Serial Bus Series Microcontroller Bit 6 Bit 5 Bit 4 EM78M611E Clock (Hz) Period/255 (s) Fosc/3 0.5µ Fosc/6 Fosc/12 Fosc/24...
Page 34
EM78M611E Universal Serial Bus Series Microcontroller ERA [0~4]: AD Channel Selector ERA [7] AD Converter ready flag 1: Start AD Conversion (set by firmware). 0: When AD conversion is finished and has moved digital data into the AD Data Register, this bit will be set by hardware.
Bit 4 Bit 8 Bit 7 Bit 6 Bit 6 Bit 5 Bit 4 Action Read Write Erase Disable EM78M611E Bit 3 Bit 2 Bit 1 Bit 5 Bit 4 Bit 3 Bit 3 Bit 2 Bit 1 ADPS1 Execution Time...
EM78M611E Universal Serial Bus Series Microcontroller Absolute Maximum Ratings Temperature under bias Storage temperature Input voltage Output voltage 10 DC Electrical Characteristic T = 25ºC, VDD=5V, VSS=0V Symbol 3.3V Regulator Output voltage of 3.3V Regulator Low Power Reset detecting low...
Page 37
= 3.3V = 10.0mA Sink = 3.3V Input pin with pull-high resistor , = 3.3V Input pin with pull-high resistor , = 5V USB operation Mode EM78M611E Type Max Unit − − − − − − − − − − −...
EM78M611E Universal Serial Bus Series Microcontroller 11 Application Circuit A. BC1 , BC2 : load Capacitor B. C1 (bypass capacitor) : that placed adjacent to V C. C2 , C3 (power capacitor) : that placed adjacent to the Power source , will improve transient response and ripple rejection.
SR.1 SR.0 EP1_ EP0_R EP2_R EP2_W USB Application FIFO Address Register USB Application FIFO Data Register Port 7 state SE1_IF SE1_IF change_1F Reset_IF EM78M611E Bit 2 Bit1 Bit 0 Default Value 0B_0000_0000 0B_0000_0000 0B_0000_0000 0B_0001_1xxx 0B_0000_0000 0B_0000_0000 0B_0000_u000 0B_0000_0000 0B_u00u_0000...
Page 40
EM78M611E Universal Serial Bus Series Microcontroller Control Registers Address Name Bit 7 Bit 6 CONT 0x05 IOC5 0x06 IOC6 0x07 IOC7 0x08 IOC8 0x09 IOC9 Dual_ Dual_ 0x0A IOCA Frq.1 Frq.0 0x0B IOCB /P96 0x0C IOCC 0x0D IOCD /P96 /Dual...
Bits 8~9 of R2 unchanged A → R MOV R,A 0 → A CLRA 0 → R CLR R R-A → A SUB A,R R-A → R SUB R,A EM78M611E Status Affected None None T, P T, P None None None None None...
C Code Option Register EM78M611E 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: Mnemonic ID_8 ID_7 ID_6 ID_5 ID_4 ID_3 ID_2 ID_1 ID_0 OST_1 OST_0 Frequency /Protect...
Page 44
EM78M611E Universal Serial Bus Series Microcontroller Bit 4 (/R.S.) : D- Pull-up Resistance 0 : Connect Resistor Switch 1 : Disconnect Resistor Switch Bit 5 (/AD_Hold) : Halts the MCU during AD conversion 0 : Halts the MCU during AD conversion...