OTP memory codes. Seven Option bits are also available to meet user’s requirements. With its OTP-ROM feature, the EM78P809N is able to offer a convenient way of developing and verifying user’s programs. Moreover, user can take advantage of ELAN Writer to easily program his development code.
Page 8
EM78P809N 8-Bit Microcontroller Symbol Pin No. Type P80~P81 12~13 P90~P97 4~11 ACLK DATAIN DINCK PGMB 4 • Function * P80~P83 are bi-directional I/O pins * P80 can be used as 8-bit Timer/Counter 3 (TC3) or external Interrupt Input 3 (INT3)
EM78P809N 8-Bit Microcontroller 4.2 Operating Registers REGISTER BANK 0 Address R0/ IAR R1/ TCC R2/ PC R3/ SR R4/ RSR PORT6 PORT7 PORT8 TC2CR/ ADDL PORT9 Reserved TC4CR TC4D ISFR0 ISFR1 ISFR2 16 Byte Common Register BANK 0 R4 (7,6) = (0,0)
Page 11
For an interrupt trigger, the program ROM will jump to individual interrupt vector at Page 0. The CPU will store ACC, R3 status and R5 PAGE automatically, it will restore after instruction RETI. Product Specification (V1.0) 07.26.2005 (This specification is subject to change without further notice) EM78P809N 8-Bit Microcontroller • 7...
Page 13
Bit 4 Bit 3 RSR5 RSR4 RSR3 GRBS0 General Purpose Register Bank (Address 20H ~ 3FH) Bit 5 Bit 4 Bit 3 EM78P809N 8-Bit Microcontroller Bit 2 Bit 1 Bit 0 RSR2 RSR1 RSR0 Bank 0 Bank 1 Bank 2...
Page 14
EM78P809N 8-Bit Microcontroller Bit 1 ( SIS ) : SLEEP and IDLE mode select. SIS = “0” : IDLE mode SIS = “1” : SLEEP mode Bit 0 ( REM ) : Release method for sleep mode. REM = “0” : /SLEEP pin input rising edge release REM = “1”...
Page 15
Fc/2^11 Fc/2^7 Fc/2^5 Fc/2^3 Fc/2^2 Fc/2^1 External clock (TC4 pin) TC4M0 Operating Mode Timer/Counter Programmable Divider output Pulse Width Modulation output EM78P809N 8-Bit Microcontroller Bit 1 Bit 0 Bit 2 Bit 1 Bit 0 TC4M1 TC4M0 Operating Mode Clear Toggle Reserved Max.
Page 16
EM78P809N 8-Bit Microcontroller TC4D − Timer 4 Data Buffer ( Address: 0Ch ) Bit 7 Bit 6 TC4D7 TC4D6 Bit 7 ~ Bit 0 ( TC4D7 ~ TC4D0 ) : Data buffer of 8-bit Timer/Counter 4. ISFR0 − Interrupt Status Flag Register 0 and INT3 Edge Detect Flag.
Page 17
"1" means interrupt request, "0" means non-interrupt Bit 5 Bit 4 Bit 3 TC3CK1 TC3CK0 TC3M EM78P809N 8-Bit Microcontroller Bit 2 Bit 1 Bit 0 EXIF1 TCIF0 Bit 2 Bit 1 Bit 0...
Page 19
Bit 5 Bit 4 Bit 3 TC2D5 TC2D4 TC2D3 Bit 5 Bit 4 Bit 3 ADCK1 ADCK0 cannot be reset by software. EM78P809N 8-Bit Microcontroller Resolution Max. Time ( Fc=8M ) ( Fc=8M ) 1.05s 19.1h 1.02ms 1.1min 32μs 2.1s 1μs...
Page 20
EM78P809N 8-Bit Microcontroller Bit 5~ Bit 4 ( ADCK1 ~ ADCK0 ) : AD Conversion Time Select ADCK1 Bit 3 ( ADP ) : AD power control ADP = “0” : Power on ADP = “1” : Power down Bit 2 ~ Bit 0 ( ADIS2 ~ ADIS0 ) : Analog Input Pin Select ADIS2 ADIC −...
Page 21
TCK0 ( Normal, Idle ) Clock Source TBTCK0 ( Normal, Idle ) Bit 5 Bit 4 Bit 3 BRATE2 BRATE1 EM78P809N 8-Bit Microcontroller Bit 2 Bit 1 Bit 0 TBTCK2 TBTCK1 TBTCK0 Keytone Output Frequency ( Fc = 8MHz ) 0.976kHz...
Page 22
EM78P809N 8-Bit Microcontroller Bit 6 ~ Bit 5 ( UMODE1 ~ UMODE0 ) : UART Transmission Mode Select Bit UMODE1 Bit 4 ~ Bit 2 ( BRATE2 ~ BRATE1 ) : Transmit Baud Rate Select BRATE2 Bit 1 ( UTBE ) : UART transfer buffer empty flag. Set to 1 when transfer buffer is empty.
Page 23
(This specification is subject to change without further notice) Bit 5 Bit 4 Bit 3 PRERR OVERR Bit 5 Bit 4 Bit 3 URRD5 URRD4 URRD3 URRD2 EM78P809N 8-Bit Microcontroller Bit 2 Bit 1 Bit 0 FMERR URBF Bit 2 Bit 1 Bit 0 URRD1 URRD0 • 19...
Page 24
EM78P809N 8-Bit Microcontroller URTD − UART Transmit Data Buffer ( Address: 09h ) Bit 7 Bit 6 URTD 7 URTD 6 Bit 7 ~ Bit 0 ( URTD 7 ~ URTD 0) : UART transmit data buffer. Write only. Register Bank 3 ( R3 bits ( 7,6) = (1,1) ) SPIC1 −...
Page 25
Bit 5 Bit 4 Bit 3 SPID5 SPID4 SPID3 Bit 5 Bit 4 Bit 3 /PHE81 /PHE80 /PHE63 EM78P809N 8-Bit Microcontroller Bit 2 Bit 1 Bit 0 SPIM1 SPIM0 Transfer Mode 8-bit Transmit/Receive mode 8-bit Transmit mode 8-bit Receive mode Reserved...
Page 26
EM78P809N 8-Bit Microcontroller Bit 3 ~ 0 ( /PHE63 ~ /PHE60 ) : bit 3 ~ 0 of Port 6 Pull high enable bit /PHE6x = “0” : Enable P6x pull high /PHE6x = “1” : Disable P6x pull high...
Product Specification (V1.0) 07.26.2005 (This specification is subject to change without further notice) Bit 5 Bit 4 Bit 3 WDTP1 WDTP0 WDTE WDTP0 PSR1 PSR0 EM78P809N 8-Bit Microcontroller Bit 2 Bit 1 Bit 0 PSR2 PSR1 PSR0 Operating Mode 1:16 1:64...
Page 28
EM78P809N 8-Bit Microcontroller IOC6 ~ IOC9 − I/O Port Control Register "1" puts the relative I/O pin into high impedance, while "0" defines the relative I/O pin as output. IOC6 and IOC9 registers are both readable and writable. INTCR − INT Control Register ( Address : 0Bh )
Page 29
ENI + EXIE5 (IMR2) Bit 5 Bit 4 Bit 3 VOF[2] VOF[1] VOF[0] Bit 5 Bit 4 Bit 3 ADIE EXIE3 EM78P809N 8-Bit Microcontroller Digital Noise Edge Reject Falling Rising or Falling 15/Fc, 63/Fc Rising or Falling or 7/Fc Rising/Falling Bit 2...
Reset Occurs SIS=0 + SLEP NORMAL MODE CPU : Operating Fosc: Oscillates Interrupt Fig 5. Operation Mode and Switching EM78P809N 8-Bit Microcontroller Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 SIS=1 + SLEP SLEEP MODE CPU : Halts...
Page 32
EM78P809N 8-Bit Microcontroller Table 2. Mode Switching Control Mode Switch Normal Sleep Sleep Normal Normal Idle Normal Table 3. Operation Mode Operation Mode Reset Normal Signal Clock Sleep In NORMAL mode, the CPU core and on-chip peripherals operate in oscillator frequency.
EXIF5 TCIF2 ISFR1 ADIF ADOSCR CALI SIGN VOF[2] VOF[1] VOF[0] EXIE5 TCIE2 IMR1 ADIE EM78P809N 8-Bit Microcontroller IDLE Mode NORMAL Mode R5 (SIS)= 0 + SLEP Instruction R5 (SIS)=(*) vector after RETI Interrupt instruction, then jump to the next instruction...
Page 34
ADCK0 and ADCK1 select the conversion time (Tct), in terms of instruction cycles. This allows the MCU to run at maximum frequency without sacrificing accuracy of A/D conversion. For the EM78P809N, the conversion time per bit is about 4μs. Table 5 shows the relationship between Tct and the maximum operating frequencies.
TBKTC TCK1 TCK0 UERRIF RBFF TBEF ISFR2 UERRIE URIE UTIE IMR2 Output Latch TBKTC Fig. 7. TONE Output Pin Configuration EM78P809N 8-Bit Microcontroller Max. Conversion Rate per Bit Rate 250kHz (4μs) 48us(20.8kHz) 250kHz (4μs) 48us(20.8kHz) 250kHz (4μs) 8us(20.8kHz) Bit 3...
Page 36
EM78P809N 8-Bit Microcontroller TONE Pin Fosc/2 Fosc/2 Fosc/2 Fosc/2 Fosc/2 Fosc/2 Fosc/2 Fosc/2 TBTCK2:0 Time Base Timer is used to generate the base time for key scan or dynamic display processing. The interrupt is generated in the first falling edge of the source clock after TBTEN is set to “1”.
Baud rate generator RX Control Interrupt Control RX shift register Parity control URRD URRD8 Error flag Data Bus Fig. 11. Function Block Diagram EM78P809N 8-Bit Microcontroller Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 TBIF EXIF1 TCIF0 TBEF TBIE...
EM78P809N 8-Bit Microcontroller In Universal Asynchronous Receiver Transmitter (UART), each transmitted or received character is individually synchronized by framing it with a start bit and stop bit. Full duplex data transfer is possible since the UART has independent transmit and receive sections.
Page 39
UERRIF interrupt will occur when the next byte is received. Read received data from URRD register. And URBF bit will be clear by hardware. Product Specification (V1.0) 07.26.2005 (This specification is subject to change without further notice) EM78P809N 8-Bit Microcontroller • 35...
EM78P809N 8-Bit Microcontroller 4.7.4 Baud Rate Generator: The baud rate generator is comprised of a circuit that generates a clock pulse to determine the transfer speed for transmission/reception in the UART. The BRATE2~BRATE0 bits of the URC1 register can determine the desired baud rate.
(This specification is subject to change without further notice) shift start shift finish a0 a1 a2 a3 a4 a5 a6 a7 write data Fig. 15. Transmit Mode (8-bit, 1 word) EM78P809N 8-Bit Microcontroller shift start b0 b1 b2 b3 b4 b5 b6 b7 write data • 37...
Page 42
EM78P809N 8-Bit Microcontroller 8-bit Receive Mode: Setting SPIM0 ~ SPIM1 to receive mode and setting SPIS to “1” to start receiving. The data are input sequentially from the SI pin in synchronous with the serial clock. When the final bit of transfer data has been received, the SPI interrupt is generated and SPIS is cleared to “0”...
Writing to the TCR2L, the comparison is inhibited until TCR2H is written. Product Specification (V1.0) 07.26.2005 (This specification is subject to change without further notice) Fig. 20. Timer Mode Timing Chart Fig. 21. Counter Mode Timing Chart (TC2ES = 1) EM78P809N 8-Bit Microcontroller counter match clear...
TC3 pin input, the contents of the counter are loaded into TCR3A, counter is Product Specification (V1.0) 07.26.2005 (This specification is subject to change without further notice) Inhibit Capture Control 8-bit Up-counter Capture TCR3B TCR3A Fig. 23. Configuration of Timer/Counter3 EM78P809N 8-Bit Microcontroller Interrupt Overflow Comparator Capture • 43...
EM78P809N 8-Bit Microcontroller cleared and interrupt is generated again. If an overflow before the edge is detected, the FFH is loaded into TCR3DA and an overflow interrupt is generated. During interrupt processing, it can be determined whether or not there is an overflow by checking whether the TCR3DA value is FFH.
TC4M(1,*) Overflow Match Comparator TCR4 Fig. 25. Timer/Counter 4 Configuration The contents of TCR4 are compared with the contents of the Fig. 26.Timing Chart for PDO Mode EM78P809N 8-Bit Microcontroller TC4FF TC4 Interrupt /PWM, /PDO Pin Clear Toggle • 45...
EM78P809N 8-Bit Microcontroller 4.11.4 PWM Mode In Pulse Width Modulation (PWM) Output mode, counting up is performed using the internal clock. The contents of the TCR4 are compared with the contents of the up-counter. The F/F is toggled when match is found. The counter is still counting, the F/F is toggled again when the counter overflows, then the counter is cleared.
= 5V, set up time period = 16.2ms ± 30% = 3V, set up time period = 19.6ms ± 30% Product Specification (V1.0) 07.26.2005 (This specification is subject to change without further notice) PCRD PCW R PDW R PDRD EM78P809N 8-Bit Microcontroller (one oscillator • 47...
Page 52
EM78P809N 8-Bit Microcontroller The Watchdog timer and prescaler are cleared. Upon power on, the upper 2 bits of R3 are cleared. Upon power on, the upper 2 bits of R4 are cleared. Upon power on, the upper 3 bits of R5 are cleared.
Page 53
UTIE TBIE UERRIE WDT0 /INT WDTP1 WDTP0 WDTE Jump to interrupt vector or execute next instruction RBS1 RBS0 GRBS1 GRBS0 RSR5 RSR4 RSR3 EM78P809N 8-Bit Microcontroller Bit 2 Bit 1 Bit 0 INT1ES TC2ES TCIE4 SPIE TCIE3 EXIE1 TCIE0 PSR2...
Page 54
EM78P809N 8-Bit Microcontroller Register Bank 0 Address Name Reset Type Bit Name Power-On 0x05 /RESET and WDT time out Wake-Up from SLEEP, IDLE mode Bit Name Power-On 0x06 PORT6 /RESET and WDT time out Wake-Up from SLEEP, IDLE mode Bit Name...
Page 56
EM78P809N 8-Bit Microcontroller Register Bank 2 Address Name Reset Type Bit Name Power-On 0x05 URC1 /RESET and WDT time out Wake-Up from SLEEP, IDLE mode Bit Name Power-On 0x06 URC2 /RESET and WDT time out Wake-Up from SLEEP, IDLE mode...
Page 57
*P: Previous value before reset Product Specification (V1.0) 07.26.2005 (This specification is subject to change without further notice) Bit 7 Bit 6 Bit 5 Bit 4 Reset Type Event EM78P809N 8-Bit Microcontroller Bit 3 Bit 2 Bit 1 Bit 0 • 53...
4.16.2 Crystal Oscillator/Ceramic Resonators (Crystal) EM78P809N has a clock generator. i.e. Fc (high frequency) which can be driven by an external clock signal through the OSCI pin. In most applications, Pin OSCI and Pin OSCO can be connected with a crystal or ceramic resonator to generate oscillation.
OSCI EM78P809N Fig. 33. Crystal/Resonator-Parallel Mode Circuit 4.16.3 External RC Oscillator Mode For applications that do not need very precise timing calculation, the RC oscillator offers a lot of cost savings. Nevertheless, it should be noted that the frequency of the RC oscillator is influenced by the supply voltage, the values of the resistor (Rext), the capacitor (Cext), and even by the operation temperature.
2. For design reference only. 4.17 Code Option Register The EM78P809N has one CODE option word that is not part of the normal program memory. The option bits cannot be accessed during normal program execution. Code Option Register and Customer ID Register arrangement distribution:...
Any microcontroller is not guaranteed to start and operate properly before the power supply maintains at its steady state. The EM78P809N has a built-in Power On Voltage Detector (POVD) with a detecting level of 2.1V. It will work well if V (10 ms or less).
Page 64
EM78P809N 8-Bit Microcontroller current leakage from the /RESET pin is about ± 5 μ A, it is recommended that R should not be greater than 40K. In this way, the /RESET pin voltage is held below 0.2V. The diode (D) acts as a short circuit at the moment of power down. The capacitor C will discharge rapidly and fully.
EM78P809N 4.19 Instruction Set Each instruction in the instruction set is a 13-bit word divided into an OP code and one or more operands. Normally, all instructions are executed within one single instruction cycle (one instruction consists of 2 oscillator periods), unless the program counter is changed by instruction "MOV R2,A", "ADD R2,A", or by instructions of arithmetic or...
BANK K->R4(7:6) Rating -40 ° C -65 ° C -0.3V -0.3V Condition Fc = 10MHz Fc = 4MHz Two cycles with two clocks EM78P809N 8-Bit Microcontroller Status Affected None None Z,C,DC Z,C,DC None None 85 ° C 150 ° C +6.0V...
EM78P809N 8-Bit Microcontroller Electrical Characteristics 6.1 DC Electrical Characteristics (Ta= 25 ° C, VDD= 5.0V ± 5%, VSS= 0V) Symbol Parameter XTAL: 4.5V to VDD ERC: VDD = 5V Input High Threshold Voltage VIHRC (Schmitt trigger ) IRC1 Sink current...
Page 69
Pull-low active, input pin at VDD All input and I/O WDT disabled pins at VDD, output pin floating WDT enabled VDD=3V, /RESET= 'High', Fc=4MHz, CLKS="0", output pin floating, WDT enabled EM78P809N 8-Bit Microcontroller Min. Typ. Max. Unit 1100 μ A +0.3V...
Page 70
EM78P809N 8-Bit Microcontroller A/D Converter Characteristic (V Symbol Parameter VAREF Analog reference voltage VAREF - VASS ≧ 2.5V VASS Analog input voltage IAI1 Analog supply current Ivref IAI2 Analog supply current IVref Resolution Linearity error Differential nonlinear error Full scale error...
/SS ↑ to SDO output hi-impedance delay time delay time * N= selected prescaler ratio Product Specification (V1.0) 07.26.2005 (This specification is subject to change without further notice) 8-Bit Microcontroller Conditions (Tins+20)/ 11.3 2000 11.3 EM78P809N Typ Max Unit 16.2 21.6 16.2 21.6 • 67...
EM78P809N 8-Bit Microcontroller Timing Diagram AC Test Input/Output W aveform AC Testing : Input is driven at 2.4V for logic "1",and 0.4V for logic "0".Timing measurements are made at 2.0V for logic "1",and 0.8V for logic "0". RESET Timing (CLK="0") /RESET TCC Input Tim ing (CLKS="0")
APPENDIX Package Types: OTP MCU EM78P809NP EM78P809NM EM78P809NS Product Specification (V1.0) 07.26.2005 (This specification is subject to change without further notice) Package Type Pin Count SSOP EM78P809N 8-Bit Microcontroller Package Size 600 mil 300 mil 209 mil • 69...