ELAN Home Systems EM78P459 manual Instruction Set, List of the instruction set of EM78P458/459

Page 53

EM78P458/459

OTP ROM

4.15 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 logic operation on R2 (e.g. "SUB R2,A", "BS(C) R2,6", "CLR R2", ⋅⋅⋅⋅). In this case, the execution takes two instruction cycles.

In addition, the instruction set has the following features:

(1)Every bit of any register can be set, cleared, or tested directly.

(2)The I/O registers can be regarded as general registers. That is, the same instruction can operate on I/O registers.

The symbol "R" represents a register designator that specifies which one of the registers (including operational registers and general-purpose registers) is to be utilized by the instruction. The symbol "b" represents a bit field designator that selects the value for the bit located in the register "R" that is affected by the operation. The symbol "k" represents an 8 or 10-bit constant or literal value.

Table 16 The list of the instruction set of EM78P458/459

 

INSTRUCTION BINARY

HEX

MNEMONIC

OPERATION

STATUS AFFECTED

 

 

 

 

 

 

 

 

 

 

 

0

0000

0000

0000

0000

NOP

No Operation

None

 

 

0

0000

0000

0001

0001

DAA

Decimal Adjust A

C

 

 

0

0000

0000

0010

0002

CONTW

A CONT

None

 

 

0

0000

0000

0011

0003

SLEP

0 WDT, Stop oscillator

T,P

 

 

0

0000

0000

0100

0004

WDTC

0 WDT

T,P

 

 

0

0000

0000

rrrr

000r

IOW R

A IOCR

None <Note1>

 

 

0

0000

0001

0000

0010

ENI

Enable Interrupt

None

 

 

0

0000

0001

0001

0011

DISI

Disable Interrupt

None

 

 

0

0000

0001

0010

0012

RET

[Top of Stack] PC

None

 

 

0

0000

0001

0011

0013

RETI

[Top of Stack] PC, Enable Interrupt

None

 

 

0

0000

0001

0100

0014

CONTR

CONT A

None

 

 

0

0000

0001

rrrr

001r

IOR R

IOCR A

None <Note1>

 

 

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 VR A

Z

 

 

0

0010

01rr

rrrr

02rr

OR R,A

A VR 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

 

 

 

 

 

This specification is subject to change without prior notice.

53

07.01.2003 (V1.3)

 

Image 53
Contents BIT MICRO-CONTROLLER EM78P458/459Application Note EM78P458/459General Description Features EM78P458/459 PIN Assignment EM78P459 Pin Description Operational Registers Function DescriptionR0 Indirect Addressing Register R1 Time Clock /CounterProgram Counter Organization R4 RAM Select Register R3 Status RegisterR5 ~ R6 Port 5 ~ Port R7 ~ R8Data Memory Configuration RA Addata the converted value of ADC R9 Adcon Analog to Digital Control10. RB 11. RC13. RE Special Purpose RegistersRF Interrupt Status Register 15. R10 ~ R3FIOC50 ~ IOC60 I/O Port Control Register Control RegisterInte INT PAB PSR2 PSR1 PSR0 Bit 0 PSR0 ~ Bit 2 PSR2 TCC/WDT prescaler bitsVrefs COE IMS2 IMS1 IMS0 CKR1 CKR0 IOC90 Gcon I/O Configuration & Control of ADCOP2E OP1E IOCB0 Pull-down Control Register Description of AD Configuration Control BitsBit4Bit2 IMS2IMS0 IMS2IMS0IOCD0 Pull-high Control Register IOCC0 Open-Drain Control RegisterIOCF0 Interrupt Mask Register IOCE0 WDT Control RegisterWdte EIS Cmpie PWM2IE PWM1IE Adie Exie Icie TciePWM2E PWM1E T2EN T1EN IOC51 PwmconCALI1 SIGN1 IOC81 PRD1 Period of PWM1Bit 5Bit 3 VOF12VOF10 Offset voltage bits CALI2 SIGN2Bit 5Bit 3 VOF22VOF20 Offset voltage bits IOCB1 PRD2 Period of PWM2TCC/WDT & Prescaler I/O Ports Block Diagram of TCC and WDTCcircuit of I/O Port and I/O Control Register for Port Circuit of I/O Port and I/O Control Register for P60~P67 Usage of Port 6 Input Changed Wake-up/Interrupt Function Reset and Wake-upFunction of Reset and Wake-up Contw CLR R1 Status of T, and P of Status Register Status of RST, T and P being Affected by Events Values of RST, T, and P after ResetInterrupt Interrupt Input Circuit Analog-To-Digital Converter ADCBIT Symbol Vrefs COE IMS2 IMS1 IMS0 CKR1 CKR0 BIT Symbol Iocs Adrun Adpd ADIS2 ADIS1 ADIS0ADC Control Register ADCON/R9, AD-CMP-CON/IOCA0, GCON/IOC90 ADCON/R9CKR1 and CKR0 Bit 1 and Bit 0 The conversion time select ADC Data Register ADDATA/RAGCON/IOC90 Shows the Gains and the Operating Range of ADCD Sampling Time D Operation During Sleep ModeD Conversion Time Programming Steps/ConsiderationsCINT== 0XF Demonstration ProgramsIocs Adrun Adpd ADIS2 ADIS1 ADIS0 Overview Dual Sets of PWM Pulse Width ModulationFunctional Block Diagram of the Dual PWMs Increment Timer Counter Tmrx TMR1H/TWR1L or TMR2H/TWR2LPWM Period Prdx PRD1 or PRD2 PWM Programming Procedures/StepsComparator Period = Prdx + 1 * 4 * 1/Fosc * Tmrx prescale valueFunction description TimerTMR1X and TMR2X TMR1H/TWR1L and TMR2H/TMR2L Prdx PRD1 and PRD2 PWM period registerExternal Reference Signal Timer programming procedures/stepsComparator Programming the Related RegistersInterrupt Using as An Operation AmplifierWake-up from Sleep Mode Summary of the Initialized Values for Registers Initialized Values after ResetCALI1 SIGN1 Oscillator Modes OscillatorSummary of Maximum Operating Speeds Crystal Oscillator/Ceramic Resonators XtalEM78P458 EM78P459LXT HXTEM78P458 EM78P459 VddExternal RC Oscillator Mode EM78P458 EM78P459 Vcc Rext RC Oscillator Mode with Internal Capacitor External Power on Reset Circuit Power-on Considerations Residue-Voltage Protection EM78P458 EM78P459 RinEnwdt Clks PTB HLF RCT HLP Code Option Register WordBit 11 ~ Bit 9 VOF22~VOF20 Offset voltage bits Bit 5 ~ Bit 0 ID5~ID0 Customer’s IDList of the instruction set of EM78P458/459 Instruction SetADD A,R Reset Timing CLK=0 Timing DiagramsAC Test Input/Output Waveform TCC Input Timing CLKS=0Absolute Maximum Ratings Crystal type, two clocks Electrical CharacteristicsAC Electrical CharacteristicTa=0C ~ 70 C, VDD=5V±5%, VSS=0V ComparatorOP CharacteristicVdd = 5.0V,Vss=0V,Ta=0 toIVR Package Types AppendixOTP MCU DIP