IBM EM78P312N manual General Description, Bit Microcontroller

Page 5

EM78P312N

8-Bit Microcontroller

1 General Description

The EM78P312N is an 8-bit microprocessor with low-power, high-speed CMOS technology and high noise immunity. It has an on-chip 4K×13-bits Electrical One Time Programmable Read Only Memory (OTP-ROM). It provides multi-protection bits to prevent intrusion of user’s OTP memory codes. Seven Option bits are also available to meet user’s requirements. With its OTP-ROM feature, the EM78P312N provides a convenient way of developing and verifying user’s programs. Moreover, this OTP device offers the advantages of easy and effective program updates, using development and programming tools. User can avail of the ELAN Writer to easily program his development code.

2 Features

„CPU configuration

z4K13 bits on-chip ROM

z1448 bits on-chip registers (SRAM) z8-level stacks for subroutine nesting zLess than 3.5mA at 5V/8MHz

zTypically 0.8 μA, during sleep mode zTypically 1.1 μA, during idle mode

„I/O port configuration

z4 bidirectional I/O ports : P6, P7, P8, P9 z22 I/O pins

z10 Programmable pull-down I/O pins z10 programmable pull-high I/O pins

zExternal interrupt : P60, P61, P73, P80

„Operating voltage range: zOTP version

Operating voltage range:2.5v~5.5v

„Operating temperature range: z-40~85°C

„Operating frequency range: Main clock

Crystal mode:

DC ~ 20MHz/2clks @ 5V; DC ~100ns inst. cycle @ 5V DC ~ 8MHz/2clks @ 3V;DC ~ 250ns inst. cycle @ 3V

ERC mode:

DC ~ 16MHz/2clks @ 5V;DC ~ 125ns inst. cycle @ 5V DC ~ 8MHz/2clks @ 3V;DC ~ 250ns inst. cycle @ 3V

„Peripheral configuration

zSerial peripheral interface (SPI) available

zUniversal asynchronous receiver transmitter interface (UART)available

z16 bits Counter/Timer TC2: Timer/Counter/Window

z8 bits Timer/Counter

TCC: 8-bit real time clock/counter with overflow interrupt

TC3: Timer/Counter/Capture

TC4: Timer/Counter/ PWM (pulse width modulation) / PDO (Programmable divider output)

z8-bit channels Analog-to-Digital Converter with 10-bit resolution

zTime Base Timer:(1Hz~16kHz at 8MHz)

zKey tone output:(1kHz~8kHz at 8MHz)

z8-bit channels Analog-to-Digital Converter with 10-bit resolution

„Fifteen available interrupts:

zWDT time-out interrupt

zTCC overflow interrupt

zTime base timer interrupt (the first falling edge of the source clock)

zSerial UART transmit interrupt

zSerial UART receive interrupt

zSerial UART receive error interrupt

zFour External interrupt

zADC completion interrupt

zTC2 overflow interrupt

zTC3 overflow interrupt

zTC4 overflow interrupt

zSerial SPI interrupt

„Special features

zProgrammable free running watchdog timer

zTwo clocks per instruction cycle

zPower-on Reset

zHigh noise immunity

zPower saving Sleep mode

zSelectable Oscillation mode

„Package type:

z28-pin DIP 600 mil: EM78P312NP

z28-pin Skinny DIP 300 mil: EM78P312NAK

z28-pin Skinny DIP 400 mil: EM78P312N

z28-pin SOP 300 mil: EM78P312NM

z28-pin SSOP 209 mil: EM78P312NS

3

Pin Assignment

 

 

 

 

 

 

(ACLK) OSCO

1

28

VDD

 

 

 

OSCI

2

27

/RESET (VPP)

 

 

 

TEST

3

26

P67 (DINCK)

 

 

 

(AD0) P90

4

25

P66 (DATAIN)

 

 

 

(AD1) P91

5

24

P65 (PGMB)

 

 

 

(AD2) P92

6

23

P64 (/SS)(OEB)

 

 

 

(AD3) P93

7

22

P63 (/TONE)

 

 

 

(AD4) P94

8

21

P62 (TC2)

 

 

 

(AD5) P95

9

20

P61 (INT1)

 

 

 

(AD6) P96

10

19

P60 (/INT0)

 

 

 

(AD7/VREF) P97

11

18

P73 (/SLEEP, /INT5)

 

 

 

(TC3, INT3) P80

12

17

P72 (TX,SO)

 

 

 

(TC4, /PWM, /PDO) P81

13

16

P71(RX,SI)

 

 

 

VSS

14

15

P70 (/SCK)

 

 

 

 

EM78P312N

 

 

 

 

 

 

 

 

 

Fig. 3-

Pin Assignment

 

 

 

 

 

 

Product Specification (V1.0) 10.03.2006

 

 

 

1

(This specification is subject to change without further notice)

