Holtek HT45F0035A Manual

Induction cooker flash mcu
Table of Contents

Advertisement

Quick Links

Induction Cooker Flash MCU
HT45F0035A
Revision: V1.00
Date: March 15, 2024

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the HT45F0035A and is the answer not in the manual?

Questions and answers

Summary of Contents for Holtek HT45F0035A

  • Page 1 Induction Cooker Flash MCU HT45F0035A Revision: V1.00 Date: March 15, 2024...
  • Page 2: Table Of Contents

    HT45F0035A Induction Cooker Flash MCU Table of Contents Features ......................... 7 CPU Features ..........................7 Peripheral Features ........................7 IGBT Driver Features ........................8 General Description ....................8 Block Diagram ....................... 9 Pin Assignment ....................10 Pin Description ....................10 Internally Connected Signal ......................13 Absolute Maximum Ratings ................
  • Page 3 HT45F0035A Induction Cooker Flash MCU In Circuit Programming – ICP .....................29 On-Chip Debug Support – OCDS ....................29 Data Memory ....................... 30 Structure ............................30 Data Memory Addressing ......................31 General Purpose Data Memory ....................31 Special Purpose Data Memory ....................31 Special Function Register Description ............. 33 Indirect Addressing Registers –...
  • Page 4 HT45F0035A Induction Cooker Flash MCU Input/Output Ports ....................62 Pull-high Resistors ........................62 Port A Wake-up ...........................63 I/O Port Control Registers ......................63 Pin-shared Functions ........................64 I/O Pin Structures ........................69 READ PORT Function.........................69 Programming Considerations ......................71 Timer/Event Counters ..................71 Configuring the Timer/Event Counter Input Clock Source ............73 Timer/Event Counter Register Description ..................74...
  • Page 5 HT45F0035A Induction Cooker Flash MCU Reverse Voltage Protection Adjustment Function ..............120 PPGTA Approach Function .......................120 IGBT Driver ......................126 Level Shifter ..........................126 Voltage Detector ........................126 Comparators ..................... 127 Comparator Registers .......................128 Comparator Input Offset Calibration Function (n=0, m=5; n=1~5, m=4) ........133 Valley Detection Function ......................134...
  • Page 6 HT45F0035A Induction Cooker Flash MCU Instruction Set ....................158 Introduction ..........................158 Instruction Timing ........................158 Moving and Transferring Data ....................158 Arithmetic Operations ........................158 Logical and Rotate Operation ....................159 Branches and Control Transfer ....................159 Bit Operations ...........................159 Table Read Operations ......................159 Other Operations ........................159 Instruction Set Summary .................
  • Page 7: Features

    HT45F0035A Induction Cooker Flash MCU Features CPU Features • Operating voltage =16MHz: 3.3V~5.5V ♦ • Up to 0.25μs instruction cycle with 16MHz system clock at V • Power down and wake-up functions to reduce power consumption • Oscillator types Internal High Speed 16MHz RC – HIRC ♦...
  • Page 8: Igbt Driver Features

    HT45F0035A Induction Cooker Flash MCU • Integrated 16-bit Cyclic Redundancy Check function – CRC • Low voltage reset function • Low voltage detect function • Package type: 20-pin SOP IGBT Driver Features • Integrated Level Shifter • Voltage detect protection for level shift output enable control Detect V ♦...
  • Page 9: Block Diagram

    HT45F0035A Induction Cooker Flash MCU Block Diagram Interrupt Port A PA0~PA4 Controller Driver 4K × 16 512 × 8 PA6~PA7 EEPROM Stack Pin-Shared Port B Reset Timers PB0~PB4 128 × 8 8-Level Function Driver Circuit Watchdog Port C LVD/LVR Timer...
  • Page 10: Pin Assignment

    2. The OCDSDA and OCDSCK pins are supplied for the OCDS dedicated pins and as such only available for the HT45V0035A device which is the OCDS EV chip for the HT45F0035A device. Pin Description The function of each pin is listed in the following table, however the details behind how each pin is configured is contained in other sections of the datasheet.
  • Page 11 HT45F0035A Induction Cooker Flash MCU Pin Name Function Descriptions PAPU General purpose I/O. Register enabled pull-up PAWU CMOS and wake-up PAS2 PA4/C2VO/VREF/AN4 C2VO PAS2 — CMOS Comparator 2 output (before debounce) VREF PAS2 — A/D converter external reference voltage input PAS2 —...
  • Page 12 HT45F0035A Induction Cooker Flash MCU Pin Name Function Descriptions PBPU CMOS General purpose I/O. Register enabled pull-up PBS2 PBS2 NMOS I C clock line PB4/SCL/PWMO/C0VO/ PWMO PBS2 — CMOS PWM output OPINN1/AN3 C0VO PBS2 — CMOS Comparator 0 output (before debounce)
  • Page 13: Internally Connected Signal

    HT45F0035A Induction Cooker Flash MCU Internally Connected Signal Several lines are not connected to external package pins. These lines are interconnection pins between the MCU and the IGBT driver and are listed in the following table. MCU Signal Name IGBT Driver Signal Name Function Description Programmable pulse generator output pin.
  • Page 14: Operating Current Characteristics

    HT45F0035A Induction Cooker Flash MCU Operating Current Characteristics Ta=25°C Test Conditions Symbol Operating Mode Min. Typ. Max. Unit Conditions SLOW Mode – LIRC =32kHz — μA LIRC FAST Mode – HIRC =16MHz — HIRC Note: When using the characteristic table data, the following notes should be taken into consideration: 1.
  • Page 15: Low Speed Internal Oscillator Characteristics - Lirc

    HT45F0035A Induction Cooker Flash MCU Low Speed Internal Oscillator Characteristics – LIRC Test Conditions Symbol Parameter Min. Typ. Max. Unit Temp. 25°C LIRC Frequency LIRC 3.3V~5.5V -40°C~85°C -15% +15% Operating Frequency Characteristic Curve System Operating Frequency 16MHz 3.3V 5.5V Operating Voltage System Start Up Time Characteristics Ta=25°C...
  • Page 16: Input/Output Characteristics

    HT45F0035A Induction Cooker Flash MCU Input/Output Characteristics Ta=25°C Test Conditions Symbol Parameter Min. Typ. Max. Unit Conditions — Input Low Voltage for I/O Ports — — — 0.2V — Input High Voltage for I/O Ports — — 0.8V — Sink Current for I/O Ports =0.1V...
  • Page 17: Lvd & Lvr Electrical Characteristics

    HT45F0035A Induction Cooker Flash MCU LVD & LVR Electrical Characteristics Ta=25°C Test Conditions Symbol Parameter Min. Typ. Max. Unit Conditions — LVR enable, voltage select 2.1V — LVR enable, voltage select 2.55V 2.55 Low Voltage Reset Voltage — LVR enable, voltage select 3.15V 3.15...
  • Page 18: Comparator Electrical Characteristics

    HT45F0035A Induction Cooker Flash MCU Test Conditions Symbol Parameter Min. Typ. Max. Unit Conditions =0.5μs ADCK Integral Non-linearity — Ta=-40°C~85°C Additional Current Consumption for A/D No load, t =0.5μs — 1000 μA ADCK Converter Enable 3.3V~ Clock Period — —...
  • Page 19 HT45F0035A Induction Cooker Flash MCU Test Conditions Symbol Parameter Min. Typ. Max. Unit Conditions CnHYSON[1:0]=00B, — CnDB[2:0]=000B CnHYSON[1:0]=00B, 3×t 4×t DBDL DBDL — CnDB[2:0]=001B +0.8 +1.5 CnHYSON[1:0]=00B, 7×t 8×t DBDL DBDL — CnDB[2:0]=010B +0.8 +1.5 CnHYSON[1:0]=00B, 15×t 16×t DBDL DBDL —...
  • Page 20: Operational Amplifier Electrical Characteristics

    HT45F0035A Induction Cooker Flash MCU Operational Amplifier Electrical Characteristics Ta=25°C Test Conditions Symbol Parameter Min. Typ. Max. Unit Conditions Additional Current for Operational No load — μA Amplifier Enable Without calibration — (OPOOF[5:0]=100000B) Input Offset Voltage With calibration — Common Mode Voltage Range —...
  • Page 21: Level Shift/Voltage Detector Electrical Characteristics

    HT45F0035A Induction Cooker Flash MCU Test Conditions Symbol Parameter Min. Typ. Max. Unit Conditions Standard mode — — Stop Condition Setup Time 3V/5V μs SU(STO) Fast mode — — Note: Using the debounce function can make the transmission more stable and reduce the probability of communication failure due to interference.
  • Page 22: Power-On Reset Characteristics

    Time System Architecture A key factor in the high-performance features of the Holtek range of microcontrollers is attributed to their internal system architecture. The device takes advantage of the usual features found within RISC microcontrollers providing increased speed of operation and enhanced performance. The...
  • Page 23: Program Counter

    HT45F0035A Induction Cooker Flash MCU (System Clock) Phase Clock T1 Phase Clock T2 Phase Clock T3 Phase Clock T4 Program Counter PC+1 PC+2 Fetch Inst. (PC) Pipelining Execute Inst. (PC-1) Fetch Inst. (PC+1) Execute Inst. (PC) Fetch Inst. (PC+2) Execute Inst. (PC+1) System Clocking and Pipelining Fetch Inst.
  • Page 24: Stack

    HT45F0035A Induction Cooker Flash MCU Program Counter Read Registers The Program Counter Read registers are a read only register pair for reading the program counter value which indicates the current program execution address. Read the low byte register first then the high byte register.
  • Page 25 HT45F0035A Induction Cooker Flash MCU RET or RETI, the Program Counter is restored to its previous value from the stack. After a device reset, the Stack Pointer will point to the top of the stack. If the stack is full and an enabled interrupt takes place, the interrupt request flag will be recorded but the acknowledge signal will be inhibited.
  • Page 26: Arithmetic And Logic Unit - Alu

    HT45F0035A Induction Cooker Flash MCU Arithmetic and Logic Unit – ALU The arithmetic-logic unit or ALU is a critical area of the microcontroller that carries out arithmetic and logic operations of the instruction set. Connected to the main microcontroller data bus, the ALU receives related instruction codes and performs the required arithmetic or logical operations after which the result will be placed in the specified register.
  • Page 27: Special Vectors

    HT45F0035A Induction Cooker Flash MCU 000H Initialisation Vector 004H Interrupt Vectors 03CH n00H Look-up Table nFFH 0FFFH 16 bits Program Memory Structure Special Vectors Within the Program Memory, certain locations are reserved for the reset and interrupts. The location 000H is reserved for use by the device reset for program initialisation. After a device reset is initiated, the program will jump to this location and begin execution.
  • Page 28 HT45F0035A Induction Cooker Flash MCU Table Program Example The following example shows how the table pointer and table data is defined and retrieved from the microcontroller. This example uses raw table data located in the Program Memory which is stored there using the ORG statement.
  • Page 29: In Circuit Programming - Icp

    * must be less than 1nF. On-Chip Debug Support – OCDS There is an EV chip named HT45V0035A which is used to emulate the HT45F0035A device. The EV chip device also provides an “On-Chip Debug” function to debug the real MCU device during the development process.
  • Page 30: Data Memory

    OCDS pins which are pin-shared with the ICP programming pins are still used as the Flash Memory programming pins for ICP. For more detailed OCDS information, refer to the corresponding document named “Holtek e-Link for 8-bit MCU OCDS User’s Guide”. Holtek e-Link Pins...
  • Page 31: Data Memory Addressing

    HT45F0035A Induction Cooker Flash MCU Special Purpose Data Memory (Sector 0 ~ Sector 1) General Purpose Data Memory (Sector 0 ~ Sector 3) Sector 0 Sector 1 Sector 2 Sector 3 Data Memory Structure Data Memory Addressing For the device that supports the extended instructions, there is no Bank Pointer for Data Memory.
  • Page 32 HT45F0035A Induction Cooker Flash MCU Sector 0 Sector 1 Sector 0 Sector 1 IAR0 SADOH CMP0C0 IAR1 CMP0C1 MP1L CMP0DB MFI2 MP1H CMP0DLY MFI3 CMP1C0 CMP1C1 TBLP C1DA TBLH CMP2C0 TBHP CMP2C1 STATUS C2DA CMP3C0 IAR2 CMP3C1 MP2L C3DA MP2H...
  • Page 33: Special Function Register Description

    HT45F0035A Induction Cooker Flash MCU Special Function Register Description Most of the Special Function Register details will be described in the relevant functional section; however several registers require a separate description in this section. Indirect Addressing Registers – IAR0, IAR1, IAR2 The Indirect Addressing Registers, IAR0, IAR1 and IAR2, although having their locations in normal RAM register space, do not actually physically exist as normal registers.
  • Page 34: Accumulator - Acc

    HT45F0035A Induction Cooker Flash MCU Example 2 data .section ‘data’ adres1 db ? adres2 db ? adres3 db ? adres4 db ? block db ? code .section at 0 ‘code’ org 00h start: mov a, 04h ; setup size of block...
  • Page 35: Program Counter Low Register - Pcl

    HT45F0035A Induction Cooker Flash MCU Program Counter Low Register – PCL To provide additional program control functions, the low byte of the Program Counter is made accessible to programmers by locating it within the Special Purpose area of the Data Memory. By manipulating this register, direct jumps to other program locations are easily implemented.
  • Page 36 HT45F0035A Induction Cooker Flash MCU In addition, on entering an interrupt sequence or executing a subroutine call, the status register will not be pushed onto the stack automatically. If the contents of the status register are important and if the subroutine can corrupt the status register, precautions must be taken to correctly save it.
  • Page 37: Eeprom Data Memory

    HT45F0035A Induction Cooker Flash MCU EEPROM Data Memory The device contains an area of internal EEPROM Data Memory. EEPROM is by its nature a non- volatile form of re-programmable memory, with data retention even when its power supply is removed. By incorporating this kind of data memory, a whole new host of application possibilities are made available to the designer.
  • Page 38 HT45F0035A Induction Cooker Flash MCU • EEC Register Name EWERTS EREN MODE WREN RDEN EWERTS: Data EEPROM Erase time and Write time selection Bit 7 0: Erase time is 3.2ms (t ) / Write time is 2.2ms (t EEER EEWR 1: Erase time is 3.7ms (t...
  • Page 39: Read Operation From The Eeprom

    HT45F0035A Induction Cooker Flash MCU This is the Data EEPROM Read Control Bit. When this bit is set high by the application program, a read cycle will be activated. This bit will be automatically reset to zero by hardware after the read cycle has finished. Setting this bit high will have no effect if the RDEN has not first been set high.
  • Page 40: Page Erase Operation To The Eeprom

    HT45F0035A Induction Cooker Flash MCU Page Erase Operation to the EEPROM The EEPROM page erase operation can be executed when the mode selection bit, MODE, is set high. The EEPROM is capable of a 16-byte page erase. The internal page buffer will be cleared by hardware after power on reset.
  • Page 41 HT45F0035A Induction Cooker Flash MCU As the EEPROM write cycle is controlled using an internal timer whose operation is asynchronous to microcontroller system clock, a certain time will elapse before the data will have been written into the EEPROM. Detecting when the write cycle has finished can be implemented either by polling the WR bit in the EEC register or by using the EEPROM interrupt.
  • Page 42: Write Protection

    HT45F0035A Induction Cooker Flash MCU Write Protection Protection against inadvertent write operation is provided in several ways. After the device is powered-on the Write Enable bit in the control register will be cleared preventing any write operations. Also at power-on the Memory Pointer high byte register, MP1H or MP2H, will be reset to zero, which means that Data Memory Sector 0 will be selected.
  • Page 43 HT45F0035A Induction Cooker Flash MCU Reading a Data Page from the EEPROM – polling method MOV A, 040H ; setup memory pointer low byte MP1L MOV MP1L, A ; MP1 points to EEC register MOV A, 01H ; setup memory pointer high byte MP1H MOV MP1H, A SET IAR1.4 ; set MODE bit, select page operation mode MOV A, EEPROM_ADRES ; user defined address MOV EEA, A SET IAR1.1 ; set RDEN bit, enable read operations ; ~~~~ The data length can be up to 16 bytes (Start) ~~~~ CALL READ CALL READ JMP PAGE_READ_FINISH ; ~~~~ The data length can be up to 16 bytes (End) ~~~~ READ: SET IAR1.0 ; start Read Cycle – set RD bit BACK: SZ IAR1.0 ; check for read cycle end...
  • Page 44 HT45F0035A Induction Cooker Flash MCU Writing a Data Byte to the EEPROM – polling method MOV A, 040H ; setup memory pointer low byte MP1L MOV MP1L, A ; MP1 points to EEC register MOV A, 01H ; setup memory pointer high byte MP1H MOV MP1H, A CLR IAR1.4 ; clear MODE bit, select byte operation mode MOV A, EEPROM_ADRES ; user defined address MOV EEA, A MOV A, EEPROM_DATA ; user defined data MOV EED, A CLR EMI SET IAR1.3 ; set WREN bit, enable write operations SET IAR1.2 ; start Write Cycle – set WR bit – executed immediately ; after setting WREN bit SET EMI BACK: SZ IAR1.2...
  • Page 45: Oscillators

    HT45F0035A Induction Cooker Flash MCU 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 some control registers.
  • Page 46: Internal 32Khz Oscillator - Lirc

    As Holtek has provided the device with both high and low speed clock sources and the means to switch between them dynamically, users can optimise the operation of their microcontroller to achieve the best performance/power ratio.
  • Page 47: System Operation Modes

    HT45F0035A Induction Cooker Flash MCU System Operation Modes There are six different modes of operation for the microcontroller, each one with its own special characteristics and which can be chosen according to the specific performance and power requirements of the application. There are two modes allowing normal operation of the microcontroller, the FAST Mode and SLOW Mode.
  • Page 48: Control Registers

    HT45F0035A Induction Cooker Flash MCU IDLE2 Mode The IDLE2 Mode is entered when a HALT instruction is executed and when the FHIDEN bit in the SCC register is high and the FSIDEN bit in the SCC register is low. In the IDLE2 Mode the CPU will be switched off but the high speed oscillator will be turned on to provide a clock source to keep some peripheral functions operational.
  • Page 49: Operating Mode Switching

    HT45F0035A Induction Cooker Flash MCU • HIRCC Register Name — — — — — — HIRCF HIRCEN — — — — — — — — — — — — Bit 7~2 Unimplemented, read as “0” Bit 1 HIRCF: HIRC oscillator stable flag...
  • Page 50 HT45F0035A Induction Cooker Flash MCU FAST Mode to SLOW Mode Switching When running in the FAST Mode, which uses the high speed system oscillator, and therefore consumes more power, the system clock can switch to run in the SLOW Mode by setting the CKS2~CKS0 bits to “111”...
  • Page 51 HT45F0035A Induction Cooker Flash MCU SLOW Mode CKS2~CKS0=000~110 FAST Mode FHIDEN=0, FSIDEN=0 HALT instruction is executed SLEEP Mode FHIDEN=0, FSIDEN=1 HALT instruction is executed IDLE0 Mode FHIDEN=1, FSIDEN=1 HALT instruction is executed IDLE1 Mode FHIDEN=1, FSIDEN=0 HALT instruction is executed...
  • Page 52: Standby Current Considerations

    HT45F0035A Induction Cooker Flash MCU Entering the IDLE1 Mode There is only one way for the device to enter the IDLE1 Mode and that is to execute the “HALT” instruction in the application program with both the FHIDEN and FSIDEN bits in the SCC register equal to “1”.
  • Page 53: Watchdog Timer

    HT45F0035A Induction Cooker Flash MCU After the system enters the SLEEP or IDLE Mode, it can be woken up from one of various sources listed as follows: • An external falling edge on Port A • A system interrupt • A WDT overflow When the device executes the “HALT”...
  • Page 54: Watchdog Timer Operation

    HT45F0035A Induction Cooker Flash MCU When these bits are changed to any other values due to environmental noise the microcontroller will be reset; this reset operation will be activated after a delay time, , and the WRF bit in the RSTFC register will be set high.
  • Page 55: Reset And Initialisation

    HT45F0035A Induction Cooker Flash MCU Under normal program operation, a Watchdog Timer time-out will initialise a device reset and set the status bit TO. However, if the system is in the SLEEP or IDLE Mode, when a Watchdog Timer time-out occurs, the TO bit in the status register will be set and only the Program Counter and Stack Pointer will be reset.
  • Page 56 HT45F0035A Induction Cooker Flash MCU Power-on Reset RSTD SST Time-out Power-on Reset Timing Chart Low Voltage Reset – LVR The microcontroller contains a low voltage reset circuit in order to monitor the supply voltage of the device. The LVR function is always enabled in the FAST or SLOW mode with a specific LVR voltage, V .
  • Page 57 HT45F0035A Induction Cooker Flash MCU When an actual low voltage condition occurs, as specified by the defined LVR voltage values above, an MCU reset will be generated. The reset operation will be activated after the low voltage condition keeps more than a t time.
  • Page 58: Reset Initial Conditions

    HT45F0035A Induction Cooker Flash MCU Watchdog Time-out Reset during SLEEP or IDLE Mode The Watchdog time-out Reset during SLEEP or IDLE Mode is a little different from other kinds of reset. Most of the conditions remain unchanged except that the Program Counter and the Stack Pointer will be cleared to zero and the TO and PDF flags will be set high.
  • Page 59 HT45F0035A Induction Cooker Flash MCU Power On WDT Time-out WDT Time-out Register Reset (Normal Operation) (IDLE/SLEEP) STATUS x x 0 0 x x x x u u 1 u u u u u u u 11 u u u u...
  • Page 60 HT45F0035A Induction Cooker Flash MCU Power On WDT Time-out WDT Time-out Register Reset (Normal Operation) (IDLE/SLEEP) SADC0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 u u u u u u u u...
  • Page 61 HT45F0035A Induction Cooker Flash MCU Power On WDT Time-out WDT Time-out Register Reset (Normal Operation) (IDLE/SLEEP) PPGTMRD 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 u u u u u u u u...
  • Page 62: Input/Output Ports

    Induction Cooker Flash MCU Input/Output Ports Holtek microcontrollers offer considerable flexibility on their I/O ports. With the input or output designation of every pin fully under user program control, pull-high selections for all ports and wake-up selections on certain pins, the user is provided with an I/O structure to meet the needs of a wide range of application possibilities.
  • Page 63: Port A Wake-Up

    HT45F0035A Induction Cooker Flash MCU Port A Wake-up The HALT instruction forces the microcontroller into the SLEEP or IDLE Mode which preserves power, a feature that is important for battery and other low-power applications. Various methods exist to wake up the microcontroller, one of which is to change the logic condition on one of the Port A pins from high to low.
  • Page 64: Pin-Shared Functions

    HT45F0035A Induction Cooker Flash MCU Pin-shared Functions The flexibility of the microcontroller range is greatly enhanced by the use of pins that have more than one function. Limited numbers of pins can force serious design constraints on designers but by supplying pins with multi-functions, many of these difficulties can be overcome.
  • Page 65 HT45F0035A Induction Cooker Flash MCU 010: AN8 011: OPOUT & AN8 100~111: PA1 Bit 3 Unimplemented, read as “0” Bit 2~0 PAS02~PAS00: PA0 pin-shared function selection 000: PA0 001: SCL 010: SDA 011: Reserved 100~111: PA0 • PAS1 Register Name —...
  • Page 66 HT45F0035A Induction Cooker Flash MCU • PAS3 Register Name — PAS36 PAS35 PAS34 — PAS32 PAS31 PAS30 — — — — Bit 7 Unimplemented, read as “0” Bit 6~4 PAS36~PAS34: PA7 pin-shared function selection 000: PA7 001: CP2P 010: AN5 011: CP2P &...
  • Page 67 HT45F0035A Induction Cooker Flash MCU Bit 6~4 PBS16~PBS14: PB3 pin-shared function selection 000: PB3/PPGIN 001: CP0N 010: AN0 011: CP0N & AN0 100~111: PB3/PPGIN Bit 3 Unimplemented, read as “0” Bit 2~0 PBS12~PBS10: PB2 pin-shared function selection 000: PB2 001: CP4P 010: AN1 011: CP4P &...
  • Page 68 HT45F0035A Induction Cooker Flash MCU • PCS1 Register Name — PCS16 PCS15 PCS14 — PCS12 PCS11 PCS10 — — — — Bit 7 Unimplemented, read as “0” Bit 6~4 PCS16~PCS14: PC3 pin-shared function selection 000: PC3/TC1 001: AN11 010: C3VOD...
  • Page 69: I/O Pin Structures

    HT45F0035A Induction Cooker Flash MCU I/O Pin Structures The accompanying diagram illustrates the internal structure of the I/O logic function. As the exact logical construction of the I/O pin will differ from this drawing, it is supplied as a guide only to assist with the functional understanding of the I/O logic function.
  • Page 70 HT45F0035A Induction Cooker Flash MCU • IECC Register Name IECS7 IECS6 IECS5 IECS4 IECS3 IECS2 IECS1 IECS0 IECS7~IECS0: READ PORT function enable control bit 7~ bit 0 Bit 7~0 11001010: IECM=1 – READ PORT function is enabled Others: IECM=0 – READ PORT function is disabled Port Control Register Bit –...
  • Page 71: Programming Considerations

    HT45F0035A Induction Cooker Flash MCU Programming Considerations Within the user program, one of the first things to consider is port initialisation. After a reset, all of the I/O data and port control registers will be set high. This means that all I/O pins will default to an input state, the level of which depends on the other connected circuitry and whether pull- high selections have been chosen.
  • Page 72 HT45F0035A Induction Cooker Flash MCU CLKSEL[1:0] T1PSC2~ T1PSC0 Prescaler Data bus T1M1 Reload 8-bit Timer/Event Counter T1M0 Preload Register C0INT00INT T1EG T1ECS Pulse Width 8-bit Timer/Event Overflow to T1M1~T1M0 Measurement Counter (TMR1) Interrupt Mode Control T1ON Note: The C0INT00INT is a high pulse signal from the Comparator 0 output. It should be noted that this signal cannot be used in pulse width measurement mode, and when used in event counter mode, the T1EG bit has no effect.
  • Page 73: Configuring The Timer/Event Counter Input Clock Source

    HT45F0035A Induction Cooker Flash MCU Configuring the Timer/Event Counter Input Clock Source For the Timer/Event Counter 0/1/3, the clock source can originate from either an external clock source or an internal clock source, while for the Timer/Event Counter 2, the clock source can only be from an internal clock source.
  • Page 74: Timer/Event Counter Register Description

    Bit 7~0 Timer/Event Counter Control Registers – TMR0C, TMR1C, TMR2C, TMR3C0/TMR3C1 The flexible features of the Holtek microcontroller Timer/Event Counters enable them to operate in several different modes, the options of which are determined by the contents of their respective control registers.
  • Page 75 HT45F0035A Induction Cooker Flash MCU For the Timer/Event Counter 0~2, the Timer Control Registers are known as TMRnC. For the Timer/Event Counter 3, the Timer Control Registers are a pair of registers and known as TMR3C0/ TMR3C1. The Timer Control Registers together with their corresponding timer registers control the full operation of the Timer/Event Counters.
  • Page 76 HT45F0035A Induction Cooker Flash MCU • TMR1C Register Name T1M1 T1M0 T1ECS T1ON T1EG T1PSC2 T1PSC1 T1PSC0 T1M1~T1M0: Timer/Event Counter 1 operation mode selection Bit 7~6 00: No mode available 01: Event counter mode 10: Timer mode 11: Pulse width measurement mode...
  • Page 77 HT45F0035A Induction Cooker Flash MCU Bit 3 Unimplemented, read as “0” Bit 2~0 T2PSC2~T2PSC0: Timer/Event Counter 2 prescaler rate selection Timer/Event Counter 2 internal clock f 000: f 001: f 010: f 011: f 100: f 101: f 110: f...
  • Page 78: Timer/Event Counter Operating Modes

    HT45F0035A Induction Cooker Flash MCU • TMR3C1 Register Name — — — — — T3RSEN — — — — — — — — — — Bit 7~6 Reserved, this bit must be fixed at “0” Bit 5~1 Unimplemented, read as “0”...
  • Page 79 HT45F0035A Induction Cooker Flash MCU To operate in this mode, the T0M1~T0M0 bits in the TMR0C register, the T1M1~T1M0 bits in the TMR1C register or the T3M1~T3M0 bits in the TMR3C0 register must be set to 01 respectively. In this mode, the TC0 pin or C0VOD signal, the TC1 pin or C0INT00INT signal, and the C0VOD or C0INT00INT signal can be used as the Timer/Event Counter 0/1/3 clock source, however it is not divided by the internal prescaler.
  • Page 80 HT45F0035A Induction Cooker Flash MCU pin, and the C0VOD signal, the Timer/Event Counter 0/1/3 will start counting until the TC0 pin or C0VOD signal, the TC1 pin, and the C0VOD signal returns to its original high level. At this point the enable bit will be automatically reset to zero and the Timer/Event Counter 0/1/3 will stop counting.
  • Page 81: I/O Interfacing

    HT45F0035A Induction Cooker Flash MCU PPG Retrigger Function Mode The Timer/Event Counter 3 has a PPG retrigger function mode for PPG usage. This mode is used to implement the PPG retrigger function. To operate in this mode, the T3M1~T3M0 bits in the TMR3C0 register must be set to 00 respectively.
  • Page 82: Timer/Event Counter Program Example

    HT45F0035A Induction Cooker Flash MCU generate an internal interrupt signal directing the program flow to the respective internal interrupt vector. For the pulse width measurement mode, the internal system clock is also used as the timer clock source but the Timer/Event Counter will only run when the correct logic condition appears on the TC0 pin or C0VOD signal, the TC1 pin, and the C0VOD signal.
  • Page 83: Analog To Digital Converter

    HT45F0035A Induction Cooker Flash MCU Timer/Event Counter Programming Example org 0ch ; CMP0 INT00 interrupt vector org 10h ; Timer/Event Counter 0 interrupt vector jmp tmr0int ; jump here when Timer/Event Counter 0 overflows org 20h ; main program ; internal Timer/Event Counter 0 interrupt routine tmr0int: ; Timer/Event Counter 0 main program placed here begin: ;...
  • Page 84: A/D Converter Register Description

    HT45F0035A Induction Cooker Flash MCU The accompanying block diagram shows the overall internal structure of the A/D converter, together with its associated registers. ÷ 2 SACKS[2:0] ADCEN (N=0~7) ADRFS A/D Clock OPOUT SADOL A/D Data A/D Converter Registers SADOH OPROUT...
  • Page 85 HT45F0035A Induction Cooker Flash MCU SADOH SADOL ADRFS D11 D10 D9 D11 D10 D9 A/D Converter Data Registers A/D Converter Control Registers – SADOL, SADOH To control the function and operation of the A/D converter, two control registers known as SADC0 and SADC1 are provided.
  • Page 86 HT45F0035A Induction Cooker Flash MCU Bit 4 ADRFS: A/D Converter data format control 0: ADC output data format → SADOH=D[11:4]; SADOL=D[3:0] 1: ADC output data format → SADOH=D[11:8]; SADOL=D[7:0] This bit controls the format of the 12-bit converted A/D converter value in the two A/D converter data registers.
  • Page 87: A/D Converter Reference Voltage

    HT45F0035A Induction Cooker Flash MCU A/D Converter Reference Voltage The actual reference voltage supply to the A/D Converter can be supplied from the positive power supply, V or an external reference source supplied on pin VREF. The desired selection is made using the SAVRS1~SAVRS0 bits in the SADC1 register.
  • Page 88: A/D Converter Clock Source

    HT45F0035A Induction Cooker Flash MCU A/D Converter Clock Source The clock source for the A/D converter, which originates from the system clock f , can be chosen to be either f or a subdivided version of f . The division ratio value is determined by the SACKS2~SACKS0 bits in the SADC1 register.
  • Page 89: Summary Of A/D Conversion Steps

    HT45F0035A Induction Cooker Flash MCU ON2ST ADCEN A/D sampling time A/D sampling time START Start of A/D conversion Start of A/D conversion Start of A/D conversion ADBZ End of A/D End of A/D conversion conversion SACS[3:0] 0011B 0010B 0000B 0001B...
  • Page 90: Programming Considerations

    HT45F0035A Induction Cooker Flash MCU • Step 9 The A/D conversion procedure can now be initialised by setting the START bit from low to high and then low again. • Step 10 If an A/D conversion is in progress, the ADBZ flag will be set high. After the A/D conversion process has completed, the ADBZ flag will go low after which the output data can be read from the SADOH and SADOL registers.
  • Page 91: A/D Converter Programming Examples

    HT45F0035A Induction Cooker Flash MCU A/D Converter Programming Examples The following two programming examples illustrate how to setup and implement an A/D conversion. In the first example, the method of polling the ADBZ bit in the SADC0 register is used to detect when the conversion cycle is complete, whereas in the second example, the A/D interrupt is used to determine when the conversion is complete.
  • Page 92: I 2 C Interface

    HT45F0035A Induction Cooker Flash MCU mov a,SADOL ; read low byte conversion result value mov SADOL_buffer,a ; save result to user defined register mov a,SADOH ; read high byte conversion result value mov SADOH_buffer,a ; save result to user defined register EXIT_INT_ISR: mov a,status_stack mov STATUS,a ; restore STATUS from user defined memory mov a,acc_stack ; restore ACC from user defined memory C Interface The I C interface is used to communicate with external peripheral devices such as sensors, EEPROM memory etc. Originally developed by Philips, it is a two line low speed serial interface for synchronous serial data transfer.
  • Page 93 HT45F0035A Induction Cooker Flash MCU Data Bus C Data Register C Address Register (IICD) (IICA) Address HAAS Address Match - Comparator C Interrupt Direction Control SCL Pin Debounce Data in MSB Shift Register Circuitry SDA Pin Read/Write Slave Data out MSB...
  • Page 94: I 2 C Registers

    HT45F0035A Induction Cooker Flash MCU C Registers There are three control registers associated with the I C bus, IICC0, IICC1 and IICTOC, one address register IICA and one data register, IICD. Register Name IICC0 — — — — IICDEB1 IICDEB0 IICEN —...
  • Page 95 HT45F0035A Induction Cooker Flash MCU • IICC0 Register Name — — — — IICDEB1 IICDEB0 IICEN — — — — — — — — — — — Bit 7~4 Unimplemented, read as “0” Bit 3~2 IICDEB1~IICDEB0: I C debounce time selection...
  • Page 96: C Bus Communication

    HT45F0035A Induction Cooker Flash MCU Bit 3 TXAK: I C bus transmit acknowledge flag 0: Slave send acknowledge flag 1: Slave do not send acknowledge flag The TXAK bit is the transmit acknowledge flag. After the slave device receipt of 8 bits of data, this bit will be transmitted to the bus on the 9th clock from the slave device.
  • Page 97 HT45F0035A Induction Cooker Flash MCU • Step 2 Write the slave address of the device to the I C bus address register IICA. • Step 3 Set the IICE interrupt enable bit of the interrupt control register to enable the I C interrupt.
  • Page 98 HT45F0035A Induction Cooker Flash MCU C Bus Read/Write Signal The SRW bit in the IICC1 register defines whether the master device wishes to read data from the C bus or write data to the I C bus. The slave device should examine this bit to determine if it is to be a transmitter or a receiver.
  • Page 99 HT45F0035A Induction Cooker Flash MCU Start Slave Address Data Stop S=Start (1 bit) SA=Slave Address (7 bits) SR=SRW bit (1 bit) M=Slave device send acknowledge bit (1 bit) D=Data (8 bits) A=ACK (RXAK bit for transmitter, TXAK bit for receiver, 1 bit)
  • Page 100: C Time-Out Control

    HT45F0035A Induction Cooker Flash MCU C Time-out Control In order to reduce the problem of I C lockup due to reception of erroneous clock sources, a time-out function is provided. If the clock source to the I C is not received for a while, then the I C circuitry and registers will be reset after a certain time-out period.
  • Page 101: Programmable Pulse Generator - Ppg

    HT45F0035A Induction Cooker Flash MCU Programmable Pulse Generator – PPG The device includes a Programmable Pulse Generator, PPG, which privdes a 9-bit PPG output channel and an 8-bit PPG2 output channel. The PPG has a programmable period of 512×T, where T is 1/f or 2/f for an output pulse width.
  • Page 102: Programmable Pulse Generator Registers

    HT45F0035A Induction Cooker Flash MCU The PPG detects a trigger input and outputs a single pulse. The trigger source may come from a C0INT00INT falling edge, a Timer/Event Counter 3 retrigger mode output signal PPGRTG or a software trigger bit (PST), which can be configured by software. The PPG1 can output an active high, inactive low by setting the PPGPC register.
  • Page 103 HT45F0035A Induction Cooker Flash MCU In the hardware automatic modify mode, the considerations listed in the following table must be taken into account when modifying the relevant bits. C1VOD Unchangeable PPGSAMD PPGSAEN PPGTMMD[1:0] PPGDEC[3:0] Mode Description Signal Bits 0000 —...
  • Page 104 HT45F0035A Induction Cooker Flash MCU Bit 3 C5PSPEN: Stop the PPG counter using the C5VOD falling edge trigger input enable control 0: Disable 1: Enable When stopping the PPG counter using the C5VOD trigger input is disabled, the PPG module output can be stopped by the software control bit, PST, only. When stopping...
  • Page 105 HT45F0035A Induction Cooker Flash MCU Bit 6 C5RLEN: C5VOD falling edge to set RLBF for PPG counter being reloaded from preload register B enable control 0: Disable 1: Enable Bit 5 C3RLEN: C3VOD falling edge to set RLBF for PPG counter being reloaded from...
  • Page 106 HT45F0035A Induction Cooker Flash MCU Note: When using the PPG function, the most important point to note is to ensure that the CMP1 settings and C1VOD signal set high before setting the PPGC2 register. Since the C1VOD signal state is unknown, if PPGDEC[3:0]≠0000, the...
  • Page 107 HT45F0035A Induction Cooker Flash MCU a C4VOD rising trigger occurs; or if PPGSAMD=1 and PPGHTMD=1, when the PPGTON bit changes from 0 to 1. Bit 0 PPGADF: PPGTA approach PPGTD operation complete flag 0: PPGTA approach PPGTD operation has not completed 1: PPGTA approach PPGTD operation has completed This bit can be cleared to zero by software, but it cannot be set high by software.
  • Page 108 HT45F0035A Induction Cooker Flash MCU Note: 1. When PPGCNT[1:0]=00/11, the PPGCNT[1:0] bits will not increase or decrease according to PPGACNT[1:0] and will be fixed at 00 or 11. 2. In the hardware approach mode, when PPGACNT[1:0]=10, it is increased by 1 in the t1~t2 interval and decreased by 1 in the t2~t3 interval. When PPGACNT[1:0]=11, it is decreased by 1 in the t1~t2 interval and increased by 1 in the t2~t3 interval.
  • Page 109 HT45F0035A Induction Cooker Flash MCU • PPGTEX Register Name — PPGTD8 — PPGTB8 — PPGTC8 — PPGTA8 — — — — — — — — “x”: Unknown Bit 7 Unimplemented, read as “0” Bit 6 PPGTD8: PPG counter approach register D bit 8 Bit 5 Unimplemented, read as “0”...
  • Page 110 HT45F0035A Induction Cooker Flash MCU Bit 3~2 Unimplemented, read as “0” Bit 1~0 PPGTPSC1~PPGTPSC0: PPGTIMER prescaler rate selection 00: f /128 01: f /256 10: f /512 11: f /1024 • PPGTMR1 Register Name D7~D0: PPGTIMER preload register T1 bit 7 ~ bit 0 Bit 7~0 •...
  • Page 111 HT45F0035A Induction Cooker Flash MCU • PPGRN Register Name — PPGRN6 PPGRN5 PPGRN4 PPGRN3 PPGRN2 PPGRN1 PPGRN0 — — Bit 7 Unimplemented, read as “0” Bit 6~0 PPGRN6~PPGRN0: PPG1 software retrigger times setting • PPG2CT Register Name PPG2CT7 PPG2CT6 PPG2CT5 PPG2CT4 PPG2CT3 PPG2CT2 PPG2CT1 PPG2CT0...
  • Page 112 HT45F0035A Induction Cooker Flash MCU PPG2 Output Mode PPG2 Output Waveform PPG1 PPG2M[1:0]=10 PPG2 Note: “S” means PPG2S[7:0]. PPG1 S+I×2 S+I×3 S+I×n(≤E) E PPG2M[1:0]=11 PPG2 Note: “S” means PPG2S[7:0]; “E” means PPG2E[7:0]; “I” means PPG2I[5:0]; “n” means number of increments.
  • Page 113: Writing Data To Ppgta~Ppgtd & Ppgtex Register Description

    HT45F0035A Induction Cooker Flash MCU Writing Data to PPGTA~PPGTD & PPGTEX Register Description When writing data to the PPGTA~PPGTD & PPGTEX registers, users need to write the high byte first after which the low byte can be written. This means that the PPGTA8/PPGTB8/PPGTC8/ PPGTD8 bit in the PPGTEX register must be written first, after which the PPGTA[7:0]/PPGTB[7:0]/ PPGTC[7:0]/PPGTD[7:0] bits in the corresponding register can be written.
  • Page 114: Ppg Synchronised With Clock Description

    HT45F0035A Induction Cooker Flash MCU The PPG non-retrigger and retrigger signals are shown in the following table. Timer/Event T2ON/ INH/ TnM[1:0] TnRSEN Overflow or not Description Counter n T3ON PPGRTG No overflow INH=1 Inhibit PPG retrigger (Non-retrigger Mode) Overflow INH=0...
  • Page 115: To Start The Ppg Operation

    HT45F0035A Induction Cooker Flash MCU Example 2: Since the first trigger type is a rising edge after the PPG starts, the PPG counter is triggered by a rising edge until the PPG stops. PPG Clock Start Trigger PPG Pulse < 0.5×t...
  • Page 116: Using Ppg Retrigger Counter Output Signal To Trigger Ppg Module Setting Steps

    HT45F0035A Induction Cooker Flash MCU Using PPG Retrigger Counter Output Signal to Trigger PPG Module Setting Steps • Step 1, set PPG retrigger duty counter trigger cycle: set PPGRT [6:0], then go to step 2 • Step 2, set PPG retrigger times counter trigger times: set PPGRN[6:0], then go to step 3 •...
  • Page 117: To Stop The Ppg Function

    HT45F0035A Induction Cooker Flash MCU 2. PPG2 has a same output width with PPG1: When the PPG2EN=1 and PPG2M[1:0]=01, PPG2 has a same output width with PPG1. PPG1 PPG2 3. PPG2 output fixed width: When the PPG2EN=1 and PPG2M[1:0]=10, the output width of PPG2 is set according to the PPG2C1 register.
  • Page 118 HT45F0035A Induction Cooker Flash MCU Software Stop After the PST bit is cleared by the software, PPG1 & PPG2 stops output, as shown in the following figure. PPG1 PPG2 Hardware Stop The PPG hardware stop is implemented by CnVOD (n=1/2/3/5) falling edge trigger together with the CnPSPEN bits.
  • Page 119 HT45F0035A Induction Cooker Flash MCU C3LEBEN = x C3LEBEN = 0 C3LEBEN = 1 CnPSPEN C0INT00INT CnVOD PRSEN PPG1 PPGDIS • n=5: CnVOD CnPSPEN OVCEN PRSEN PPGDIS PPG1 0/↑/1/↓ 0/↑/1/ 0→0 floating u→0 1→0 floating ↓ 0→0 u→0 floating 1→0 floating “x”: Don’t care;...
  • Page 120: Ppg Load Register Function

    HT45F0035A Induction Cooker Flash MCU To reload the pulse width limit function: • Pulse width limit timer overflow • PPG is triggered PPG Load Register Function The PPG can select load register by software setting (RLBF bit), or by C1VOD, C3VOD, or C5VOD falling edge trigger (C1RLEN/C3RLEN/C5RLEN=1).
  • Page 121 HT45F0035A Induction Cooker Flash MCU Software Approach Mode – PPGSAMD=0 Users can select when to start the PPGTA approach function, PPGTA approach PPGTC or PPGTD. When PPGSAEN=1, the PPGADJF bit will also be set to high by the hardware. At this time, the...
  • Page 122 HT45F0035A Induction Cooker Flash MCU Hardware Approach Mode – PPGSAMD=1 In the hardware approach mode, how the PPGTA changes depends on the PPGTIMER timing interval. The PPGTIMER counter has two trigger signals which are selected by the PPGHTMD bit. The PPGTIMER counter will be started if an active C4VOD rising edge trigger source is occurred or the PPGTON bit changes from 0 to 1 by software.
  • Page 123 HT45F0035A Induction Cooker Flash MCU The following summarises the individual steps that should be executed in order to implement a PPGTA approaching process in the hardware approach Mode. Write the initial value to the PPGTA~PPGTD & PPGTEX registers. Note that the high byte, PPGTEX, needs to be written first after which the low byte, PPGTA~PPGTD, can be written to ensure the PPGTA[8:0]~PPGTD[8:0] bits will be correctly written.
  • Page 124 HT45F0035A Induction Cooker Flash MCU Signals/ C0INT00INT C4VOD PPGSAEN PPGADJF PPGTMMD[1:0] PPGTON PPGTA[8:0] PPGTC[8:0] PPGTD[8:0] PPGACF PPGADF Bits 0 / 1 /  t0~t1           t1~t2     ...
  • Page 125 HT45F0035A Induction Cooker Flash MCU Zero crossing Zero crossing Zero crossing by Software by Software by Software CMP4DA Code C4VOD PPGTON PPGADJF PPGTMMD[1:0] PPGTIMER PPGTMR1 PPGTMR2 PPGTMR3 PPGTMR1 PPGTMR2 PPGTMR3 Counter PPGTC PPGTC (New) PPGTD (New) PPGTA PPGTD PPGTA (New)
  • Page 126: Igbt Driver

    HT45F0035A Induction Cooker Flash MCU IGBT Driver The device includes a level shifter and a voltage detection circuit. The following is a description of their operation. Level Shifter The internal level shifter input are PWM1 and PWM2 pins with input logic levels referenced by .
  • Page 127: Comparators

    HT45F0035A Induction Cooker Flash MCU Comparators The device has six integrated comparators, known as CMP0~CMP5. Five of the comparators, CMP1~CMP5, which have a D/A converter, are used for over voltage protection functions, which provide protection mechanisms or generate output signals for different applications, such as over voltage detection, surge voltage detection, over current detection (valley detection) and zero crossing detection.
  • Page 128: Comparator Registers

    HT45F0035A Induction Cooker Flash MCU Comparator Registers The overall operation of the internal comparators is controlled using a series of registers. Register Name CMP0C0 C0CMPOP C0COFM C0COF5 C0COF4 C0COF3 C0COF2 C0COF1 C0COF0 CMP0C1 C0EN C0HYSON1 C0HYSON0 TRGMOD C0VOINV INTS C0CRS1 C0CRS0...
  • Page 129 HT45F0035A Induction Cooker Flash MCU Bit 2 INTS: INT00 source selection 0: PPGIN 1: C0VO C0CRS1~C0CRS0: Comparator 0 offset voltage calibration reference input selection Bit 1~0 00: Comparator 0 negative input is selected 01: Comparator 0 positive input is selected...
  • Page 130 HT45F0035A Induction Cooker Flash MCU Bit 5 CnCRS: Comparator n offset voltage calibration reference input selection 0: Comparator 1 negative input is selected 1: Comparator 1 positive input is selected CnCOF4~CnCOF0: Comparator n input voltage offset calibration setting Bit 4~0 •...
  • Page 131 HT45F0035A Induction Cooker Flash MCU Bit 6~5 CnHYSON1~CnHYSON0: Comparator n hysteresis voltage window control bits Refer to the Comparator Electrical Characteristics section to obtain the exact value. CnVOD: Comparator n output bit after debounce Bit 4 If CnVOINV=0: 0: Positive input voltage < negative input voltage 1: Positive input voltage >...
  • Page 132 HT45F0035A Induction Cooker Flash MCU • CMPCTL1 Register Name — — — — — — C5CTL1 C5CTL0 — — — — — — — — — — — — Bit 7~2 Unimplemented, read as “0” Bit 1~0 C5CTL1~C5CTL0: Comparator 5 negative input selection...
  • Page 133: Comparator Input Offset Calibration Function (N=0, M=5; N=1~5, M=4)

    HT45F0035A Induction Cooker Flash MCU Comparator Input Offset Calibration Function (n=0, m=5; n=1~5, m=4) The comparator n includes an input offset calibration function. The calibrated data is stored in the CnCOF[m:0] bits. The CnCOFM is the calibration mode control bit and the CnCRS or C0CRS[1:0] is used to indicate the input reference voltage source in the calibration mode.
  • Page 134: Valley Detection Function

    HT45F0035A Induction Cooker Flash MCU Valley Detection Function When C3LEBEN=1 and the INT0S has an effective trigger source signal, the C3LEBD signal will be generated after a delay time which is set by C3LD[5:0]. Then the C3LEBD signal is used to detect the C3VOD signal which in turn triggers the interrupt function, as described below: If C3VOINV=0 and the detected C3VOD signal is “0”, then the CMP3INT will be triggered.
  • Page 135 HT45F0035A Induction Cooker Flash MCU OPINN1 OPG[1:0] OPS1 OPS2 OPAR2 OPOOFM OPAR1 OPINN0 OPAMP OPOUT 6.6kΩ OPS0 OPOUT (To A/D Converter OPEN & Comparator 3) OPAR4 OPROUT OPINP 10kΩ OPROUT OPS4 OPS3 (To A/D Converter) OPAR3 1kΩ Operational Amplifier Block Diagram...
  • Page 136 HT45F0035A Induction Cooker Flash MCU Bit 1~0 OPG1~OPG0: R2/R1 ratio selection 00: R2/R1=20 01: R2/R1=30 10: R2/R1=40 11: R2/R1=60 Note that the internal resistors, R1 and R2, should be used when the gain is determined by these bits. This means the OPINN0 pin should be selected and the S2 switch should be on.
  • Page 137: Input Voltage Range

    HT45F0035A Induction Cooker Flash MCU Input Voltage Range Together with different PGA operating modes, the input voltage on the OPAMP pins can be positive or negative for flexible application. There are two operating mode examples below. In these examples the internal resistors, R1 and R2, are used respectively.
  • Page 138: Pulse Width Modulator

    HT45F0035A Induction Cooker Flash MCU Pulse Width Modulator The device has one 8-bit pulse width modulation function. Useful for applications such as buzzer control, the PWM function provides an output with a fixed frequency but with a duty cycle that can be varied by setting particular values into the PWMDATA register.
  • Page 139: Pwm Operation

    HT45F0035A Induction Cooker Flash MCU • PWMDATA Register Name D7~D0: PWM output duty cycle PWMD bit 7 ~ bit 0 Bit 7~0 Note that the duty cycle value PWMD, once being changed, will reflect on the PWMO output signal immediately. Therefore, a sudden PWM duty change will occur in the current PWM cycle, resulting in undesired waveform, which only lasts for a PWM cycle.
  • Page 140: Peripheral Clock Output

    HT45F0035A Induction Cooker Flash MCU The following diagram illustrates the waveforms associated with the (6+2) bits mode of PWM operation. It is important to note how the single PWM cycle is subdivided into 4 individual modulation cycles, numbered from 0~3 and how the AC value is related to the PWM value. The waveforms of PWM outputs are as shown below.
  • Page 141: Peripheral Clock Output Register

    HT45F0035A Induction Cooker Flash MCU The PCK output truth table is shown below: PCKEN PCKD PCKPOL PCK Output Peripheral Clock Output Register The peripheral clock output function is controlled by the PCKC register. • PCKC Register Name — PCKD PCKPOL PCKEN PCKPSC3 PCKPSC2 PCKPSC1 PCKPSC0 —...
  • Page 142: Cyclic Redundancy Check - Crc

    HT45F0035A Induction Cooker Flash MCU Cyclic Redundancy Check – CRC The Cyclic Redundancy Check, CRC, calculation unit is an error detection technique test algorithm and uses to verify data transmission or storage data correctness. A CRC calculation takes a data stream or a block of data as input and generates a 16-bit output remainder.
  • Page 143: Crc Operation

    HT45F0035A Induction Cooker Flash MCU • CRCDL Register Name D7~D0: 16-bit CRC checksum low byte data register Bit 7~0 • CRCDH Register Name D7~D0: 16-bit CRC checksum high byte data register Bit 7~0 CRC Operation The CRC generator provides the 16-bit CRC result calculation based on the CRC16 and CCITT CRC16 polynomials.
  • Page 144 HT45F0035A Induction Cooker Flash MCU CRC Calculation Examples: • Write 1 byte input data into the CRCIN register and the corresponding CRC checksum are individually calculated as the following table shown. CRC Data Input CRC Polynomial CRC-CCITT (X +1) 0000H 1021H 2042H 3063H 4084H 50A5H 60C6H 70E7H...
  • Page 145: Low Voltage Detector - Lvd

    HT45F0035A Induction Cooker Flash MCU Low Voltage Detector – LVD The device has a Low Voltage Detector function, also known as LVD. This enabled the device to monitor the power supply voltage, V , or the LVDIN pin input voltage, and provide a warning signal should it fall below a certain level.
  • Page 146: Lvd Operation

    HT45F0035A Induction Cooker Flash MCU When the VLVD2~VLVD0 bits are set to 000B, the LVD function will be implemented by comparing the LVDIN pin input voltage with the LVD reference voltage of 1.23V. When the VLVD2~VLVD0 bits are set to any other value except 000B, the LVD...
  • Page 147: Interrupt Registers

    HT45F0035A Induction Cooker Flash MCU Legend EMI auto disabled in ISR Request Flag, no auto reset in ISR Request Master Priority Interrupt Name Enable Bits Vector Request Flag, auto reset in ISR Flags Enable High Enable Bits Comp.4 CP4F CP4E Comp.1...
  • Page 148 HT45F0035A Induction Cooker Flash MCU Function Enable Bit Request Flag Notes EEPROM erase or write operation — — Multi-function MFnE MFnF n=0~3 Timer/Event Counter n=0~3 IICE IICF — Interrupt Register Bit Naming Conventions Register Name INTC0 — C0INT00F CP1F CP4F...
  • Page 149 HT45F0035A Induction Cooker Flash MCU • INTC1 Register Name CP3F CP2F CP3E CP2E Bit 7 CP3F: Comparator 3 interrupt request flag 0: No request 1: Interrupt request Bit 6 CP2F: Comparator 2 interrupt request flag 0: No request 1: Interrupt request...
  • Page 150 HT45F0035A Induction Cooker Flash MCU • INTC3 Register Name IICF MF1F MF0F MF3F IICE MF1E MF0E MF3E IICF: I Bit 7 C interrupt request flag 0: No request 1: Interrupt request Bit 6 MF1F: Multi-function 1 interrupt request flag 0: No request...
  • Page 151 HT45F0035A Induction Cooker Flash MCU • MFI1 Register Name — — PPGRNF — — PPGRNE — — — — — — — — Bit 7~6 Unimplemented, read as “0” Bit 5 T3F: Timer/Event Counter 3 interrupt request flag 0: No request...
  • Page 152: Interrupt Operation

    HT45F0035A Induction Cooker Flash MCU • MFI3 Register Name — — PPGTMF — — PPGTME — — — — — — — — Bit 7~6 Unimplemented, read as “0” Bit 5 T2F: Timer/Event Counter 2 interrupt request flag 0: No request...
  • Page 153: Comparator Interrupts

    HT45F0035A Induction Cooker Flash MCU IDLE Mode, however to prevent a wake-up from occurring the corresponding flag should be set before the device is in SLEEP or IDLE Mode. Comparator Interrupts The device has six comparator interrupts, controlled by the internal Comparator 0~5. The Comparator 0 interrupt is contained within the Multi-function interrupt and the Comparator 1~5 interrupts are individual interrupts.
  • Page 154: A/D Converter Interrupt

    HT45F0035A Induction Cooker Flash MCU A/D Converter Interrupt The A/D Converter interrupt is controlled by the termination of an A/D conversion process. An A/D Converter interrupt request will take place when the A/D Converter interrupt request flag, ADF, is set, which occurs when the A/D conversion process finishes. To allow the program to branch to its respective interrupt vector address, the global interrupt enable bit, EMI, and A/D interrupt enable bit, ADE, must first be set.
  • Page 155: Ppgtimer Interrupt

    HT45F0035A Induction Cooker Flash MCU interrupt is serviced, the related Multi-Function request flag will be automatically reset and the EMI bit will be automatically cleared to disable other interrupts. However, it must be noted that, although the Multi-function interrupt request flags will be...
  • Page 156: Interrupt Wake-Up Function

    HT45F0035A Induction Cooker Flash MCU Interrupt Wake-up Function Each of the interrupt functions has the capability of waking up the microcontroller when in the SLEEP or IDLE Mode. A wake-up is generated when an interrupt request flag changes from low to high and is independent of whether the interrupt is enabled or not.
  • Page 157: Application Circuits

    HT45F0035A Induction Cooker Flash MCU Application Circuits Rev. 1.00 March 15, 2024...
  • Page 158: Instruction Set

    In the case of Holtek microcontroller, a comprehensive and flexible set of over 60 instructions is provided to enable programmers to implement their application with the minimum of programming overheads.
  • Page 159: Logical And Rotate Operation

    The standard logical operations such as AND, OR, XOR and CPL all have their own instruction within the Holtek microcontroller instruction set. As with the case of most instructions involving data manipulation, data must pass through the Accumulator which may involve additional programming steps.
  • Page 160: Instruction Set Summary

    HT45F0035A Induction Cooker Flash MCU Instruction Set Summary The instructions related to the data memory access in the following table can be used when the desired data memory is located in Data Memory sector 0. Table Conventions x: Bits immediate data...
  • Page 161 HT45F0035A Induction Cooker Flash MCU Mnemonic Description Cycles Flag Affected Data Move MOV A,[m] Move Data Memory to ACC None MOV [m],A Move ACC to Data Memory Note None MOV A,x Move immediate data to ACC None Bit Operation CLR [m].i...
  • Page 162: Extended Instruction Set

    HT45F0035A Induction Cooker Flash MCU Extended Instruction Set The extended instructions are used to support the full range address access for the data memory. When the accessed data memory is located in any data memory sector except sector 0, the extended instruction can be used to directly access the data memory instead of using the indirect addressing access.
  • Page 163 HT45F0035A Induction Cooker Flash MCU Mnemonic Description Cycles Flag Affected Branch LSZ [m] Skip if Data Memory is zero Note None LSZA [m] Skip if Data Memory is zero with data movement to ACC Note None LSNZ [m] Skip if Data Memory is not zero...
  • Page 164: Instruction Definition

    HT45F0035A Induction Cooker Flash MCU Instruction Definition ADC A,[m] Add Data Memory to ACC with Carry Description The contents of the specified Data Memory, Accumulator and the carry flag are added. The result is stored in the Accumulator. Operation ACC ← ACC + [m] + C...
  • Page 165 HT45F0035A Induction Cooker Flash MCU ANDM A,[m] Logical AND ACC to Data Memory Description Data in the specified Data Memory and the Accumulator perform a bitwise logical AND operation. The result is stored in the Data Memory. Operation [m] ← ACC “AND” [m]...
  • Page 166 HT45F0035A Induction Cooker Flash MCU DAA [m] Decimal-Adjust ACC for addition with result in Data Memory Description Convert the contents of the Accumulator value to a BCD (Binary Coded Decimal) value resulting from the previous addition of two BCD variables. If the low nibble is greater than 9 or if AC flag is set, then a value of 6 will be added to the low nibble.
  • Page 167 HT45F0035A Induction Cooker Flash MCU JMP addr Jump unconditionally Description The contents of the Program Counter are replaced with the specified address. Program execution then continues from this new address. As this requires the insertion of a dummy instruction while the new address is loaded, it is a two cycle instruction.
  • Page 168 HT45F0035A Induction Cooker Flash MCU Return from subroutine Description The Program Counter is restored from the stack. Program execution continues at the restored address. Operation Program Counter ← Stack Affected flag(s) None RET A,x Return from subroutine and load immediate data to ACC...
  • Page 169 HT45F0035A Induction Cooker Flash MCU RLCA [m] Rotate Data Memory left through Carry with result in ACC Description Data in the specified Data Memory and the carry flag are rotated left by 1 bit. Bit 7 replaces the Carry bit and the original carry flag is rotated into the bit 0. The rotated result is stored in the Accumulator and the contents of the Data Memory remain unchanged.
  • Page 170 HT45F0035A Induction Cooker Flash MCU SBC A, x Subtract immediate data from ACC with Carry Description The immediate data and the complement of the carry flag are subtracted from the Accumulator. The result is stored in the Accumulator. Note that if the result of subtraction is negative, the C flag will be cleared to 0, otherwise if the result is positive or zero, the C flag will be set to 1.
  • Page 171 HT45F0035A Induction Cooker Flash MCU SIZ [m] Skip if increment Data Memory is 0 Description The contents of the specified Data Memory are first incremented by 1. If the result is 0, the following instruction is skipped. As this requires the insertion of a dummy instruction while the next instruction is fetched, it is a two cycle instruction.
  • Page 172 HT45F0035A Induction Cooker Flash MCU SUB A,x Subtract immediate data from ACC Description The immediate data specified by the code is subtracted from the contents of the Accumulator. The result is stored in the Accumulator. Note that if the result of subtraction is negative, the C flag will be cleared to 0, otherwise if the result is positive or zero, the C flag will be set to 1.
  • Page 173 HT45F0035A Induction Cooker Flash MCU TABRD [m] Read table (specific page) to TBLH and Data Memory Description The low byte of the program code (specific page) addressed by the table pointer (TBLP and TBHP) is moved to the specified Data Memory and the high byte moved to TBLH.
  • Page 174: Extended Instruction Definition

    HT45F0035A Induction Cooker Flash MCU Extended Instruction Definition The extended instructions are used to directly access the data stored in any data memory sections. LADC A,[m] Add Data Memory to ACC with Carry Description The contents of the specified Data Memory, Accumulator and the carry flag are added.
  • Page 175 HT45F0035A Induction Cooker Flash MCU LCLR [m] Clear Data Memory Description Each bit of the specified Data Memory is cleared to 0. Operation [m] ← 00H Affected flag(s) None LCLR [m].i Clear bit of Data Memory Description Bit i of the specified Data Memory is cleared to 0.
  • Page 176 HT45F0035A Induction Cooker Flash MCU LDECA [m] Decrement Data Memory with result in ACC Description Data in the specified Data Memory is decremented by 1. The result is stored in the Accumulator. The contents of the Data Memory remain unchanged.
  • Page 177 HT45F0035A Induction Cooker Flash MCU LRL [m] Rotate Data Memory left Description The contents of the specified Data Memory are rotated left by 1 bit with bit 7 rotated into bit 0. Operation [m].(i+1) ← [m].i; (i=0~6) [m].0 ← [m].7...
  • Page 178 HT45F0035A Induction Cooker Flash MCU LRRA [m] Rotate Data Memory right with result in ACC Description Data in the specified Data Memory is rotated right by 1 bit with bit 0 rotated into bit 7. The rotated result is stored in the Accumulator and the contents of the Data Memory remain unchanged.
  • Page 179 HT45F0035A Induction Cooker Flash MCU LSDZ [m] Skip if decrement Data Memory is 0 Description The contents of the specified Data Memory are first decremented by 1. If the result is 0 the following instruction is skipped. As this requires the insertion of a dummy instruction while the next instruction is fetched, it is a three cycle instruction.
  • Page 180 HT45F0035A Induction Cooker Flash MCU LSIZA [m] Skip if increment Data Memory is zero with result in ACC Description The contents of the specified Data Memory are first incremented by 1. If the result is 0, the following instruction is skipped. The result is stored in the Accumulator but the specified Data Memory contents remain unchanged.
  • Page 181 HT45F0035A Induction Cooker Flash MCU LSWAP [m] Swap nibbles of Data Memory Description The low-order and high-order nibbles of the specified Data Memory are interchanged. Operation [m].3~[m].0 ↔ [m].7~[m].4 Affected flag(s) None LSWAPA [m] Swap nibbles of Data Memory with result in ACC Description The low-order and high-order nibbles of the specified Data Memory are interchanged.
  • Page 182 HT45F0035A Induction Cooker Flash MCU LTABRDL [m] Read table (last page) to TBLH and Data Memory Description The low byte of the program code (last page) addressed by the table pointer (TBLP) is moved to the specified Data Memory and the high byte moved to TBLH.
  • Page 183: Package Information

    HT45F0035A Induction Cooker Flash MCU Package Information Note that the package information provided here is for consultation purposes only. As this information may be updated at regular intervals users are reminded to consult the Holtek website the latest version of the Package/Carton Information.
  • Page 184: 20-Pin Sop (300Mil) Outline Dimensions

    HT45F0035A Induction Cooker Flash MCU 20-pin SOP (300mil) Outline Dimensions Dimensions in inch Symbol Min. Nom. Max. 0.406 BSC 0.295 BSC 0.012 — 0.020 C’ 0.504 BSC — — 0.104 0.050 BSC 0.004 — 0.012 0.016 — 0.050 0.008 —...
  • Page 185 HOLTEK disclaims all liability arising from the information and its application. In addition, HOLTEK does not recommend the use of HOLTEK’s products where there is a risk of personal hazard due to malfunction or other reasons. HOLTEK hereby declares that it does not authorise the use of these products in life-saving, life-sustaining or safety critical components.

Table of Contents