The contents of this specification are subject to change wi t h out f urt her notice. ELAN Microelectronics assumes
no responsibility concerning the accuracy, adequacy, or completeness of this specification. ELAN
Microelectronics makes no commitment to update, or to keep current the information and material contained in
this specification. Such information and material may change to conform to each confirmed order.
In no event shall ELAN Microelectronics be made responsible for any claims attributed to errors, omissions, or
other inaccuracies in the information or material contained in this specification. ELAN Microelectronics shall
not be liable for direct, indirect, special incidental, or consequential damages arising from the use of such
information or material.
The software (if any) described in this specification is furnished under a license or nondisclosure agreement, and
may be used or copied only in accordance with the terms of such agreement.
ELAN Microelectronics products are not intended for use in life support appliances, devices, or systems. Use of
ELAN Microelectronics product in such applications is not supported and is prohib ited.
NO PART OF THIS SPECIFICATION MAY BE REPRODUCED OR TRANSMITTED IN ANY FORM OR
BY ANY MEANS WITHOUT THE EXPRESSED WRITTEN PERMISSION OF ELAN MICROELECTRONICS.
12 Pad Diagram ............................................................................................................83
Specification Revision History
Doc. Version Revision Description Date
0.1 Initial Preliminary Version 2007/10/12
Product Specification (V0.1) 10.11.2007 • v
(This specification is subject to change without further notice)
Contents
vi •Product Specification (V0.1) 10.11.2007
(This specification is subject to change without further notice)
1 General Description
The EPH3600 isan 8-bit RISC MCU embedded with following:
10 bits SAR A/D converter with touch screen controller
One 16-bit general timer with capture and event counter functions,
Two 8-bit timers IR generator
EL timer Watchdog timer
SPI UART
One current D/A.
Moreover, the EPH3600 is equipped with a large size user RAM and program/data
memory. The MCU is most suitable for products involving handwriting recognition
application that requires high performance with low cost solution; such as SMS,
Stylus Remote Controller, mobile phones, handwriting input device, etc.
The MCU’s core is ELAN’s second generation RISC (RISC II) based IC. The core is
specifically designed to provide a low power consumption portable device. It
supports FAST, SLOW, and Idle mode, as well as Sleep mode for low power
consumption application.
EPH3600
RISC II Series Microcontroller
IMPORTANT NOTES
■ Do not use Register BSR (05h) Bit 7 ~ Bit 5
■ Do not use Register BSR1 (07h) Bit 7 ~ Bit 5
■ Do not use Special Register (04h)
■ Do not use Special Register (1Bh)
■ Do not use Special Register (1Ch)
■ Do not use Special Register (1Fh)
■ Do not use Special Register (32h)
■ Do not use Special Register (33h)
■ Do not use Special Register (37h)
■ Do not use Special Register (38h)
■ Do not use Special Register (39h)
■ Do not use Special Register (45h)
■ Do not use Special Register (46h)
■ Do not use Special Register (47h)
■ Do not use Special Register (4Fh)
■ Do not use Special Register (50h)
■ Do not use Special Register (51h)
■ Do not use Special Register (52h)
■ Do not use Special Register (53h)
■ Do not use JDNZ and JINZ at FSR1 (09h) special register
■ Do not use Register TABPTRH (0Dh) Bit 6
Product Specification (V0.1) 10.11.2007 • 1
(This specification is subject to change without further notice)
EPH3600
RISC II Series Microcontroller
1.1 Applications
Handwriting Recognition
Dictionary, Data Bank
Stylus Remote Controlller
2 Features
2.1 MCU Features
8-bit RISC MCU
8×8 multiplier with controllable signed or unsigned operation
Operating voltage and speed: 16MHz~11MHz @ 2.9V~3.6V, 10MHz @
2.2V~3.6V, 4MHz @ 1.6V~3.6V
One Instruction cycle time = 2 × System clock time
Program ROM addressing: 16K words maximum
Data ROM addressing: 256K words maximum
128 bytes un-banked RAM including special registers and common registers
32×128 bytes banked RAM
RAM stack has a maximum of 128 levels
Table Look Up function is fast and highly efficient when implemented with Repeat
instruction
Register-to-Register move instruction
Compare and Branch in one instruction (2 cycles)
Single Repeat function (256 repeat times maximum)
Decimal Add & Sub instruction
Full range Call and Jump capability (2 cycles)
2.2 Peripheral
One input port (Port A) and 24 gene ral I/O pins (Port B, Port C, Port D)
1-channel Speech Synthesizer
16-bit timer (Timer 0) with capture and ev ent counter functions
8-bit timer (Timer 1) with wake-up function
8-bit timer (Timer 2)
8-bit IR generator
2 •Product Specification (V0.1) 10.11.2007
(This specification is subject to change without further notice)
6-bit EL Timer output
A current D/A for speech application
8-bit Watchdog Timer
10 bits resolution SAR A/D converter with 6 channels general analog input and 2
Watchdog Timer with on-chip RC oscillator
MCU mode: Sleep Mode, Idle Mode, Slow Mode, and Fast Mode
Supports either RC oscillation or crystal oscillation system clock
EPH3600
RISC II Series Microcontroller
PLL can be turned on at Fast Mode, and controlled by PEN bit when MCU is in
Slow Mode or Idle Mode
MCU Wake-up function includes input wake up, Ti mer 1 wake up, touch panel
wake up, SPI wake up, and A/D wake up
MCU interrupt function includes Input Port interrupt, Touch Panel interrupt,
(This specification is subject to change without further notice)
EPH3600
RISC II Series Microcontroller
5 Pin Description
5.1 MCU System Pins (9 Pins)
Name
AVDD
VSS
VDD
VSS
RSTB I
TEST I Normally connected to VSS. Reserved for testing use.
OSCI/RC
OSCO
PLLC I
VREX I/O
I/O/P
Type
P
P
I
O
Description
Analog positive power supply. The range is 2.2V~3.6V. Connect to VSS
through capacitors (0.1µF).
Digital and Analog positive power supply. Range is 2.2V~3.6V. Connect
to VSS through capacitor (0.1µF).
System reset input with built-in pull-up resistor (100KΩ Typical).
Low: RESET asserted
High: RESET released
RC or Crystal selection by Code Option.
32768 Hz oscillator pins. Connect to VSS through capacitor (20pF)
RC oscillator connector pin. Connect to VDD through a resistor (2MΩ).
PLL capacitor connector pin. Connect to VSS through capacitor
(0.047µF).
External or internal reference voltage for A/D converter. Connect to VSS
through capacitor (0.1µF).
6 •Product Specification (V0.1) 10.11.2007
(This specification is subject to change without further notice)
5.2 I/O Ports (32 Pins)
EPH3600
RISC II Series Microcontroller
Name
Port A I
Port B
Port C
Port D
I/O/P
Type
I/O
I
O
I
O
O
O
O
O
I/O
O
O
I
I
I
I
I
I
I/O
I
O
I/O
I
I/O
Description
General Input port for special functions, i.e., Wake-up and
Interrupt
Bit 7: ON key input
Bits 6~0: Key matrix input pins
General Input/Output port
Bit 7: UART Rx pin
Bit 6: UART Tx pin
Bit 5: Event Counter/Capture input pin
Bit 4: EL CHOP output pin
Bit 3: EL CK output pin
Bit 2: IR output pin
Bit 1: Current D/A output pin
Bit 0: I/O pin
General Input/Output port
Bit 7: Touch screen X direction negative pin
Bit 6: Touch screen Y direction negative pin
Bit 5: Touch screen X direction positive pin & A/D input Channel 3
Bit 4: Touch screen Y direction positive pin & A/D input Channel 4
Bit 3: A/D input Channel 5
Bit 2: A/D input Channel 6
Bit 1: A/D input Channel 7
Bit 0: A/D input Channel 8
General Input/Output port
Bit 7: Serial data input pin
Bit 6: Serial data output pin
Bit 5: Serial clock Input/Output pin
Bit 4: /Slave Select pin
Bit 3~0: I/O pin
Product Specification (V0.1) 10.11.2007 • 7
(This specification is subject to change without further notice)
EPH3600
RISC II Series Microcontroller
6 Code Options
The Code Options are located at Address 0x000C~0x0013 of the Program ROM:
Port C.7 function selection bit : “XN for touch panel” “General I/O function” (Default)
Port C.6 function selection bit : “YN for touch panel” “General I/O function” (Default)
Port C.5 function selection bit : “XP for touch panel/ADIN3” “General I/O function” (Default)
Port C.4 function selection bit : “YP for touch panel/ADIN4” “General I/O function” (Default)
Port C.3 function selection bit : “ADIN5” “General I/O function” (Default)
Port C.2 function selection bit : “ADIN6” “General I/O function” (Default)
Port C.1 function selection bit : “ADIN7” “General I/O function” (Default)
Port C.0 function selection bit : “ADIN8” “General I/O function” (Default)
DAC function selection bits:
DAC Function Selection Port B.0 and Port B.1 Function
DAC is used Port B.1 is DAO for D/A, Port B.0 is General I/O
DAC usage is prohibited General I/O (Default)
Select UART standard baud rate : “PLL frequency is 9.83MHz” (Default)“PLL frequency is 14.745MHz”
Port A pull-h and DAC control bit: “PAPUR register, DAC bit ineffective” (Default)“PAPUR register, DAC bit effective”
EL Output TIming : “Output is from carrier gating with 128Hz and CKP” (Default) “CHOP output is directly from carrier”
8 •Product Specification (V0.1) 10.11.2007
(This specification is subject to change without further notice)
7 Function Description
7.1 Reset Function
A Reset can be caused by:
Power-on voltage detector reset and power-on reset
WDT timeout
RSTB pin pull low
VDD
EPH3600
RISC II Series Microcontroller
P o w e r-o n R e se t
RSTB
+
0.1uF
WDT Reset
Figure 7-1 On-chip Reset Circuit
7.1.1 Power-up and Reset Timing
VDD
RSTB
Tpwr
OSC
Twup
CPU Work
/Chip R eset
Twup1
Figure 7-2 Power-up and Reset Timing
Symbol Characteristics Min. Typical Max. Unit
Tpwr Oscillator start up time 100 226 300 ms
Twup CPU warm up time 260 340 550 ms
Twup1 CPU reset time 18 22 44 ms
Product Specification (V0.1) 10.11.2007 • 9
(This specification is subject to change without further notice)
EPH3600
RISC II Series Microcontroller
Status (R0Fh)
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
/TO /PD SGE SLE OV Z DC C
Bit 0 (C):Carry flag or inverse of Borrow flag (B) When in SUB operation, borrow flag is indicated by the inverse of carry
bit (B = /C)
Bit 1 (DC): Auxiliary carry flag
Bit 2 (Z): Zero flag
Bit 3 (OV): Overflow flag. Use in signed operation when Bit 6 carry into or borrow
from a signed bit (Bit 7).
Bit 4 (SLE): Computation result is less than or equal to zero (Negative value) after
a signed arithmetic. It is only affected by a HEX arithmetic instruction.
Bit 5 (SGE): Computation result is greater than or equal to zero (Positive value) after
a signed arithmetic. It is only affected by a HEX arithmetic instruction.
NOTE
1. When OV=1 after a signed arithmetic, user can check the SGE and SLE bits to
determine whether an overflow (carry into a signed bit) or underflow (borrow from
a signed bit) occurs.
OV=1 and SGE=1 → overflow occurs
OV=1 and SLE=1 → underflow occurs
2. When overflow occurs, you should clear the MSB of the Accumulator in order to
get the correct value.
When underflow occurs, you should set the MSB of the Accumulator in order to
get the correct value.
Example 1: ADD a positive value to another positive value, and ACC signed bit will
be affected.
MOV ACC, #60h ; Signed number +60h
ADD ACC, #70h ; +60h ADD WITH +70h
After instruction: ACC = 0D0h
SGE=1, means the result is greater than or equal to 0 (positive value)
OV=1, means the result is carry into a signed bit (Bit 7), overflow occurs.
Correct the signed bit: ACC = 50h (Clear the signed bit)
The actual result = +80h (OV=1) + 50h = +0D0h
Example 2: SUB a positive value from a negative value, and ACC signed bit will be
affected.
MOV ACC, #50h ; Signed number +50h
SUB ACC, #90h ; +50h SUB from –70h (Signed
number of 90h)
10 •Product Specification (V0.1) 10.11.2007
(This specification is subject to change without further notice)
EPH3600
RISC II Series Microcontroller
After instruction: ACC = 40h
SLE=1, means the result is less than or equal to 0 (negative value)
OV=1, means the result is borrow from a signed bit (Bit 7), underflow
occurs.
Correct the signed bit: ACC = 0C0h (Set the signed bit)
The actual result = –80h (OV=1) + 0C0h (signed number of 0C0h) = 40h
Bit 6 (/PD): Reset to 0 when entering SLEEP mode. Set to 1 by “WDTC” instruction,
power-on reset, or during a Reset pin low condition.
Bit 7 (/TO): Reset to 0 during WDT time out reset. Set to 1 by “WDTC” instruction,
entering SLEEP MODE, power-on reset, or during a Reset pin low
condition.
When a reset occurs, the special function register will be reset to its initial value
except for the /TO and /PD bits of the STATUS register.
Bit 7 (/TO) Bit 6 (/PD) Event
0 0 WDT time out reset from SLEEP mode
0 1 WDT time out reset (not SLEE P mode)
1 0 Reserved
1 1 Power on or RSTB pin low condition
Legend: “×” = unknown “−” = unimplemented, read as “0” “u” = unchanged “c” = value depending on the condition
1
Not a physical register.
2
Bit 0 (MS0) of RE (CPUCON) is reloaded from “INIM” bit of code option when the
MCU is reset.
3
If it is a power-on reset or RSTB pin is at low condition, the /TO bit and /PD bit of RF
(STATUS) are set to “1”. If it is a WDT time out reset, the /TO bit is cleared and /PD
bit is unchanged.
4
R1D, R1E are generated register RAM.
5
PAPUR can be used only by the code option setting.
5
12 •Product Specification (V0.1) 10.11.2007
(This specification is subject to change without further notice)
××=
××=
7.2 Oscillator System
EPH3600
RISC II Series Microcontroller
OSCI
OSCO
32.8kHz
RC/Crystal
Osc.
OSCSEL
of
Code Option
PLL
PEN
Fosc
A/D Clock
Factor
F
PLL
FSS
0
1
MS0
Fsystem
F
A/D
Figure 7-3 Oscillator System Function Block Diagram
7.2.1 32.768kHz Crystal or 32.8kHz RC
For the 32.8kHz RC oscillator, connect a 2MΩ pull-up resistor to OSCI pin and the
OSCO pin should be floating.
For the 32.768kHz Crystal oscillator, connect the crystal between OSCI and OSCO
pins. Then connect the OSCI and OSCO pins to ground through a 20pF capacitor.
VDD
OSCI
2Mohm
OSCO
OSCI
OSCO
32.768kHz Crystal
Oscillator
32.8kHz RC Oscillator
Figure 7-4 Crystal and RC Oscillator Circuit Diagram
7.2.2 Phase Locked Loop (PLL)
PLLF (R3Ch): Store the actual PLL frequency value. It is used to check whether
the PLL frequency is stable or not.
2
PFS (R20h): Target PLL frequency select register. System clock can be fine
tuned from 0.983MHz to 16MHz. The initial value of the PFS
register after a chip reset is set at “20h” (F
2
arg
FPLLFF
OSCactual
=2.097 MHz)
PLL
FPFSF
OSCett
Product Specification (V0.1) 10.11.2007 • 13
(This specification is subject to change without further notice)
Legend: “ √ ” = function is available if enabled “ × ” = function is Not available
1
Interrupt flag will be recorded but not executed until the MCU wakes up.
2
It is recommended to operate the A/D converter in Idle mode to lower the noise couple from
the MCU clock.
SLEEP IDLE SLOW FAST
Product Specification (V0.1) 10.11.2007 • 15
(This specification is subject to change without further notice)
EPH3600
RISC II Series Microcontroller
CPUCON (R0Eh):
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
PEN - - SMCANDSMIER GLINT MS1 MS0
Sleep Mode: When MS1 bit is set to ‘0’ and “SLEP” instruction is ex ecuted, the
Idle Mode: When MS1 bit is set to ‘1’ and “SLEP” instruction is executed, the
Slow Mode: When MS0 bit is set to ‘0’, the MCU will enter into Slow mode.
Fast Mode: When MS0 bit is set to ‘1’, the MCU will enter into Fast mode.
PLL enable: It is only effective when the MCU is in Idle mode or SLOW mode.
MCU Mode PEN Bit PLL On/Off
SLEEP × Off
IDLE/SLOW
FAST × On
MCU will enter into Sleep mode.
MCU will enter into Idle mode.
0 Off
1 On
F
PLL
Target+5%
Target
T arget-5 %
Ts
FAS T M O D E
Ts
MS0
System
clock
Target
32.768K
0m s
SLOW
MODE
0m s
0.244ms
Figure 7-7 MCU Operation Timing Diagram
NOTE
1. Switch from Slow mode to Fast mode at Time = 0ms
2. The System clock will switch to FPLL after 8 oscillation clocks, and the system
clock will then increase to about hundreds of kHz.
3. The PLL frequency will be stable (±5%) at Time = Ts (2ms ~ 5ms).
Time
Tim e
16 •Product Specification (V0.1) 10.11.2007
(This specification is subject to change without further notice)
7.4 Wake-up Function
EPH3600
RISC II Series Microcontroller
Mode
Device
I/O wake up √ √ × ×
Touch panel wake up √ √ × ×
Timer1 wake up × √ × ×
A/D wake up × √ × ×
SPI wake up √ (Slave) √ (Slave)× ×
Legend: √= Function is available if en abled ×= Function is NOT available
Sleep Idle Slow Fast
Flowchart:
Change PLL F requency
BSCPUCO N, PENTurn on the PLL
BCCPUCON, MS0Change CPU to Slow mode
M O V A ,# 1 2 2
M O V P F S ,A
Chan ge PLL fre quency to
8MHz
SCALL DLY5m s
BSCPUCO N, M S0
BCCPUCON, PEN
G o to M a in R o u tin e
Code Example:
Entry FAST mode
MOV A,#122 ;8MHz MOV PFS,A BS CPUCON,MS0
Entry SLOW mode
BC CPUCON,MS0
D e la y fo r 5 m s to w a it fo r
PLL to be stable
Change CPU to Fast m ode
T u rn o ff th e P L L
Entry IDLE mode BS CPUCON,MS1 SLEP NOP
Entry SLEEP mode BC CPUCON,MS1 SLEP NOP
Product Specification (V0.1) 10.11.2007 • 17
(This specification is subject to change without further notice)
EPH3600
RISC II Series Microcontroller
7.5 Interrupt
When an interrupt occurs, the GLINT bit of the CPUCON register is reset to 0, which
disables all interrupts, including Level 1 ~ Level 5. Setting this bit to 1 will enable all
un-mask interrupts.
LJMP MSTART ;(0X00) Initialize
LJMP INPTINT ;(0X02) Input Port and Touch Panel INT
LJMP CAPINT ;(0X04) Capture Input INT
LJMP SPHINT ;(0X06) Speech Timer INT
LJMP TIMERINT ;(0X08) Timer-0,1,2 INT
LJMP PERIPH ;(0X0A) Peripheral INT
PgmSEG CSEG 0X20
;--Push interrupt register PUSH: MOVPR StatusBuf,Status MOV AccBuf,A RET
;--POP interrupt register POP: MOV A,AccBuf
MOVRP Status,StatusBuf RETI
7.5.1 Input Port A Interrupt
1. Port A Interrupt (Falling edge trigger): Port A is used as external interrupt/wake-up
input.
2. Touch Panel Interrupt (Level trigger): When Port C.7 ~ Port C.4 (X+, X-, Y+ and Y-)
are connected to touch panel input pins and
touch panel is touched, PIRQB interrupt
occurs.
Code Example:
;===Input Port And Touch Panel Interrupt
INPTINT: S0CALL PUSH JBC ADCON,PIRQB,toTPINT TEST PAINTSTA JBC STATUS,F_Z,toPAINT SJMP POP
18 •Product Specification (V0.1) 10.11.2007
(This specification is subject to change without further notice)
;---Touch panel interrupt toTPINT:
: SJMP POP ;---Port A interrupt toPAINT: CLR PAINTSTA : SJMP POP
EPH3600
RISC II Series Microcontroller
7.5.2 Capture Input Interrupt
The Capture function is used to capture an input event at rising to falling edge, falling
to rising edge, rising to rising edge, or falling to falling edge. When every event input
edge is detected, a Capture interrupt occurs.
Code Example:
; === Capture Input Interrupt
CAPINT: S0CALL PUSH JBS INTSTA,CPIF,toCAPINT SJMP POP
;---Capture input interrupt toCAPINT: BS INTSTA,CPIF : SJMP POP
7.5.3 Speech Timer Interrupt
Speech Timer is an 11-bit timer for time counting. When the counting value of the
Speech Timer underflows, an interrupt occurs and the SPHTRL value will be reloaded
to counting value.
Code Example:
; === Speech Timer Interrupt
SPHINT: S0CALL PUSH JBS PHTCON,SPHTI,toSPHINT SJMP POP
; --- To speech timerinterrupt toSPHINT: BC SPHTCON,SPHTI : SJMP POP
7.5.4 Timer 0, Timer 1, and Timer 2 Interrupts
1. Timer 0 Interrupt: Timer 0 is a 16-bit timer for general time counting. When the
counting value is larger than TRL0H : TRL0L value, a Timer 0
interrupt occurs.
2. Timer 1 Interrupt: Timer 1 is an 8 bit-timer for time counting and wake-up function.
When the counting value of Timer 1 underflows, an interrupt
occurs and the TRL1 value will be reloaded to counting value.
3. Timer 2 Interrupt: Timer 2 is an 8-bit timer for time counting. When the counting
value of Timer 2 underflows, an interrupt occurs and the TRL2
value will be reloaded to counting value.
signal to digital output bits. When the conversion is completed,
an A/D interrupt occurs.
;--A/D interrupt toADINT: BC INTSTA,ADIF : SJMP POP ;--UART Receiving Error Interrupt toUERRINT: BC INTSTA,UERRI : SJMP POP ;--UARTTx Buffer FullInterrupt toUTXINT: BC INTSTA,UTXI : SJMP POP ;--UARTRx Buffer FullInterrupt toURXINT: BC INTSTA,URXI : SJMP POP ;--SPI Interrupt toSPINT: BC SPISTA,SRBFI : SJMP POP
8K Words × 2 Segments = 16K Words
Address Segment
0000h
|
000Bh
000Ch
|
0013h
0014h
|
001Fh
0020h
|
3FFFh
20 •Product Specification (V0.1) 10.11.2007
Interrupt Vector
(12 words)
Code Option
(8 words)
Test Program
(12 words)
Segment 0
|
Segment 1
(This specification is subject to change without further notice)