The EM78860 is an 8-bit RISC type microprocessor with low power , high speed CMOS technology .
Integrated onto a single chip are on_chip watchdog (WDT) , RAM , ROM , programmable real time clock /
counter , internal interrupt , power down mode , LCD driver and tri-state I/O . The EM78860 provides a single
chip solution to design a message display .
FEATURES
CPU
• Operating voltage range : 2.5V~5.5V
• 16Kx13 on chip ROM
• 2.8Kx8 on chip RAM
• Up to 32 bi-directional tri-state I/O ports
• 8 Level stack for subroutine nesting
• 8-bit real time clock/counter (TCC)
• Two sets of 8 bit counters can be interrupt sources
• Selective signal sources and with overflow interrupt
• Programmable free running on chip watchdog timer
• 99.9% single instruction cycle commands
• Four modes (internal clock 3.679MHz, external 32.768KHz)
1. Sleep mode : CPU and 3.679MHz clock turn off, 32.768KHz clock turn off
2. Idle mode : CPU and 3.679MHz clock turn off, 32.768KHz clock turn on
3. Green mode : 3.679MHz clock turn off, CPU and 32.768KHz clock turn on
4. Normal mode : 3.679MHz clock turn on , CPU and 32.768KHz clock turn on
• Low battery detector
• Input port wake up function
• 8 interrupt source , 4 external , 3 internal
• 100 pin QFP or chip
• Port key scan function
• Port interrupt , pull high and open drain functions
• Clock frequency 32.768KHz externally
EM78860
8-BIT MICRO-CONTROLLER
LCD
• LCD operation voltage chosen by software
• Common driver pins : 16
• Segment driver pins : 60
• 1/4 bias
• 1/8,1/16 duty
APPLICATION
1. adjunct units
2. data bank
* This specification are subject to be changed without notice.
* This specification are subject to be changed without notice.
ROM
RAM
I/O PORT
INPUT PORT
LCD
LATCH
& DRIVER
I/O PORT
INPUT PORT
LCD
OUTPUT
6.24.1998
2
Page 3
EM78860
8-BIT MICRO-CONTROLLER
XINXOUT
Oscillator/Timing
Control
Control of
sleep and
wake-up
on I/O ports
2.5K RAM
R1(TCC)
WDT Timer
Prescaler
GENERAL
RAM
RAM
R4
IOC6
Interrupt
Controller
DATA & CONTROL BUS
PORT6
R6
P60~P67
PORT7
IOC7
P70~P77
ROM
Instruction
register
Instruction
Decoder
R7
PORT8
IOC8
P80~P87
R2
R3
R5
R8
PORT9
IOC9
P90~P97
Stack
ALU
ACC
R9
PIN DESCRIPTIONS
SymbolTypeFunction
VDDPOWERPower
GNDPOWERGound
XTinIInput pin for 32.768 kHz oscillator
XToutOOutput pin for 32.768 kHz oscillator
PLLCIPhase loop lock capacitor, connect a capacitor 0.01µ to 0.047µ with GND
COM0..COM7OCommon driver pins of LCD drivers
COM8..COM15 O (PORT6)
SEG0..SEG43Segment driver pins of LCD drivers
SEG44..SEG51O (PORT8)
SEG52..SEG59O (PORT9)PORT9 AS FUNCTION KEY CAN WAKE UP WATCHDOG.
INT0PORT7(0)PORT7(0)~PORT7(3) signal can be interrupt signals.
INT1PORT7(1)
INT2PORT7(2)
INT3PORT7(3)
P7.0~P7.7PORT7PORT 7 can be INPUT or OUTPUT port each bit.
Internal Pull high function.
Key scan function.
Bit6,7 open drain function.
P6.0~P6.7PORT6PORT 6 can be INPUT or OUTPUT port each bit.
And shared with Common signal.
P8.0~P8.7PORT8PORT 8 can be INPUT or OUTPUT port each bit.
And shared with Common signal.
P9.0~P9.7PORT9PORT 9 can be INPUT or OUTPUT port each bit.
And shared with Common signal.
TESTITest pin into test mode , normal low
RESETI
* This specification are subject to be changed without notice.
6.24.1998
3
Page 4
FUNCTION DESCRIPTION
Operational Registers
R0 (Indirect Addressing Register)
R0 is not a physically implemented register. It is useful as indirect addressing pointer. Any instruction using
R0 as register actually accesses data pointed by the RAM Select Register (R4).
R1 (TCC)
• Increased by an internal signal edge applied to TCC , or by the instruction cycle clock.
• Written and read by the program as any other register.
R2 (Program Counter)
• The structure is depicted in Fig. 4.
• Generates 16Kx13 on-chip ROM addresses to the relative programming instruction codes.
• ”JMP” instruction allows the direct loading of the low 10 program counter bits.
• “CALL” instruction loads the low 10 bits of the PC, PC+1, and then push into the stack..
• “RET’’ (“RETL k”, “RETI”) instruction loads the program counter with the contents at the top of stack.
• ”MOV R2,A” allows the loading of an address from the A register to the PC, and the ninth and tenth bits are
cleared to “0'’.
• “ADD R2,A” allows a relative address be added to the current PC, and contents of the ninth and tenth bits are
cleared to “0'’.
• “TBL” allows a relative address be added to the current PC, and contents of the ninth and tenth bits don’t
change.
• The most significant bit (A10~A13) will be loaded with the content ofbit PS0~PS3 in the status register (R5)
upon the execution of a “JMP’’, “CALL’’, “ADD R2,A’’, or “MOV R2,A’’ instruction.
• User can use PAGE instruction to change page. To maintain program page by user. Otherwise, user can use
far jump (FJMP) or far call (FCALL) instructions to program user's code. And the program page is maintained
by EMC's complier. It will change user's program by inserting instruction within program.
• Bit4~7 : unused
R6 ~R9 ( Port 6 ~ Port 9)
• Five 8-bit I/O registers.
RA
7654 3210
IDLE/358E/LPD/LOW-BAT0000
• Bit0 ~ Bit3 unused, please set to "0"
* This specification are subject to be changed without notice.
6.24.1998
6
Page 7
EM78860
t
8-BIT MICRO-CONTROLLER
• Bit4(Read Only)(Low battery signal) 0/1 = Battery voltage is low/Normal .
If the battery voltage is under 3.6V then sends a ‘0’ signal to RA register bit4 or a ‘1’ signal to this Bit if VDD
is over 3.8V.
• Bit5(read/Write)(Low battery detect enable)
0/1 = low battery detect DISABLE/ENABLE.
The relation between /LPD,/POVD and /LOW_BAT can see Fig6.
The relation between 32.768K and 3.679M can see Fig7.
PLL
32.768K
3.679M
/358E
switch
1
To system clock
0
Fig7. The relation between 32.768K and 3.679K .
• Bit7 IDLE: sleep mode selection bit
0/1=sleep mode/IDLE mode. This bit will decide SLEP instruction which mode to go.
These IDLE mode can be waken up by TCC clock or Watch Dog or PORT9 and run from “SLEP” next
instruction.
These SLEEP mode can be waken up by Watch Dog or PORT9 and run from address “00”.
PAGE1 : 8 bit up-counter (COUNTER1) preset and read out register . ( write = preset ) . After a interruption
, it will count from “00”.
IOCC (LCD DATA)
PAGE0 : Bit7 ~ Bit0 = LCD RAM data register
PAGE1 : 8 bit up-counter (COUNTER2) preset and read out register. (write=preset) After a interruption, it will
count from "00".
IOCD (Pull-high Control Register)
7654 32 10
PH7PH6PH5PH4PH3PH2PH1PH0
• Bit 0 ~ 7 (/PH#) Control bit used to enable the pull-high of PORT7(#) pin.
1: Enable internal pull-high
0: Disable internal pull-high
* This specification are subject to be changed without notice.
6.24.1998
10
Page 11
EM78860
8-BIT MICRO-CONTROLLER
7654 32 10
P9SHP9SLP6SBias3Bias2Bias10SC
• Bit 0 :SC (SCAN KEY signal ) 0/1 = disable/enable. Once you enable this bit , all of the LCD signal will have
a low pulse during a common period. This pulse has 30us width. Please use the procedure to implement the
key scan function.
a. set port7 as input port
b. set IOCD page0 port7 pull high
c. enable scan key signal
d. Once push a key . Set RA(6)=1 and switch to normal mode.
e. Blank LCD. Disable scan key signal.
f. Set P6S =0. Port6 sent probe signal to port7 and read port7. Get the key.
g. Note!! A probe signal should be delay a instruction at least to another probe signal.
h. Set P6S =1. Port6 as LCD signal. Enable LCD.
P63
P62
P61
P60
com2
KEY5
KEY1
KEY2
KEY3
KEY4
P73P72P71P70
Fig.8. Key scan circuit
VDD
V1
V2
V3
V4
VLCD
GND
seg
30µs
Fig.9. Key scan signal
* This specification are subject to be changed without notice.
VDD
V1
V2
V3
V4
VLCD
GND
6.24.1998
11
Page 12
EM78860
8-BIT MICRO-CONTROLLER
• Bit 1 : zero
• Bit 2~4 (Bias1~Bias3) Control bits used to choose LCD operation voltage .
* This specification are subject to be changed without notice.
6.24.1998
12
Page 13
EM78860
8-BIT MICRO-CONTROLLER
TCC/WDT Prescaler
There is an 8-bit counter available as prescaler for the TCC or WDT. The prescaler is available for the TCC
only or WDT only at the same time.
• An 8 bit counter is available for TCC or WDT determined by the status of the bit 3 (PAB) of the CONT
register.
• See the prescaler ratio in CONT register.
• Fig. 10 depicts the circuit diagram of TCC/WDT.
• Both TCC and prescaler will be cleared by instructions which write to TCC each time.
• The prescaler will be cleared by the WDTC and SLEP instructions, when assigned to WDT mode.
• The prescaler will not be cleared by SLEP instructions, when assigned to TCC mode.
TCC
(32K CLK)
CLK(=Fosc/2)
TE
WDT
WDTE
Data Bus
0
M
1
U
X
TS
0
M
U
X
1
PAB
1
0
M
U
X
PAB
8-bit Counter
8-to-1 MUX
MUX
SYNC
2 cycle
TCC(R1)
TCC overflow interrupt
PSR0~PSR2
PAB
Fig. 10 Block diagram of TCC WDT
I/O Ports
The I/O registers, Port 6 ~ Port 9, are bi-directional tri-state I/O ports. Port 7 can be pulled-high internally by
software control. The I/O ports can be defined as “input” or “output” pins by the I/O control registers (IOC6 ~
IOC9 ) under program control. The I/O registers and I/O control registers are both readable and writable. The
I/O interface circuit is shown in Fig.11.
* This specification are subject to be changed without notice.
WDT timeout
6.24.1998
13
Page 14
PORT
EM78860
8-BIT MICRO-CONTROLLER
PCRD
PR
CLK
CL
PR
CLK
CL
D
D
PCWR
IOD
PDWR
PDRD
Q
Q
Q
Q
0
M
U
1
X
Fig. 11 The circuit of I/O port and I/O control register
RESET and Wake-up
The RESET can be caused by
(1) Power on reset, or Voltage detector
(2) WDT timeout. (if enabled and in GREEN or NORMAL mode)
Note that only Power on reset, or only Voltage detector in Case(1) is enabled in the system by CODE Option bit.
If Voltage detector is disabled, Power on reset is selected in Case (1). Refer to Fig. 12.
V
DD
Code
Option
Power-on
Reset
Voltage
Detector
/Enable
Oscillator
1
0
DQ
CLK
CLR
M
U
X
CLK
WDTE
WDT timeout
WDT
Fig. 12 Block diagram of Reset of controller
* This specification are subject to be changed without notice.
18 ms
RESET
6.24.1998
14
Page 15
8-BIT MICRO-CONTROLLER
Once the RESET occurs, the following functions are performed.
• The oscillator is running, or will be started.
• The Program Counter (R2) is set to all “0”.
• When power on, the upper 3 bits of R3 and the upper 2 bits of R4 are cleared.
The controller can be awakened from SLEEP mode or IDLE mode (execution of “SLEP” instruction, named as
SLEEP MODE or IDLE mode) by (1)TCC time out (IDLE mode only) (2) WDT time-out (if enabled) or, (3)
external input at PORT9 . The three cases will cause the controller wake up and run from next instruction in IDLE
mode , reset in SLEEP mode . After wake-up , user should control WATCH DOG in case of reset in GREEN
mode or NORMAL mode. The last two should be open RE register before into SLEEP mode or IDLE mode .
The first one case will set a flag in RF bit0 . And it will go to address 0x08 when TCC generate a interrupt .
Interrupt
The chip has internal interrupts which are falling edge triggered, as followed : TCC timer overflow interrupt
(internal) , two 8-bit counters overflow interrupt .
If these interrupt sources change signal from high to low , then RF register will generate ‘1’ flag to corresponding
register if you enable IOCF register.
RF is the interrupt status register which records the interrupt request in flag bit. IOCF is the interrupt mask
register. Global interrupt is enabled by ENI instruction and is disabled by DISI instruction. When one of the
interrupts (when enabled) generated, will cause the next instruction to be fetched from address 008H. Once in
the interrupt service routine the source of the interrupt can be determined by polling the flag bits in the RF register.
The interrupt flag bit must be cleared in software before leaving the interrupt service routine and enabling
interrupts to avoid recursive interrupts.
There are four external interrupt pins including INT0 , INT1 , INT2 , INT3 . And four internal counter interrupt
available.
External interrupt INT0 , INT1 , INT2 , INT3 signals are from PORT7 bit0 to bit3 . If IOCF is enable then these
signal will cause interrupt , or these signals will be treated as general input data .
After reset, the next instruction will be fetched from address 000H and the instruction inturrept is 001H and the
hardware inturrept is 008H.
TCC will go to address 0x08 in GREEN mode or NORMAL mode after time out. And it will run next
instruction from “SLEP” instruction and then go to address 0x08 in IDLE mode . These three cases will
set a RF flag.
* This specification are subject to be changed without notice.
6.24.1998
15
Page 16
8-BIT MICRO-CONTROLLER
It is very important to save ACC,R3 and R5 when processing a interruption.
Instruction set has the following features:
(1). Every bit of any register can be set, cleared, or tested directly.
(2). The I/O register can be regarded as general register. That is, the same instruction can operates on I/O register.
The symbol “R” represents a register designator which specifies which one of the 64 registers (including
operational registers and general purpose registers) is to be utilized by the instruction. Bits 6 and 7 in R4
determine the selected register bank. “b’’ represents a bit field designator which selects the number of the
bit, located in the register “R’’, affected by the operation. “k’’ represents an 8 or 10-bit constant or literal
value.
INSTRUCTION BINARYHEXMNEMONICOPERATIONSTATUS
AFFECTED
00000 0000 00000000NOPNo OperationNone
00000 0000 00010001DAADecimal Adjust AC
00000 0000 00100002CONTWA CONTNone
00000 0000 00110003SLEP0 WDT, Stop oscillatorT,P
00000 0000 01000004WDTC0 WDTT,P
00000 0000 rrrr000rIOW RA IOCRNone
00000 0001 00000010ENIEnable InterruptNone
00000 0001 00010011DISIDisable InterruptNone
00000 0001 00100012RET[Top of Stack] PCNone
00000 0001 00110013RETI[Top of Stack] PC
The chip can drive LCD directly and has 60 segments and 16 commons that can drive 60*16 dots totally. LCD
block is made up of LCD driver , display RAM, segment output pins , common output pins and LCD operating
power supply pins.
Duty , bias , the number of segment , the number of common and frame frequency are determined by LCD mode
register . LCD control register.
The basic structure contains a timing control which uses the basic frequency 32.768KHz to generate the proper
timing for different duty and display access. RE register is a command register for LCD driver, the LCD display
( disable, enable, blanking) is controlled by LCD_C and the driving duty and bias is decided by LCD_M and the
display data is stored in data RAM which address and data access controlled by registers RC and RD.
32.768KHz
RC(address)
LCD timing control
RE(LCD_C,LCD_M)
LCD duty control
RD(data)
RAM
Display data control
Bias control
Vdd-Vlcd
LCD commom control
COM
Fig13. LCD DRIVER CONTROL
* This specification are subject to be changed without notice.
LCD SEGMENT control
SEG
6.24.1998
18
Page 19
LCD Driver Control
RE(LCD Driver Control)(initial state “00000000”)
765 4 321 0
-----LCD_C2LCD_C1LCD_M
• Bit0 (LCD_M):LCD_M decides the methods, including duty, bias, and frame frequency.
• Bit1~Bit2 (LCD_C#):LCD_C# decides the LCD display enable or blanking. change the display duty must set
Bit 0 ~ Bit 6 select LCD Display RAM address up to 120.
LCD RAM can be write whether in enable or disable mode and read only in disable mode.
• IOCC(LCD Display data) : Bit 0 ~ Bit 8 are LCD data.
LCD COM and SEG signal
• COM signal : The number of COM pins varies according to the duty cycle used, as following: in 1/8 duty mode
COM8 ~ COM15 must be open. in 1/16 duty mode COM0 ~ COM15 pins must be used.
* This specification are subject to be changed without notice.
6.24.1998
19
Page 20
EM78860
8-BIT MICRO-CONTROLLER
COM0 COM1 COM2 COM3COM4 COM5COM6 COM7 COM8..COM15
1/8oooo o o oox..x
1/16ooooooooo..o
x:open,o:select
• SEG signal: The 60 segment signal pins are connected to the corresponding display RAM address 00h to 3Bh.
The high byte and the low byte bit7 down to bit0 are correlated to COM15 to COM0 respectively .
When a bit of display RAM is 1, a select signal is sent to the corresponding segment pin, and when the bit is
0 , a non-select signal is sent to the corresponding segment pin.
• COM, SEG and Select/Non-select signal is shown as following:
frame
com0
com1
com2
seg
seg
com0 ... com7
VDD
V1
V2
V3
VLCD
VDD
V1
V2
V3
VLCD
VDD
V1
V2
V3
VLCD
VDD
V1
V2
V3
VLCD
dark
VDD
V1
V2
V3
VLCD
light
Fig.14 Lcd wave 1/4 bias, 1/8 duty
* This specification are subject to be changed without notice.
6.24.1998
20
Page 21
8-BIT MICRO-CONTROLLER
LCD Bias control
IOCE (Bias Control Register)
76543210
Bias3Bias2Bias1
Bit 2~4 (Bias1~Bias3) Control bits used to choose LCD operation voltage .
LCD operate voltageVop (VDD 5V)VDD=5V
0000.60 V
0010.66 V
0100.74 V
0110.82 V
1000.87 V
1010.93 V
1100.96 V
1111.00 V
DD
DD
DD
DD
DD
DD
DD
DD
3.0 V
3.3 V
3.7 V
4.0 V
4.4 V
4.7 V
4.8 V
5.0 V
EM78860
• Bit 5~7 unused
Vdd
Vss
Vop=Vdd-Vlcd
Vop
Bias3˜1
R=1K
R
V1
R
V2
000
001
010
011
100
101
110
111
MUX
R
V3
R
Vlcd
:
Fig.16 LCD bias circuit
8.2R
0.4R
0.4R
0.3R
0.3R
0.2R
0.1R
0.1R
Vop=Vdd-Vlcd
R=1K
* This specification are subject to be changed without notice.
6.24.1998
21
Page 22
8-BIT MICRO-CONTROLLER
ABSOLUTE MAXIMUM RATINGS
ItemsSym.ConditionRatingUnit
EM78860
Temperature under biasV
Input voltageV
Operating temperature rangeT
DD
IN
A
-0.3 to 6V
- 0.5 to VDD+ 0.5V
0 to 70°C
DC ELECTRICAL CHARACTERISTICS
(T
= 0°C~70°C, V
A
Parameter Sym.ConditionMin. Typ. Max.Unit
Input Leakage CurrentI
for input pins
Input Leakage CurrentI
for bi-directional pins
Input High VoltageV
Input Low voltageV
Input High ThresholdV
Voltage
Input Low ThresholdV
Voltage
Clock Input High VoltageV
Clock Input Low VoltageV
Key scan Input High VoltageVHscan Port6 for key scan3.5V
Key scan Input Low VoltageVLscan Port6 for key scan1.5V
Output High VoltageV
(port5,6,7,8)
(port9)I
Output Low VoltageV
(port5,6,7,8)
(port9)I
Com Voltage dropV
Segment Voltage dropV
LCD Drive ReferenceV
Voltage
Pull-high CurrentI
Power Down CurrentI
IDLE mode currentI
Low Clock CurrentI
Operating Supply CurrentI
= 5V±5%; VSS = 0V)
DD
IL1
IL2
IH
IL
IHT
ILT
IHX
ILX
OH1
OL1
COM
SEG
LCD
PH
SB1
SB-1
SB2
CC
V
= VDD, V
IN
VIN = V
DD
, V
SS
SS
±1µA
± 1µA
2.5V
0.8V
RESET, TCC, RDET12.0V
RESET, TCC, RDET10.8V
OSCI3.5V
OSCI1.5V
I
= ±1.6 mA2.4V
OH
= ±6 mA2.4V
OH
IOL = ±1.6 mA0.4V
= ±6 mA0.4V
OL
I O = ±50 µA--2.9V
I O = ±50 µA--3.8V
Contrast adjustment
Pull-high active input pin at V
SS
-50-100 -240µA
All input and I/O pin at VDD,3µA
output pin floating, WDT disabled
All input and I/O pin at VDD, output pin80µA
floating, WDT disabled,LCD enable
CLK=32.768 KHz, All input and I/O pin90µA
at V
* This specification are subject to be changed without notice.
6.24.1998
23
Page 24
TIMING DIAGRAMS
AC Test Input/Output Waveform
EM78860
8-BIT MICRO-CONTROLLER
2.4
2.0
0.8
0.45
2.0
0.8
AC Testing : Input are driven at 2.4V for logic "1", and 0.45V for logic "0". Timing
measurements are made at 2.0V for logic "1", and 0.8V for logic "0".
RESET Timing
NOP
Instruction 1
Executed
TCC Input Timing
CLK
TCC
Tdrh
Tins
Ttcc
Fig.17 AC timing
* This specification are subject to be changed without notice.
6.24.1998
24
Page 25
APPLICATION CIRCUIT
kEYPAD
EMC78860 LCD
I/O
EM78860
COMMON
SEGMENT
VDD
LOBAT
/RESET
TEST
GND
XIN
XOUT
PLLC
32768
BATTERY
DETECTOR
30p
30p
0.01µ
EM78860
8-BIT MICRO-CONTROLLER
CD POWER
SUPPLY
POWER ON
RESET
* This specification are subject to be changed without notice.
6.24.1998
25
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.