Image 5
Contents DOC. Version EM78P312NElan Microelectronics Corporation Contents 16.1 14.116.2 16.3Bit Microcontroller General DescriptionPin Description Symbol Pin No Type FunctionFunction Description Functional Block DiagramOperating Registers Operating RegistersR2 Program Counter & Stack Bit Microcontroller R0 Indirect Addressing RegisterR1 Time Clock /Counter R3 Status Register User Memory SpaceBit 7 ~ Bit 6 RBS1 ~ RBS0 R-Register page select RBS1 RBS0SIS = 0 Idle mode SIS = 1 Sleep mode Bit 1 SIS Sleep and Idle mode selectBit 0 C Carry flag R4 RAM Select Register R5 System Control RegisterBit Microcontroller R6 Port 6 I/O Data Register RB Timer/Counter 4 Control RegisterBit 7 ~ Bit 0 P67 ~ P60 8-bit Port 6 I/O data register R7 Port 7 I/O Data RegisterClock Source Resolution Max. Time RC Timer 4 Data BufferTC4CK2 TC4CK1 TC4CK0 Fosc=8MRFInterrupt Status Flag Register Bit Microcontroller RE Interrupt Status Flag RegisterTC3M = 1 Capture mode Bank 1 R6 TC3DA Timer 3 Data Buffer a Bank 1 R5 TC3CR Timer/Counter 3 Control RegisterBank 1 R7 TC3DB Timer 3 Data Buffer B Bit 7 TC3CAP Software capture controlBank 1 RA TC2DL Timer 2 Data Buffer Low Byte Bank 1 R9 TC2DH Timer 2 Data Buffer High ByteTC2S = 0 Stop and counter clear Bank 1 RB Adcr AD Control RegisterBit 5~ Bit 4 ADCK1 ~ ADCK0 AD Conversion Time Select Bit 7 ~ Bit 0 ADE7 ~ ADE0 AD input pin enable controlBank 1 RC Adic AD Input Pin Control Bank 1 RD Addh AD High 8-bit Data BufferBit Microcontroller Bank 1 RE Tbktc TBT/Keytone Control TEN = 0 Disable TEN = 1 EnableBank 2 R5 URC1 Uart Control Register BitBit 7 URRD8 Receiving data Bit Bank 2 R7 URS Uart Status RegisterBRATE2 BRATE1 BRATE0 TC2CK1 TC2CK0Bit 6 Even Select parity check Bit 5 PRE Enable parity additionEven = 0 Odd parity Even = 1 Even parity Bank 2 R9 Urtd Uart Transmit Data BufferBit 2 EDS Data shift out edge select Bit 5 ~ Bit 3 BRS0 ~ BRS2 SPI Clock Source SelectEDS = 0 Rising edge EDS = 1 Falling edge Bit 0 WBE Write buffer empty flag. Read onlyTransfer Mode PHE6x = 1 Disable P6x pull highBank 3 RB PLC1 Pull Low Control Register SPID7 SPID6 SPID5 SPID4 SPID3 SPID2 SPID1 SPID0Special Purpose Registers Intcr − INT Control Register Address 0Bh IOC6 ~ IOC9 − I/O Port Control RegisterINT1ES = 0 Rising edge INT1ES = 1 Falling edge TC2ES = 0 Rising edge TC2ES = 1 Falling edgeCali Sign External InterruptAdoscr − AD Offset Control Register Address 0Ch Uerrie Urie Utie Tbie EXIE1 TCIE0 IMR2 − Interrupt Mask Register 2 Address 0FhRegisters for CPU Operation Mode CPU Operation ModeMode Switching Control Operation ModeWake-up Signal R5 SIS = 1+SLEP R5 SIS= 0 + Slep Instruction Sleep Mode Idle ModeAD Converter Wake-up MethodsADC Data Register Operation Mode Max. Frequency Max. Conversion Rate per BitSampling Time Conversion TimeAddress Name Bit Time Base Timer and Keytone GeneratorMUX Name Bit Uart Universal Asynchronous Receiver/TransmitterRegisters for Uart Circuit Transmitting Uart ModeBaud Rate Generator ReceivingRbank Address Name Bit SPI Serial Peripheral InterfaceRegisters for the SPI Circuit Transfer Mode Shift Direction and Sample PhaseBit Transmit Mode Serial ClockSCK pin Bit Microcontroller Bit Receive ModeBit Transmit/Receive Mode Multiple Device Connect /SS SpisRegisters for Timer/Counter 2 Circuit Timer/CounterWindow Mode Timer ModeCounter Mode 21 Window Mode Timing Chart Registers for Timer/Counter 3 Circuit22 Configuration of Timer/Counter3 Capture ModeTCIF4 Registers for Timer 4 CircuitTCR4 PDO Mode12 TCC/WDT & Prescaler PWM ModeUp-counter TC4 Interrupt13 I/O Ports Reset and Wake-upReset Wake-up from Idle Mode Wake-up from Sleep ModeSummary of the Initialized Values for Registers Address Name Reset Type BitSCR Bit Microcontroller Register BankAddres URTD8 Status of RST, T, and P of the Status Register Reset TypeBit Microcontroller General Purpose Registers Events that may affect the T and P StatusInterrupt 28 Controller Reset Block DiagramOscillator Modes OscillatorCrystal Oscillator/Ceramic Resonators Crystal Summary of Maximum Operating Speeds740 EM78P312N 809N Oscillator Type Frequency Mode Frequency C1 pF C2 pFOS CI External RC Oscillator ModeCode Option Register Enwdtb = 0 Enable Enwdtb = 1 DisableCode Option Register Word Bit 12 ~ 9 Not usedExternal Power-on Reset Circuit Power-on ConsiderationsCustomer ID Register OSC = 0 RC type OSC = 1 Crystal typeVdd Residue-Voltage ProtectionEM78P312N EM78P809NBinary Instruction Hex Mnemonic Operation Status Instruction SetDEC Binary Instruction Hex Mnemonic Operation Status AffectedAbsolute Maximum Ratings Symbol Parameter Condition Min Typ Max UnitRecommended Operating Conditions Vss =Ta= 25 C, VDD= 5.0V ± 5%, VSS= DC Electrical CharacteristicsTa= 25 C, VDD= 3.0V ± 5%, VSS= Varef Ta=- 40C ~ 85 C, VDD=5V ± 5%, VSS=0V AC Electrical CharacteristicSymbol Parameter Conditions Min Typ Max Unit AC Test Input/Output Waveform Timing DiagramPackage Type OTP MCUPin Count Package Size EM78P311SxY