The EM78P860 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 EM78P860 provides a single chip solution
to design a message display .
II.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
* This specification is subject to be changed without notice.4.17.2000
RAM
I/O PORT
INPUT PORT
LCD
LATCH
& DRIVER
I/O PORT
INPUT PORT
LCD
OUTPUT
2
Page 3
EM78P860
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
Fig. 2 Functional block diagram2
VI.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..COM15O (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.
P6.0~P6.7PORT6PORT 6 can be INPUT or OUTPUT port each bit.
P8.0~P8.7PORT8PORT 8 can be INPUT or OUTPUT port each bit.
P9.0~P9.7PORT9PORT 9 can be INPUT or OUTPUT port each bit.
TESTITest pin into test mode , normal low
RESETI
Internal Pull high function.
Key scan function.
Bit6,7 open drain function.
And shared with Common signal.
And shared with Common signal.
And shared with Common signal.
* This specification is subject to be changed without notice.4.17.2000
3
Page 4
8 -BIT MICRO-CONTROLLER
VII. FUNCTION DESCRIPTION
VII.1Operational Registers
1. 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).
2. 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.
3. 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.
EM78P860
CALL
A13 A12 A11 A10A9 A8
PC
0000 PAGE0 0000~03FF
A7~A0Stack 1
RET
RETTL
RETI
Stack 2
Stack 3
Stack 4
Stack 5
0000 PAGE1 0400~07FF
Stack 6
Stack 7
Stack 8
0000 PAGE2 0800~0BFF
1110 PAGE14 3800~3BFF
1111 PAGE15 3C00~3FFF
Fig. 4 Program counter organization
* This specification is subject to be changed without notice.4.17.2000
• 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
7. R6 ~R9 ( Port 6 ~ Port 9)
• Five 8-bit I/O registers.
8. RA
7654321 0
IDLE/358E/LPD/LOW-BAT0000
• Bit0 ~ Bit3 unused, please set to "0"
* This specification is subject to be changed without notice.4.17.2000
6
Page 7
EM78P860
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 Fig 6.
Vdd
s2
1 on
0 off
1 on
Vref
s2
1 on
0 off
Fig. 6 The relation between /LPD,/POVD
• Bit6(read/write)(PLL enable signal)
0/1=DISABLE/ENABLE
The relation between 32.768K and 3.679M can see Fig. 7.
/POVD
/LPD
1 on
+
-
to Low bat
To rese
/LPD
PLL
32.768K
3.679M
/358E
switch
1
To system clock
0
Fig. 7 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”.
* This specification is subject to be changed without notice.4.17.2000
10
Page 11
8 -BIT MICRO-CONTROLLER
8. IOCE (Bais, PLL Control Register)
PAGE0:
7654321 0
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
KEY5
KEY1
KEY2
KEY3
KEY4
EM78P860
P73P72P71P70
Fig. 8 Key scan circuit
VDD
V1
com2
seg
30µs
V2
V3
V4
VLCD
GND
VDD
V1
V2
V3
V4
VLCD
GND
Fig. 9 Key scan signal
* This specification is subject to be changed without notice.4.17.2000
11
Page 12
EM78P860
8 -BIT MICRO-CONTROLLER
• Bit 1 : zero
• Bit 2~4 (Bias1~Bias3) Control bits used to choose LCD operation voltage .
* This specification is subject to be changed without notice.4.17.2000
12
Page 13
8 -BIT MICRO-CONTROLLER
VII.3 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.
EM78P860
TCC
(32K CLK)
CLK(=Fosc/2)
TE
WDT
WDTE
0
M
1
U
X
TS
0
1
PAB
1
M
0
U
X
PAB
M
U
X
WDT timeout
Fig. 10 Block diagram of TCC WDT
8-bit Counter
8-to-1 MUX
MUX
SYNC
2 cycle
Data Bus
TCC(R1)
TCC overflow interrupt
PSR0~PSR2
PAB
VII.4I/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 is subject to be changed without notice.4.17.2000
13
Page 14
PORT
VII.5 RESET and Wake-up
8 -BIT MICRO-CONTROLLER
PCRD
PR
D
Q
CLK
Q
CL
PR
Q
CLK
Q
CL
0
M
U
1
X
Fig. 11 The circuit of I/O port and I/O control register
PCWR
D
PDWR
PDRD
EM78P860
IOD
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
WDTE
Power-on
Reset
Voltage
Detector
/Enable
WDT
Oscillator
1
0
M
U
X
WDT timeout
DQ
CLK
CLR
18 ms
RESET
CLK
Fig. 12 Block diagram of Reset of controller
* This specification is subject to be changed without notice.4.17.2000
14
Page 15
EM78P860
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 .
VII.6 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 is subject to be changed without notice.4.17.2000
15
Page 16
EM78P860
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.
* This specification is subject to be changed without notice.4.17.2000
17
Page 18
8 -BIT MICRO-CONTROLLER
VII.8CODE Option Register
The chip has one CODE option register which is not part of the normal program memory. The option bits
cannot be accessed during normal program execution.
7654321 0
------/POVD-
• Bit 0 : unsed
• Bit 1 ( /POVD ) : Power on voltage detector.
0 : enable
1 : disable
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 IOCB and IOCC.
32.768KHz
EM78P860
IOCB
LCD timing control
RE(LCD_C,LCD_M)
Bias control
Vdd-Vlcd
LCD duty control
LCD commom control
COM
Fig. 13 LCD DRIVER CONTROL
IOCC
RAM
Display data control
LCD SEGMENT control
SEG
* This specification is subject to be changed without notice.4.17.2000
18
Page 19
EM78P860
8 -BIT MICRO-CONTROLLER
1. LCD Driver Control
RE(LCD Driver Control)(initial state “00000000”)
7654321 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
the LCD_C to “00”.
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.
3.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 is subject to be changed without notice.4.17.2000
• 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 is subject to be changed without notice.4.17.2000
20
Page 21
EM78P860
8 -BIT MICRO-CONTROLLER
Fig. 15 Lcd wave 1/4 bias, 1/16 duty
* This specification is subject to be changed without notice.4.17.2000
21
Page 22
4. LCD Bias control
IOCE (Bias Control Register)
7654321 0
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
• Bit 5~7 unused
EM78P860
8 -BIT MICRO-CONTROLLER
3.0 V
3.3 V
3.7 V
4.0 V
4.4 V
4.7 V
4.8 V
5.0 V
Fig. 16 LCD bias circuit
* This specification is subject to be changed without notice.4.17.2000
22
Page 23
EM78P860
8 -BIT MICRO-CONTROLLER
VIII. ABSOLUTE MAXIMUM RATINGS
RatingSym.ValueUnit
DC supply voltageV
Input voltageV
Operating temperature rangeT
DD
IN
A
-0.3 to 6V
-0.5 to VDD+0.5V
0 to 70°C
IX.DC ELECTRICAL CHARACTERISTICS
(TA= 0°C~70°C, V
ParameterSym.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 = VDD, 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,1µA
output pin floating, WDT disabled
All input and I/O pin at VDD, output pin15µA
floating, WDT disabled,LCD enable
CLK=32.768 KHz, All input and I/O pin50µA
at V
* This specification is subject to be changed without notice.4.17.2000
24
Page 25
XI. TIMING DIAGRAMS
AC Test Input/Output Waveform
EM78P860
8 -BIT MICRO-CONTROLLER
2.4
0.45
2.0
0.8
TEST PONITS
2.0
0.8
AC Testing : Input is 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 (CLK="0")
NOP
CLK
/RESET
Tdrh
Instruction 1
Executed
TCC Input Timing (CLK="0")
Tins
CLK
TCC
Ttcc
Fig. 17 AC timing
* This specification is subject to be changed without notice.4.17.2000
25
Page 26
XII. APPLICATION CIRCUIT
kEYPAD
I/O
EM78P860
EMC78860 LCD
COMMON
SEGMENT
VDD
LOBAT
/RESET
TEST
GND
XIN
XOUT
PLLC
EM78P860
8 -BIT MICRO-CONTROLLER
CD POWER
SUPPLY
POWER ON
RESET
32768
BATTERY
DETECTOR
30p
30p
0.01µ
Fig. 18 Application circuit for data bank
* This specification is subject to be changed without notice.4.17.2000
26
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.