EM785830AA
8-BIT MICRO-CONTROLLER
Version 1.6
ELAN MICROELECTRONICS CORP.
No. 12, Innovation 1
st
RD., Science-Based Industrial Park
Hsin Chu City, Taiwan
TEL: (03) 5639977
FAX: (03)5630118
Version History
Specification Revision History
Version
EM785830AA
1.0
1.1
1.2
1.3
1.4
1.5
Content
Initial version
Add 17.9MHz main CLK
Add code option “ADIS” to determine AD channel
1. Change “ADIS” define
2. ADD eFHP5830A, eFHP5830AA, and eFHP5830BA package
1. ADD the description about ADC’s offset voltage
1. Modify stack level from 16 to 12
2. Modify program ROM size from 4K to 16K
3. Rename “eFH5830A” to eFH5830AA
4. Remove IDLE mode
5. Change AD channel from 8 to 4
6. Remove 17.9MHz main CLK
1.Rename from eFH5830AA to EM785830AA
1.6
Relative to EM785830AA’s ROM-less, OTP and mask:
ROM-less
ICE5830
OTP
EM78P5830A
EM78P5830AA
Mask
EM785830AA
Difference between EM785830AA/EM78P5830A/EM78P5830AA
Some differences are between EM78P5830A, EM78P5830AA and EM78P5830BA, these difference are list at next table:
EM785830AA
ADIS
(code option)
VERSEL
(code option)
PHO
(code option)
MS
(
IOCC page1
bit0)
AD resolution
Stack number
Un-effect
(4 channel only)
Must = 0
Must = 0
Must = 1
10 bit
12
EM78P5830A EM78P5830AA
Un-effect
(4 channel only)
Un-effect
Un-effect
Must = 1
8 bit
16
Un-effect
(4 channel only)
Must = 0
Must = 0
Un-effect
10 bit
16
User Application Note
(Before using this chip, take a look at the following description note, it includes important messages.)
1. There are some undefined bits in the registers. The values in these bits are unpredicted. These
bits are not allowed to use. We use the symbol “-” in the spec to recognize them.
A fixed value
must be write in some specific unused bits by software or some unpredicted wrong will occur.
These bits are as below.
Register
Register
PAGE
R7
1
RA
0
RA
2
RD
0
RD
0
Default value
Bit
1
7
0~7
0~2
4
0
0
0
0
X
Initial Setting value
(by user software)
0
0
0
0
1
Effect
RAM access will error
Un-expect error
Un-expect error
Power consumption increase
Un-expect error
EM785830AA
8-bit Micro-controller
RD
RE
IOC5
IOC6
IOC6
IOC7
IOC7
IOC8
IOC8
IOC9
IOCA
IOCB
IOCC
IOCC
IOCE
IOCF
0
0
0
0
1
0
1
0
1
1
1
0
0
1
0
0
5~6
0~3
5~7
0~1
0~1
1~2;7
1~2;7
0~7
0~7
0~7
3,6
0~7
0;3~7
2~7
0~3
4~6
X
1
1
0
1
0
1
0
0
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
Un-expect error
Un-expect error
Power consumption increase
Power consumption increase
Power consumption increase
Power consumption increase
Power consumption increase
Power consumption increase
Power consumption increase
Un-expect error
Power consumption increase
Power consumption increase
Power consumption increase
Un-expect error
Un-expect error
Un-expect error
2. You will see some names for the register bits definitions. Some name will be appear very
frequently in the whole spec. The following describes the meaning for the register’s definitions
such as bit type, bit name, bit number and so on.
RA
PAGE0
7
RAB7
R/W-0
Bit type
Bit name
Bit number
6
RAB6
R/W-0
5
BAB5
R-1
4
RAB4
R/W-1
read/write
(default value=1)
3
X
2
RAB2
R
1
RAB1
R-0
0
RAB0
R/W
read/write
(w/o default value)
read/write
(default value=0)
read only
(w/o default value)
(undefined) not allowed to use
read only
(default value=1)
read only
(default value=0)
Register name and its page
3. Always set IOCC PAGE1 bit 0 = 1 otherwise partial ADC function cannot be used.
4. Please do not switch MCU operation mode from normal mode to sleep mode directly. Before
into sleep mode, please switch MCU to green mode.
5. While switching main clock (regardless of high freq to low freq or on the other hand), adding 6
instructions delay (NOP) is required.
6. Offset voltage will effect ADC’s result, please refer to figure 16 to detail.
__________________________________________________________________________________________________________________________________________________________________
* This specification is subject to be changed without notice.
1
12/1/2004 V1.6
EM785830AA
8-bit Micro-controller
I. General Description
The EM785830AA is an 8-bit RISC type microprocessor with low power, high speed CMOS technology. There
are 16Kx13 bits ROM within it.
This integrated single chip has an on_chip watchdog timer (WDT, data RAM, programmable real time
clock/counter, internal interrupt, power down mode, 4-channel 10-bit A/D converter, two channel PWM output, SPI and
tri-state I/O.
II. Feature
CPU
·
Operating voltage : 2.2V~5.5V at main CLK less then 3.58MHz.
Main CLK(Hz)
Under 3.58M
7.16M
10.74M
14.3M
Operating Voltage(min)
2.2
2.5
3
3.6
•
16k x 13 on chip Program Memory
•
0.5k x 8 on chip data RAM
•
Up to 21 bi-directional tri-state I/O ports(4 shared with AD input; 1 shared with external interrupt input )
•
12 level stack for subroutine nesting
•
8-bit real time clock/counter (TCC)
•
Two 8-bit counters : COUNTER1 and COUNTER2
•
On-chip watchdog timer (WDT)
•
99.9% single instruction cycle commands
•
Four modes (Main clock can be programmed from 447.829k to 14.3MHz generated by internal PLL)
Mode
CPU status
Main clock
32.768kHz clock status
Sleep mode
Turn off
Turn off
Turn off
Green mode
Turn on
Turn off
Turn on
Normal mode Turn on
Turn on
Turn on
•
7 level Normal mode frequency : 447.8K , 895.7K , 1.79M , 3.58M , 7.16M , 10.75M and 14.3MHz.
•
Input port interrupt function
•
Dual clocks operation (Internal PLL main clock , External 32.768KHz)
SPI
•
Serial Peripheral Interface (SPI) : a kind of serial I/O interface
•
Interrupt flag available for the read buffer full or transmitter buffer empty.
•
Programmable baud rates of communication
•
Three-wire synchronous communication. (shared with IO)
PWM
•
Dual PWM (Pulse Width Modulation) with 10-bit resolution
•
Programmable period (or baud rate)
•
Programmable duty cycle
ADC
·
Operating : 2.5V∼5.5V
·
4 channel 10-bit successive approximation A/D converter
·
Internal (VDD) or external reference
POR
·
Power-on voltage detector reset
PACKAGE
EM78P5830AM, EM78P5830AAM, EM785830AAM 28 pin SOP
EM78P5830AP, EM78P5830AAP, EM785830AAP 28 pin PDIP
III. Application
General products
__________________________________________________________________________________________________________________________________________________________________
* This specification is subject to be changed without notice.
2
12/1/2004 V1.6
EM785830AA
8-bit Micro-controller
IV. Pin Configuration
AVSS
P67
ADR/P66
AD6/P65
AD5/P64
AD4/P63
AD3/P62
XIN
XOUT
/RESET
P76/SCK
P75/SDO
P74/SDI
P73/INT3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
28
27
26
25
24
23
22
21
20
19
18
17
16
15
PLLC
AVDD
NC
P97
P96
P95
P94
P93
P92
P91
P90
PC2/PWM 2
PC1/PWM 1
P70/INT0
EM785830AAP, EM785830AAM
EM78P5830AP, EM78P5830AM
EM78P5830AAP, EM78P5830AAM
Fig.1 Pin assignment
__________________________________________________________________________________________________________________________________________________________________
* This specification is subject to be changed without notice.
3
12/1/2004 V1.6