IBM EM78P312N manual Binary Instruction Hex Mnemonic Operation Status Affected, Dec

Page 61

 

 

 

 

 

 

 

 

 

 

EM78P312N

 

 

 

 

 

 

 

 

 

 

8-Bit Microcontroller

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Binary Instruction

 

Hex

 

Mnemonic

 

Operation

 

 

Status

 

 

 

 

 

 

 

Affected

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0

0000

01rr

rrrr

 

00rr

 

MOV

R,

A

A R

 

None

 

0

0000

1000

0000

0080

 

CLRA

 

 

0 A

 

Z

 

0

0000

11rr

rrrr

 

00rr

 

CLR

R

 

0 R

 

Z

 

0

0001

00rr

rrrr

 

01rr

 

SUB

A,

R

R-A A

 

Z,C,DC

 

0

0001

01rr

rrrr

 

01rr

 

SUB

R,

A

R-A R

 

Z,C,DC

 

0

0001

10rr

rrrr

 

01rr

 

DECA

R

 

R-1 A

 

Z

 

0

0001

11rr

rrrr

 

01rr

 

DEC

R

 

R-1 R

 

Z

 

0

0010

00rr

rrrr

 

02rr

 

OR

A,

R

A R A

 

Z

 

0

0010

01rr

rrrr

 

02rr

 

OR

R,

A

A R R

 

Z

 

0

0010

10rr

rrrr

 

02rr

 

AND

A,

R

A & R A

 

Z

 

0

0010

11rr

rrrr

 

02rr

 

AND

R,

A

A & R R

 

Z

 

0

0011

00rr

rrrr

 

03rr

 

XOR

A,

R

A R A

 

Z

 

0

0011

01rr

rrrr

 

03rr

 

XOR

R,

A

A R R

 

Z

 

0

0011

10rr

rrrr

 

03rr

 

ADD

A,

R

A + R A

 

Z,C,DC

 

0

0011

11rr

rrrr

 

03rr

 

ADD

R,

A

A + R R

 

Z,C,DC

 

0

0100

00rr

rrrr

 

04rr

 

MOV

A,

R

R A

 

Z

 

0

0100

01rr

rrrr

 

04rr

 

MOV

R,

R

R R

 

Z

 

0

0100

10rr

rrrr

 

04rr

 

COMA

R

 

/R A

 

Z

 

0

0100

11rr

rrrr

 

04rr

 

COM

R

 

/R R

 

Z

 

0

0101

00rr

rrrr

 

05rr

 

INCA

R

 

R+1 A

 

Z

 

0

0101

01rr

rrrr

 

05rr

 

INC

R

 

R+1 R

 

Z

 

0

0101

10rr

rrrr

 

05rr

 

DJZA

R

 

R-1 A, skip if zero

 

None

 

0

0101

11rr

rrrr

 

05rr

 

DJZ

R

 

R-1 R, skip if zero

 

None

 

0

0110

00rr

rrrr

 

06rr

 

RRCA

R

 

R(n) A(n-1),

 

C

 

 

 

R(0) C, C A(7)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0

0110

01rr

rrrr

 

06rr

 

RRC

R

 

R(n) R(n-1),

 

C

 

 

 

R(0) C, C R(7)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0

0110

10rr

rrrr

 

06rr

 

RLCA

R

 

R(n) A(n+1),

 

C

 

 

 

R(7) C, C A(0)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0

0110

11rr

rrrr

 

06rr

 

RLC

R

 

R(n) R(n+1),

 

C

 

 

 

R(7) (C), C (R(0)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0

0111

00rr

rrrr

 

07rr

 

SWAPA

R

 

R(0-3) ( A(4-7),

 

None

 

 

 

R(4-7) ( A(0-3)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0

0111

01rr

rrrr

 

07rr

 

SWAP

R

 

R(0-3) ( R(4-7)

 

None

 

0

0111

10rr

rrrr

 

07rr

 

JZA

R

 

R+1 A, skip if zero

 

None

 

0

0111

11rr

rrrr

 

07rr

 

JZ

R

 

R+1 R, skip if zero

 

None

 

0

100b

bbrr

rrrr

 

0xxx

 

BC

R,

b

0( R(b)

 

None

 

0

101b

bbrr

rrrr

 

0xxx

 

BS

R,

b

1( R(b)

 

None

 

0

110b

bbrr

rrrr

 

0xxx

 

JBC

R,

b

if R(b)=0, skip

 

None

 

0

111b

bbrr

rrrr

 

0xxx

 

JBS

R,

b

if R(b)=1, skip

 

None

 

1

00kk

kkkk

kkkk

 

1kkk

 

CALL

k

 

PC+1 [SP],

 

None

 

 

 

(Page, k) (PC)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1

01kk

kkkk

kkkk

 

1kkk

 

JMP

k

 

(Page, k) (PC)

 

None

 

1

1000

kkkk

kkkk

 

18kk

 

MOV

A,

k

k A

 

None

 

1

1001

kkkk

kkkk

 

19kk

 

OR

A,

k

A v k A

 

Z

 

1

1010

kkkk

kkkk

 

1Akk

 

AND

A,

k

A & k A

 

Z

 

1

1011

kkkk

kkkk

 

1Bkk

 

XOR

A,

k

A k A

 

Z

 

1

1100

kkkk

kkkk

 

1Ckk

 

RETL

k

 

k A, [Top of Stack]

 

None

 

 

 

 

 

 

 

 

 

 

PC

 

 

 

1

1101

kkkk

kkkk

 

1Dkk

 

SUB

A,

k

k-A A

 

Z,C,DC

 

1

1111

kkkk

kkkk

 

1Fkk

 

ADD

A,

k

k+A A

 

Z,C,DC

 

1

1110

1000

kkkk

 

1E8k

 

PAGE

k

 

K->R5(6:4)

 

None

 

1

1110

1001

kkkk

 

1E9k

 

BANK

k

 

K->R4(7:6)

 

None

 

Note: 1 This instruction is applicable to IOC6~IOCA, IMR1, IMR2 only.

Product Specification (V1.0) 10.03.2006

57

(This specification is subject to change without further notice)

Image 61
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 RegistersR1 Time Clock /Counter Bit Microcontroller R0 Indirect Addressing RegisterR2 Program Counter & Stack 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 edgeAdoscr − AD Offset Control Register Address 0Ch External InterruptCali Sign 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 Registers for Uart Circuit Uart Universal Asynchronous Receiver/TransmitterName Bit Transmitting Uart ModeBaud Rate Generator ReceivingRegisters for the SPI Circuit SPI Serial Peripheral InterfaceRbank Address Name Bit Transfer Mode Shift Direction and Sample PhaseBit Transmit Mode Serial ClockBit Transmit/Receive Mode Bit Microcontroller Bit Receive ModeSCK pin Multiple Device Connect /SS SpisRegisters for Timer/Counter 2 Circuit Timer/CounterCounter Mode Timer ModeWindow 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 InterruptReset Reset and Wake-up13 I/O Ports 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 Symbol Parameter Conditions Min Typ Max Unit AC Electrical CharacteristicTa=- 40C ~ 85 C, VDD=5V ± 5%, VSS=0V AC Test Input/Output Waveform Timing DiagramPackage Type OTP MCUPin Count Package Size EM78P311SxY