Contents
EM78P458/459
BIT MICRO-CONTROLLER
EM78P458/459
Application Note
General Description
Features
EM78P458/459
PIN Assignment
EM78P459 Pin Description
Function Description
Operational Registers
R0 Indirect Addressing Register
R1 Time Clock /Counter
Program Counter Organization
R3 Status Register
R4 RAM Select Register
R5 ~ R6 Port 5 ~ Port
R7 ~ R8
Data Memory Configuration
R9 Adcon Analog to Digital Control
RA Addata the converted value of ADC
10. RB
11. RC
Special Purpose Registers
13. RE
RF Interrupt Status Register
15. R10 ~ R3F
Control Register
IOC50 ~ IOC60 I/O Port Control Register
Inte INT PAB PSR2 PSR1 PSR0
Bit 0 PSR0 ~ Bit 2 PSR2 TCC/WDT prescaler bits
IOC90 Gcon I/O Configuration & Control of ADC
OP2E OP1E
Vrefs COE IMS2 IMS1 IMS0 CKR1 CKR0
Description of AD Configuration Control Bits
IOCB0 Pull-down Control Register
Bit4Bit2 IMS2IMS0
IMS2IMS0
IOCC0 Open-Drain Control Register
IOCD0 Pull-high Control Register
IOCE0 WDT Control Register
IOCF0 Interrupt Mask Register
Wdte EIS
Cmpie PWM2IE PWM1IE Adie Exie Icie Tcie
IOC51 Pwmcon
PWM2E PWM1E T2EN T1EN
IOC81 PRD1 Period of PWM1
CALI1 SIGN1
Bit 5Bit 3 VOF12VOF10 Offset voltage bits
CALI2 SIGN2
IOCB1 PRD2 Period of PWM2
Bit 5Bit 3 VOF22VOF20 Offset voltage bits
TCC/WDT & Prescaler
Block Diagram of TCC and WDT
I/O Ports
Ccircuit of I/O Port and I/O Control Register for Port
Circuit of I/O Port and I/O Control Register for P60~P67
Reset and Wake-up
Function of Reset and Wake-up
Usage of Port 6 Input Changed Wake-up/Interrupt Function
Contw CLR R1
Status of T, and P of Status Register
Values of RST, T, and P after Reset
Status of RST, T and P being Affected by Events
Interrupt
Analog-To-Digital Converter ADC
Interrupt Input Circuit
BIT Symbol Iocs Adrun Adpd ADIS2 ADIS1 ADIS0
BIT Symbol Vrefs COE IMS2 IMS1 IMS0 CKR1 CKR0
ADC Control Register ADCON/R9, AD-CMP-CON/IOCA0, GCON/IOC90
ADCON/R9
ADC Data Register ADDATA/RA
CKR1 and CKR0 Bit 1 and Bit 0 The conversion time select
GCON/IOC90
Shows the Gains and the Operating Range of ADC
D Operation During Sleep Mode
D Sampling Time
D Conversion Time
Programming Steps/Considerations
Demonstration Programs
CINT== 0XF
Iocs Adrun Adpd ADIS2 ADIS1 ADIS0
Dual Sets of PWM Pulse Width Modulation
Overview
Increment Timer Counter Tmrx TMR1H/TWR1L or TMR2H/TWR2L
Functional Block Diagram of the Dual PWMs
PWM Programming Procedures/Steps
PWM Period Prdx PRD1 or PRD2
Comparator
Period = Prdx + 1 * 4 * 1/Fosc * Tmrx prescale value
Timer
Function description
TMR1X and TMR2X TMR1H/TWR1L and TMR2H/TMR2L
Prdx PRD1 and PRD2 PWM period register
Timer programming procedures/steps
External Reference Signal
Comparator
Programming the Related Registers
Using as An Operation Amplifier
Wake-up from Sleep Mode
Interrupt
Initialized Values after Reset
Summary of the Initialized Values for Registers
CALI1 SIGN1
Oscillator
Oscillator Modes
Crystal Oscillator/Ceramic Resonators Xtal
Summary of Maximum Operating Speeds
EM78P458
EM78P459
HXT
LXT
EM78P458 EM78P459
Vdd
External RC Oscillator Mode
RC Oscillator Mode with Internal Capacitor
EM78P458 EM78P459 Vcc Rext
Power-on Considerations
External Power on Reset Circuit
Residue-Voltage Protection
EM78P458 EM78P459 Rin
Code Option Register Word
Enwdt Clks PTB HLF RCT HLP
Bit 5 ~ Bit 0 ID5~ID0 Customer’s ID
Bit 11 ~ Bit 9 VOF22~VOF20 Offset voltage bits
Instruction Set
List of the instruction set of EM78P458/459
ADD A,R
Timing Diagrams
Reset Timing CLK=0
AC Test Input/Output Waveform
TCC Input Timing CLKS=0
Absolute Maximum Ratings
Electrical Characteristics
Crystal type, two clocks
ComparatorOP CharacteristicVdd = 5.0V,Vss=0V,Ta=0 to
AC Electrical CharacteristicTa=0C ~ 70 C, VDD=5V±5%, VSS=0V
IVR
Appendix
Package Types
OTP MCU
DIP