Datasheet BA45F5420 (Holtek) - 31

ManufacturerHoltek
Description9V High Voltage Smoke Detector Flash MCU
Pages / Page112 / 31 — BA45F5420. 9V High Voltage Smoke Detector Flash MCU. Reading Data from …
File Format / SizePDF / 2.1 Mb
Document LanguageEnglish

BA45F5420. 9V High Voltage Smoke Detector Flash MCU. Reading Data from the Emulated EEPROM – polling method. Oscillators

BA45F5420 9V High Voltage Smoke Detector Flash MCU Reading Data from the Emulated EEPROM – polling method Oscillators

Model Line for this Datasheet

Text Version of Document

BA45F5420 BA45F5420 9V High Voltage Smoke Detector Flash MCU 9V High Voltage Smoke Detector Flash MCU
SET EMI BACK: SZ EWR ; check for write cycle end JMP BACK :
Reading Data from the Emulated EEPROM – polling method
MOV A, EEPROM_ADRES ; user defined address MOV EAR, A SET ERDEN ; set ERDEN bit, enable read operation SET ERD ; start Read Cycle - set ERD bit BACK: SZ ERD ; check for read cycle end JMP BACK CLR ECR ; disable Emulated EEPROM read if no more read operations ; are required MOV A, EDL ; move read data to register MOV READ_DATA_L, A MOV A, EDH MOV READ_DATA_H, A Note: For each read operation, the address register should be re-specified followed by setting the ERD bit high to activate a read cycle even if the target address is consecutive.
Oscillators
Various oscillator options offer the user a wide range of functions according to their various application requirements. The flexible features of the oscillator functions ensure that the best optimisation can be achieved in terms of speed and power saving. Oscillator selections and operation are selected through the application program by using relevant control registers.
Oscillator Overview
In addition to being the source of the main system clock the oscillators also provide clock sources for the Watchdog Timer. Fully integrated internal oscillators, requiring no external components, are provided to form a wide range of both fast and slow system oscillators. All oscillator options are selected through registers. The higher frequency oscillator provides higher performance but carry with it the disadvantage of higher power requirements, while the opposite is of course true for the lower frequency oscillator. With the capability of dynamically switching between fast and slow system clock, the device has the flexibility to optimize the performance/power ratio, a feature especially important in power sensitive portable applications.
Type Name Frequency
Internal High Speed RC HIRC 8MHz Internal Low Speed RC LIRC 32kHz
Oscillator Types System Clock Configurations
There are two methods of generating the system clock, one high speed oscillator and one low speed oscillator. The high speed oscillator is the internal 8MHz RC oscillator, HIRC. The low speed oscillator is the internal 32kHz RC oscillator, LIRC. Selecting whether the low or high speed oscillator is used as the system oscillator is implemented using the CKS2~CKS0 bits in the SCC register and as the system clock can be dynamically selected. Rev. 1.00 30 June 15, 2020 Rev. 1.00 31 June 15, 2020 Document Outline Features CPU Features Peripheral Features General Description Block Diagram Pin Assignment Pin Description Absolute Maximum Ratings D.C. Electrical Characteristics Operating Voltage Characteristics Standby Current Characteristics Operating Current Characteristics A.C. Electrical Characteristics High Speed Internal Oscillator – HIRC – Frequency Accuracy Low Speed Internal Oscillator Characteristics – LIRC System Start Up Time Characteristics Input/Output Characteristics Memory Characteristics Internal Reference Voltage Electrical Characteristics LVR Electrical Characteristics Sink Current Generator Electrical Characteristics Operational Amplifier Electrical Characteristics A/D Converter Electrical Characteristics LDO Electrical Characteristics Piezoelectric Horn Driver Characteristics Power-on Reset Characteristics System Architecture Clocking and Pipelining Program Counter Stack Arithmetic and Logic Unit – ALU Flash Program Memory Structure Special Vectors Look-up Table Table Program Example In Circuit Programming – ICP On-Chip Debug Support – OCDS RAM Data Memory Structure General Purpose Data Memory Special Purpose Data Memory Special Function Register Description Indirect Addressing Register – IAR0, IAR1 Memory Pointers – MP0, MP1 Accumulator – ACC Program Counter Low Register – PCL Look-up Table Registers – TBLP, TBLH Status Register – STATUS Emulated EEPROM Data Memory Emulated EEPROM Data Memory Structure Emulated EEPROM Registers Erasing the Emulated EEPROM Writing Data to the Emulated EEPROM Reading Data from the Emulated EEPROM Programming Considerations Oscillators Oscillator Overview System Clock Configurations Internal RC Oscillator – HIRC Internal 32kHz Oscillator – LIRC Operating Modes and System Clocks System Clocks System Operation Modes Control Registers Operating Mode Switching Standby Current Considerations Wake-up Watchdog Timer Watchdog Timer Clock Source Watchdog Timer Control Register Watchdog Timer Operation Reset and Initialisation Reset Functions Reset Initial Conditions Input/Output Ports Pull-high Resistors Port A Wake-up I/O Port Control Registers Sink Current Generator Pin-shared Functions I/O Pin Structures Programming Considerations Timer Modules – TM Introduction TM Operation TM Clock Source TM Interrupts TM External Pins Programming Considerations Periodic Type TM – PTM Periodic Type TM Operation Periodic Type TM Register Description Periodic Type TM Operating Modes Smoke Detector AFE Smoke Detector AFE Registers Operational Amplifier Operation Piezoel Horn Driver Analog to Digital Converter A/D Overview Registers Descriptions A/D Converter Reference Voltage A/D Converter Input Signals A/D Converter Operation Conversion Rate and Timing Diagram Summary of A/D Conversion Steps Programming Considerations A/D Transfer Function A/D Programming Examples Interrupts Interrupt Registers Interrupt Operation External Interrupt Timer Module Interrupts A/D Converter Interrupt Time Base Interrupts Interrupt Wake-up Function Programming Considerations Application Circuits External-driving Buzzer Application Circuit Self-driving Buzzer Application Circuit Instruction Set Introduction Instruction Timing Moving and Transferring Data Arithmetic Operations Logical and Rotate Operation Branches and Control Transfer Bit Operations Table Read Operations Other Operations Instruction Set Summary Table Conventions Instruction Definition Package Information 16-pin NSOP (150mil) Outline Dimensions 20-pin SOP (300mil) Outline Dimensions