BA45F5420BA45F54209V High Voltage Smoke Detector Flash MCU9V High Voltage Smoke Detector Flash MCUGeneral Description The BA45F5420 is an 8-bit high performance RISC architecture microcontroller, which integrates a smoke detector AFE and a dual channel IR LED constant driving circuit, designed especially for Stand-alone type Smoke Detector alarm applications. For memory features, the Flash Memory offers users the convenience of multi-programming features. Other memory includes an area of RAM Data Memory as well as an area of Emulated EEPROM memory for storage of non-volatile data such as serial numbers, calibration data etc. Analog features include a multi-channel 10-bit A/D converter, two internal operational amplifiers and an internal TinyPower LDO which allows input voltages as high as 12V and provides a fixed 3.3V voltage. One extremely flexible Timer Module provides timing, pulse generation and PWM generation functions. Protective features such as an internal Watchdog Timer and Low Voltage Reset function coupled with excellent noise immunity and ESD protection ensure that reliable operation is maintained in hostile electrical environments. A full choice of internal high and low oscillators functions is provided including two fully integrated system oscillators which require no external components for their implementation. The ability to operate and switch dynamically between a range of operating modes using different clock sources gives users the ability to optimise microcontroller operation and minimise power consumption. The inclusion of flexible I/O programming features, Time-Base functions, piezoelectric horn driver along with many other features ensure that the device will find excellent use in the smoke detector alarm applications. Block Diagram Reset ROM RAM Circuit 1K × 14 64 × 8 I/O Emulated Pin-shared Port A PA0~PA3 Interrupt Stack EEPROM Function Driver INT Controller 4-level 32 × 14 PTM Pin-shared Watchdog Timer with Port A Digital Peripherals Pin-shared With Port A HT8 MCU Core V SYSCLK DD A0PB + A0PI _ A0NI LIRC Time Bases 32kHz MUX A0O A1O VDD VDD HIRC + 8MHz _ A1PI VSS VSS Clock System Bus Pin-shared With Port A VREG Smoke Detector AFE VCC LDO 3.3V VCC V VB DD VCC VREF VS AN0~AN2 VCC 1.2V MUX Piezoelectric Horn Pin-shared FB Driver with Port A VREG A0O 10-bit ADC VREG A1O Analog-to-Digital MODE Converter V V REG REG ISINK0 Sink Current Generator ENCLK ISINK1 Smoke Detect Alarm Peripherals Analog Peripherals Pin-shared with Port A : Pin-Shared Node Rev. 1.00 6 June 15, 2020 Rev. 1.00 7 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