HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Table of Contents Features ......................7 CPU Features ......................... 7 Peripheral Features ......................... 7 General Description ..................8 Selection Table ....................8 Block Diagram ....................9 Pin Assignment ....................9 Pin Descriptions ....................
Page 3
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM In Application Programming – IAP ..................58 Data Memory ....................67 Structure ..........................67 Data Memory Addressing ...................... 68 General Purpose Data Memory .................... 68 Special Purpose Data Memory ..................... 68 Special Function Register Description ............
Page 4
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Input/Output Ports ..................110 Pull-high Resistors .......................112 Port A Wake-up ........................112 I/O Port Control Registers ....................113 I/O Port Source Current Control ...................113 Pin-shared Functions ......................117 I/O Pin Structures ........................ 130 READ PORT Function......................131 Programming Considerations ....................
Page 5
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM SPIA Operation ........................202 Error Detection ........................203 UART Interface ..................... 204 UART External Pin ......................205 UART Data Transfer Scheme....................205 UART Status and Control Registers..................205 Baud Rate Generator ......................210 UART Setup and Control......................211...
Page 6
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM EEPROM Interrupt ......................260 Serial Interface Module Interrupt ..................260 SPIA Interface Interrupt ....................... 261 UART Transfer Interrupt ...................... 261 Comparator Interrupt ......................261 Time Base Interrupt ......................262 Interrupt Wake-up Function ....................264 Programming Considerations ....................
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Features CPU Features • Operating Voltage: =8MHz: 2.2V~5.5V ♦ =12MHz: 2.7V~5.5V ♦ =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 •...
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM General Description This series of devices are LCD type Flash Memory 8-bit high performance RISC architecture microcontrollers which are designed for a wide range of applications. Offering users the convenience of Flash Memory multi-programming features, these devices also include a wide range of functions and features.
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Pin Descriptions With the exception of the power pins, all pins on these devices can be referenced by their Port name, e.g. PA0, PA1, etc., which refer to the digital I/O function of the pins. However these Port pins are also shared with other function such as the Analog to Digital Converter, Timer Module pins, etc.
Page 15
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Pad Name Function Description PAWU General purpose I/O. Register enabled pull-up PAPU CMOS and wake-up. PAS1 PAS1 INTEG INT3 — External Interrupt 3 INTC3 PA5/INT3/SCK/SCL/ IFS2 SEG23 PAS1 CMOS SPI serial clock...
Page 16
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Pad Name Function Description PBPU CMOS General purpose I/O. Register enabled pull-up. PBS0 PBS0 PTP2I — PTM2 capture input PB3/PTP2I/PTP2/SEG27 IFS1 PTP2 PBS0 — CMOS PTM2 output SEG27 PBS0 —...
Page 17
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Pad Name Function Description PCPU CMOS General purpose I/O. Register enabled pull-up. PCS0 PCS0 PTCK0 — PTM0 clock input IFS0 PC3/PTCK0/PTP4I/ PTP4I PCS0 — PTM4 capture input PTP4/AN3/SEG50 PTP4 PCS0 —...
Page 18
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Pad Name Function Description PDPU CMOS General purpose I/O. Register enabled pull-up. PDS0 PDS0 INTEG INT2 — External Interrupt 2 INTC3 PD0/INT2/STP1I/STP1/ IFS2 AN8/SEG45 PDS0 STP1I — STM1 capture input...
Page 19
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Pad Name Function Description PDPU CMOS General purpose I/O. Register enabled pull-up. PDS1 PDS1 STP2I — STM2 capture input PD6/STP2I/STP2/C1X/ IFS1 SEG33 STP2 PDS1 — CMOS STM2 output PDS1 —...
Page 20
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Pad Name Function Description PFPU CMOS General purpose I/O. Register enabled pull-up. PFS0 PF1/SDO/SEG14 PFS0 — CMOS SPI data output SEG14 PFS0 — LCD segment output PFPU CMOS General purpose I/O. Register enabled pull-up.
Page 21
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Pad Name Function Description PGPU CMOS General purpose I/O. Register enabled pull-up. PGS1 PG7/COM3 COM3 PGS1 — LCD common output PJPU CMOS General purpose I/O. Register enabled pull-up. PJS0 PJ0/COM4/SEG0...
Page 22
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM HT67F2360 Pad Name Function Description PAWU General purpose I/O. Register enabled pull-up PAPU CMOS and wake-up. PAS0 PA0/SEG30/ICPDA/ SEG30 PAS0 — LCD segment output OCDSDA ICPDA — CMOS ICP Data/Address pin OCDSDA —...
Page 23
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Pad Name Function Description PAWU General purpose I/O. Register enabled pull-up PAPU CMOS and wake-up. PAS1 PAS1 INTEG INT3 — External Interrupt 3 INTC3 PA5/INT3/SCK/SCL/ IFS2 SEG23 PAS1 CMOS SPI serial clock...
Page 24
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Pad Name Function Description PBPU CMOS General purpose I/O. Register enabled pull-up. PBS0 PBS0 PTP2I — PTM2 capture input PB3/PTP2I/PTP2/SEG27 IFS1 PTP2 PBS0 — CMOS PTM2 output SEG27 PBS0 —...
Page 25
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Pad Name Function Description PCPU CMOS General purpose I/O. Register enabled pull-up. PCS0 PCS0 PTCK0 — PTM0 clock input IFS0 PC3/PTCK0/PTP4I/ PCS0 PTP4I — PTM4 capture input PTP4/AN3/SEG50 IFS3 PTP4 PCS0 —...
Page 26
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Pad Name Function Description PDPU CMOS General purpose I/O. Register enabled pull-up. PDS0 PDS0 INTEG INT2 — External Interrupt 2 INTC3 PD0/INT2/STP1I/STP1/ IFS2 AN8/SEG45 PDS0 STP1I — STM1 capture input...
Page 27
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Pad Name Function Description PDPU CMOS General purpose I/O. Register enabled pull-up. PDS1 PDS1 STP2I — STM2 capture input PD6/STP2I/STP2/C1X/ IFS1 SEG33 STP2 PDS1 — CMOS STM2 output PDS1 —...
Page 28
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Pad Name Function Description PFPU CMOS General purpose I/O. Register enabled pull-up. PFS0 PF1/SDO/SEG14 PFS0 — CMOS SPI data output SEG14 PFS0 — LCD segment output PFPU CMOS General purpose I/O. Register enabled pull-up.
Page 29
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Pad Name Function Description PGPU CMOS General purpose I/O. Register enabled pull-up. PGS0 PG2/COM2 COM2 PGS0 — LCD common output PGPU CMOS General purpose I/O. Register enabled pull-up. PGS0 PG3/COM3...
Page 30
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Pad Name Function Description PHPU CMOS General purpose I/O. Register enabled pull-up. PHS1 PHS1 PH5/PTCK7/AN15/ PTCK7 — PTM7 clock input IFS3 SEG39 AN15 PHS1 — A/D Converter analog input SEG39 PHS1 —...
Page 31
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Pad Name Function Description PJPU CMOS General purpose I/O. Register enabled pull-up. PJS1 PJ7/PTCK4/SEG11 PJS1 PTCK4 — PTM4 clock input IFS3 SEG11 PJS1 — LCD segment output — — Positive power supply —...
Page 32
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Pad Name Function Description PAWU General purpose I/O. Register enabled pull-up PAPU CMOS and wake-up. PAS1 PAS1 INTEG INT2 — External Interrupt 2 INTC3 PA4/INT2/SDI/SDA/ IFS2 SEG24 PAS1 — SPI data input...
Page 33
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Pad Name Function Description PBPU CMOS General purpose I/O. Register enabled pull-up. PBS0 PBS0 PTCK3 — PTM3 clock input PB1/PTCK3/TX2/SEG31 IFS0 PBS0 — CMOS UART2 TX serial data output SEG31 PBS0 —...
Page 34
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Pad Name Function Description PCPU CMOS General purpose I/O. Register enabled pull-up. PCS0 PCS0 PTP0I — PTM0 capture input PC2/PTP0I/PTP0/AN2/ IFS1 SEG51 PTP0 PCS0 — CMOS PTM0 output PCS0 —...
Page 35
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Pad Name Function Description PDPU CMOS General purpose I/O. Register enabled pull-up. PDS0 PDS0 INTEG INT2 — External Interrupt 2 INTC3 PD0/INT2/STP1I/STP1/ IFS2 AN8/SEG45 PDS0 STP1I — STM1 capture input...
Page 36
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Pad Name Function Description PDPU CMOS General purpose I/O. Register enabled pull-up. PDS1 PDS1 STP2I — STM2 capture input PD6/STP2I/STP2/C1X/ IFS1 SEG33 STP2 PDS1 — CMOS STM2 output PDS1 —...
Page 37
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Pad Name Function Description PFPU CMOS General purpose I/O. Register enabled pull-up. PFS0 PF1/SDO/SEG14 PFS0 — CMOS SPI data output SEG14 PFS0 — LCD segment output PFPU CMOS General purpose I/O. Register enabled pull-up.
Page 38
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Pad Name Function Description PGPU CMOS General purpose I/O. Register enabled pull-up. PGS0 PG2/COM2 COM2 PGS0 — LCD common output PGPU CMOS General purpose I/O. Register enabled pull-up. PGS0 PG3/COM3...
Page 39
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Pad Name Function Description PHPU CMOS General purpose I/O. Register enabled pull-up. PHS1 PHS1 PH5/PTCK7/AN15/ PTCK7 — PTM7 clock input IFS3 SEG39 AN15 PHS1 — A/D Converter analog input SEG39 PHS1 —...
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM A.C. Characteristics For data in the following tables, note that factors such as oscillator type, operating voltage, operating frequency and temperature etc., can all exert an influence on the measured values.
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Operating Frequency Characteristic Curves System Operating Frequency 16MHz 12MHz 8MHz 2.2V 2.7V 3.3V 5.5V Operating Voltage System Start Up Time Characteristics Ta= -40°C ~ 85°C Test Conditions Symbol Parameter Min. Typ. Max. Unit...
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Input/Output Characteristics Ta=25°C Test Conditions Symbol Parameter Min. Typ. Max. Unit Conditions — — Input Low Voltage for I/O Ports or Input Pins — — — 0.2V Input Low Voltage for External Reset Pin —...
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Memory Characteristics Ta= -40°C~85°C Test Conditions Symbol Parameter Min. Typ. Max. Unit Conditions for Read / Write — — — DDmin DDmax Program Flash / Data EEPROM Memory Erase / Write cycle time – Program —...
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM A/D Converter Characteristics Ta=25°C Test Conditions Symbol Parameter Min. Typ. Max. Unit Conditions Operating Voltage — — — Input Voltage — — — Reference Voltage — — — Differential Non-linearity =0.5μs or 10μs...
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Comparator Electrical Characteristics Ta=25°C Test Conditions Symbol Parameter Min. Typ. Max. Unit Conditions Operating Voltage — — — — — Additional Current Consumption CNVTn[1:0]=00 μA for Comparator Enable — Without calibration, CNVTn[1:0]=00B, 3V/5V —...
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM LCD Driver Electrical Characteristics Ta=25°C Test Conditions Symbol Parameter Min. Typ. Max. Unit Conditions Power supply from PLCD, — — PLCD[3:0]=1xxxB (for R type) Power supply from PLCD pin —...
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Power-on Reset Characteristics Ta=25°C Test Conditions Symbol Parameter Min. Typ. Max. Unit Conditions Start Voltage to Ensure Power-on Reset — — — — Rising Rate to Ensure Power-on Reset —...
Advanced A/D Flash MCU with LCD & EEPROM System Architecture A key factor in the high-performance features of the Holtek range of microcontrollers is attributed to their internal system architecture. The range of devices take advantage of the usual features found within RISC microcontrollers providing increased speed of operation and enhanced performance.
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Stack This is a special part of the memory which is used to save the contents of the Program Counter only. The stack has multiple levels and is neither part of the data nor part of the program space, and is neither readable nor writeable.
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Flash Program Memory The Program Memory is the location where the user code or program is stored. For these devices series the Program Memory are Flash type, which means it can be programmed and re-programmed a large number of times, allowing the user the convenience of code modification on the same device.
Page 56
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Table Program Example The accompanying example shows how the table pointer and table data is defined and retrieved from the device. This example uses raw table data located in the last page which is stored there using the ORG statement.
The provision of Flash type Program Memory provides the user with a means of convenient and easy upgrades and modifications to their programs on the same device. As an additional convenience, Holtek has provided a means of programming the microcontroller in- circuit using a 4-pin interface. This provides manufacturers with the possibility of manufacturing their circuit boards complete with a programmed or un-programmed microcontroller, and then programming or upgrading the program at a later stage.
EV chip device to emulate the real MCU device behaviors by connecting the OCDSDA and OCDSCK pins to the Holtek HT-IDE development tools. The OCDSDA pin is the OCDS Data/Address input/output pin while the OCDSCK pin is the OCDS clock input pin. When users use the EV chip device for debugging, the corresponding pin functions shared with the OCDSDA and OCDSCK pins in the real MCU device will have no effect in the EV chip.
Page 60
This bit is set by software and cleared by hardware when the Write Buffer Clear process is completed. • FARL Register Name Bit 7~0 Flash Memory Address bit 7 ~ bit 0 • FARH Register – HT67F2350 Name — — — — — —...
Page 61
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM • FARH Register – HT67F2360 Name — — — — — — Bit 7~6 Unimplemented, read as "0" Bit 5~0 Flash Memory Address bit 13 ~ bit 8 • FARH Register – HT67F2370 Name —...
Page 62
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM • FD1H Register Name Bit 7~0 The second Flash Memory data bit 15 ~ bit 8 • FD2L Register Name Bit 7~0 The third Flash Memory data bit 7 ~ bit 0 •...
Page 63
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Flash Memory Write Function Enable Procedure In order to allow users to change the Flash memory data through the IAP control registers, users must first enable the Flash memory write operation by the following procedure: Step 1.
Page 64
0000 0000 x xxxx 0000 0000 x xxxx 0001 1111 x xxxx 0001 1111 x xxxx "x": don’t care HT67F2350 Erase Page Number and Selection Erase Page FARH FARL [7:6] FARL [5:0] 0000 0000 xx xxxx 0000 0000 xx xxxx...
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Data Memory The Data Memory is an 8-bit wide RAM internal memory and is the location where temporary information is stored. Divided into three types, the first of Data Memory is an area of RAM where special function registers are located.
General Purpose Data Memory (Sector 0 ~ Sector N) Sector 0 Sector 1 Sector N Note: N= 5 for HT67F2350; N=11 for HT67F2360; N=23 for HT67F2370; N=31 for HT67F2390 Data Memory Structure Data Memory Addressing For these devices that support the extended instructions, there is no Bank Pointer for Data Memory.
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM 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 73
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM • 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 ;...
For the series of devices the Program Memory is divided into several banks except for the HT67F2350 device. Selecting the required Program Memory area is achieved using the Program Memory Bank Pointer, PBP. The PBP register should be properly configured before the device executes the "Branch"...
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Accumulator – ACC The Accumulator is central to the operation of any microcontroller and is closely related with operations carried out by the ALU. The Accumulator is the place where all intermediate results from the ALU are stored.
Page 76
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM • PDF is cleared by a system power-up or executing the "CLR WDT" instruction. PDF is set by executing the "HALT" instruction. • TO is cleared by a system power-up or executing the "CLR WDT" or "HALT" instruction. TO is set by a WDT time-out.
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM EEPROM Data Memory These devices contain an area of internal EEPROM Data Memory. EEPROM, which stands for Electrically Erasable Programmable Read Only Memory, is by its nature a non-volatile form of re-programmable memory, with data retention even when its power supply is removed.
Page 78
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM EEA Register – HT67F2350/HT67F2360 Name EEA7 EEA6 EEA5 EEA4 EEA3 EEA2 EEA1 EEA0 Bit 7~0 EEA7~EEA0: Data EEPROM address bit 7 ~ bit0 EEAL Register – HT67F2370/HT67F2390 Name EEAL7 EEAL6...
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Writing Data to the EEPROM To write data to the EEPROM, the EEPROM address of the data to be written must first be placed in the EEA register or EEAL/EEAH register pair and the data placed in the EED register. To initiate a write cycle the write enable bit, WREN, in the EEC register must first be set high to enable the write function.
IDLE or SLEEP mode until the EEPROM read or write operation is totally complete. Otherwise, the EEPROM read or write operation will fail. Programming Example – for HT67F2350 • Reading data from the EEPROM – polling method MOV A, EEPROM_ADRES ;...
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Oscillators Various oscillator types 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.
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM High Speed Oscollators HIRC HIRCEN Prescaler HXTEN Low Speed Oscollators CKS2~CKS0 LXTEN LIRC LIRC LIRC System Clock Configurations External Crystal/Ceramic Oscillator – HXT The External Crystal/Ceramic System Oscillator is the high frequency oscillator, which is the default oscillator clock source after power on.
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Internal High Speed RC Oscillator – HIRC The internal RC oscillator is a fully integrated system oscillator requiring no external components. The internal RC oscillator has a fixed frequency of 8/12/16 MHz. Device trimming during the...
As Holtek has provided these devices with both high and low speed clock sources and the means to switch between them dynamically, the user can optimise the operation of their microcontroller to achieve the best performance/power ratio.
Page 86
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM High Speed Oscollators HIRC HIRCEN Prescaler HXTEN CKS2~CKS0 LXTEN LIRC LIRC PSC0 Prescaler 0 Time Base 0 Low Speed Oscollators TB0[2:0] CLKSEL0[1:0] PSC1 Prescaler 1 Time Base 1 TB1[2:0] CLKSEL1[1:0]...
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM 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.
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM IDLE1 Mode The IDLE1 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 high. In the IDLE1 Mode the CPU will be switched off but both the high and low speed oscillators will be turned on to provide a clock source to keep some peripheral functions operational.
Page 89
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Bit 1 FHIDEN: High Frequency oscillator control when CPU is switched off 0: Disable 1: Enable This bit is used to control whether the high speed oscillator is activated or stopped when the CPU is switched off by executing an "HALT"...
Page 90
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM HXTC Register Name — — — — — HXTM HXTF HXTEN — — — — — — — — — — Bit 7~3 Unimplemented, read as "0" Bit 2 HXTM: HXT mode selection 0: HXT frequency ≤...
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Operating Mode Switching These devices can switch between operating modes dynamically allowing the user to select the best performance/power ratio for the present task in hand. In this way microcontroller operations that do not require high performance can be executed using slower clocks thus requiring less operating current and prolonging battery life in portable applications.
Page 92
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM 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 set the CKS2~CKS0 bits to "111"...
Page 93
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM SLOW Mode to FAST Mode Switching In SLOW mode the system clock is derived from f . When system clock is switched back to the FAST mode from f , the CKS2~CKS0 bits should be set to "000" ~ "110" and then the system clock will respectively be switched to f /64.
Page 94
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Entering the IDLE0 Mode There is only one way for the device to enter the IDLE0 Mode and that is to execute the "HALT" instruction in the application program with the FHIDEN bit in the SCC register equal to "0" and the FSIDEN bit in the SCC register equal to "1".
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Standby Current Considerations As the main reason for entering the SLEEP or IDLE Mode is to keep the current consumption of the device to as low a value as possible, perhaps only in the order of several micro-amps except in the IDLE1 and IDLE2 Mode, there are other considerations which must also be taken into account by the circuit designer if the power consumption is to be minimised.
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Watchdog Timer The Watchdog Timer is provided to prevent program malfunctions or sequences from jumping to unknown locations, due to certain uncontrollable external events such as electrical noise. Watchdog Timer Clock Source The Watchdog Timer clock source is provided by the internal RC oscillator, f .
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Bit 0 WRF: WDT control register software reset flag 0: Not occurred 1: Occurred This bit is set to 1 by the WDT control register software reset and cleared by the application program.
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Reset and Initialisation A reset function is a fundamental part of any microcontroller ensuring that the device can be set to some predetermined condition irrespective of outside parameters. The most important reset condition is after power is first applied to the microcontroller.
Page 99
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM RES Pin Reset As the reset pin is shared with I/O pins, the reset function must be selected using a control register, RSTC. Although the microcontroller has an internal RC reset function, if the VDD power supply rise time is not fast enough or does not stabilise quickly at power-on, the internal reset function may be incapable of providing proper reset operation.
Page 100
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM There is an internal reset control register, RSTC, which is used to select the external RES pin function and provide a reset when the device operates abnormally due to the environmental noise interference.
Page 101
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM 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 with a specific LVR voltage, V .
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM 0: Not occurred 1: Occurred This bit is set to 1 when a specific low voltage reset condition occurs. Note that this bit can only be cleared to 0 by the application program.
Page 103
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM The following table indicates the way in which the various components of the microcontroller are affected after a power-on reset occurs. Item Reset Function Program Counter Reset to zero Interrupts...
Advanced A/D Flash MCU with LCD & EEPROM 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.
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Pull-high Resistors Many product applications require pull-high resistors for their switch inputs usually requiring the use of an external resistor. To eliminate the need for these external resistors, all I/O pins, when configured as an input have the capability of being connected to an internal pull-high resistor.
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM I/O Port Control Registers Each Port has its own control register which controls the input/output configuration. With this control register, each I/O pin with or without pull-high resistors can be reconfigured dynamically under software control.
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM 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.
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM READ PORT Function The READ PORT function is used to manage the reading of the output data from the data latch or I/O pin, which is specially designed for the IEC60730 self-diagnostic test on the I/O function and A/D paths.
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Digital Output Function READ PORT function enabled, A/D Converter AN0 Pin-shared path switched on automatically AN15 External analog input channel selection A/D Channel Input Path Internally Connection Programming Considerations Within the user program, one of the things first to consider is port initialisation. After a reset, all of the I/O data and port control registers will be set to high.
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Timer Modules – TM One of the most fundamental functions in any microcontroller devices is the ability to control and measure time. To implement time related functions the device includes several Timer Modules, generally abbreviated to the name TM.
TM output function must first be setup using relevant pin-shared function selection register. Note that there is no relevant input function selection register, IFSn, to select the input signal source for the PTCK4~PTCK7 and PTP4I~PTP7I pins in the HT67F2350 device.
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM TM Input/Output Pin Selection Selecting to have a TM input/output or whether to retain its other shared function is implemented using the relevant pin-shared function selection registers, with the corresponding selection bits in each pin-shared function register corresponding to a TM input/output pin.
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Programming Considerations The TM Counter Registers and the Capture/Compare CCRA and CCRP registers, all have a low and high byte structure. The high bytes can be directly accessed, but as the low bytes can only be accessed via an internal 8-bit buffer, reading or writing to these register pairs must be carried out in a specific way.
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Standard Type TM – STM The Standard Type TM contains five operating modes, which are Compare Match Output, Timer/ Event Counter, Capture Input, Single Pulse Output and PWM Output modes. The Standard TM can also be controlled with two external input pins and can drive one external output pin.
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Standard Type TM Register Description Overall operation of the Standard TM is controlled using a series of registers. A read only register pair exists to store the internal counter 16-bit value, while a read/write register pair exists to store internal 16-bit CCRA value.
Page 139
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM STMnC0 Register Name STnPAU STnCK2 STnCK1 STnCK0 STnON — — — — — — — — — Bit 7 STnPAU: STMn Counter Pause control 0: Run 1: Pause The counter can be paused by setting this bit high. Clearing the bit to zero restores normal counter operation.
Page 140
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Bit 5~4 STnIO1~STnIO0: Select STMn external pin STPn function Compare Match Output Mode 00: No change 01: Output low 10: Output high 11: Toggle output PWM Output Mode/Single Pulse Output Mode...
Page 141
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Bit 2 STnPOL: STMn STPn Output polarity control 0: Non-inverted 1: Inverted This bit controls the polarity of the STPn output pin. When the bit is set high the STMn output pin will be inverted and not inverted when the bit is zero. It has no effect if the STMn is in the Timer/Counter Mode.
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Standard Type TM Operation Modes The Standard Type TM can operate in one of five operating modes, Compare Match Output Mode, PWM Output Mode, Single Pulse Output Mode, Capture Input Mode or Timer/Counter Mode. The operating mode is selected using the STnM1 and STnM0 bits in the STMnC1 register.
Page 145
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Timer/Counter Mode To select this mode, bits STnM1 and STnM0 in the STMnC1 register should be set to 11 respectively. The Timer/Counter Mode operates in an identical way to the Compare Match Output Mode generating the same interrupt flags.
Page 146
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Counter Value STnDPX = 0; STnM [1:0] = 10 Counter cleared by CCRP Counter Reset when STnON returns high CCRP Counter Stop if Pause Resume STnON bit low CCRA Time...
Page 147
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Counter Value STnDPX = 1; STnM [1:0] = 10 Counter cleared by CCRA Counter Reset when STnON returns high CCRA Counter Stop if Pause Resume STnON bit low CCRP Time...
Page 148
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Single Pulse Output Mode To select this mode, bits STnM1 and STnM0 in the STMnC1 register should be set to 10 respectively and also the STnIO1 and STnIO0 bits should be set to 11 respectively. The Single Pulse Output Mode, as the name suggests, will generate a single shot pulse on the STMn output pin.
Page 149
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Counter Value STnM [1:0] = 10 ; STnIO [1:0] = 11 Counter stopped by CCRA Counter Reset when STnON returns high CCRA Counter Stops Resume Pause by software CCRP Time STnON Auto.
Page 150
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Capture Input Mode To select this mode bits STnM1 and STnM0 in the STMnC1 register should be set to 01 respectively. This mode enables external signals to capture and store the present value of the internal counter and can therefore be used for applications such as pulse width measurements.
Page 151
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Counter Value STnM [1:0] = 01 Counter cleared by CCRP Counter Counter Stop Reset CCRP Resume Pause Time STnON STnPAU Active Active Active edge edge edge STMn capture pin STPnI CCRA Int.
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Periodic Type TM – PTM The Periodic Type TM contains five operating modes, which are Compare Match Output, Timer/ Event Counter, Capture Input, Single Pulse Output and PWM Output modes. The Periodic TM can also be controlled with two external input pins and can drive two external output pin.
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Periodic TM Operation The size of Periodic Type TM is 10-/16-bit wide and its core is a 10-/16-bit count-up counter which is driven by a user selectable internal or external clock source. There are also two internal comparators with the names, Comparator A and Comparator P.
Page 154
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM PTMnDL Register Name Bit 7~0 PTMn Counter Low Byte Register bit 7 ~ bit 0 PTMn 10-/16-bit Counter bit 7 ~ bit 0 PTMnDH Register – n=0, 1, 4, 5, 6 or 7 Name —...
Page 155
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM PTMnRPL Register Name PTnRP7 PTnRP6 PTnRP5 PTnRP4 PTnRP3 PTnRP2 PTnRP1 PTnRP0 Bit 7~0 PTnRP7~PTnRP0: PTMn CCRP Low Byte Register bit 7 ~ bit 0 PTMn 10-/16-bit CCRP bit 7 ~ bit 0 PTMnRPH Register –...
Page 156
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Bit 3 PTnON: PTMn Counter On/Off control 0: Off 1: On This bit controls the overall on/off function of the PTMn. Setting the bit high enables the counter to run while clearing the bit disables the PTMn. Clearing this bit to zero will stop the counter from counting and turn off the PTMn which will reduce its power consumption.
Page 157
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM In the Compare Match Output Mode, the PTnIO1 and PTnIO0 bits determine how the PTMn output pin changes state when a compare match occurs from the Comparator A. The PTMn output pin can be setup to switch high, switch low or to toggle its present state when a compare match occurs from the Comparator A.
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Periodic Type TM Operation Modes The Periodic Type TM can operate in one of five operating modes, Compare Match Output Mode, PWM Output Mode, Single Pulse Output Mode, Capture Input Mode or Timer/Counter Mode. The operating mode is selected using the PTnM1 and PTnM0 bits in the PTMnC1 register.
Page 161
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Timer/Counter Mode To select this mode, bits PTnM1 and PTnM0 in the PTMnC1 register should be set to 11 respectively. The Timer/Counter Mode operates in an identical way to the Compare Match Output Mode generating the same interrupt flags.
Page 162
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Counter Value PTnM [1:0] = 10 Counter cleared by CCRP Counter Reset when PTnON returns high CCRP Counter Stop if Pause Resume PTnON bit low CCRA Time PTnON PTnPAU PTnPOL CCRA Int.
Page 163
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Single Pulse Output Mode To select this mode, bits PTnM1 and PTnM0 in the PTMnC1 register should be set to 10 respectively and also the PTnIO1 and PTnIO0 bits should be set to 11 respectively. The Single Pulse Output Mode, as the name suggests, will generate a single shot pulse on the PTMn output pin.
Page 164
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Counter Value PTnM [1:0] = 10 ; PTnIO [1:0] = 11 Counter stopped by CCRA Counter Reset when PTnON returns high CCRA Counter Stops Resume Pause by software CCRP Time PTnON Auto.
Page 165
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Capture Input Mode To select this mode bits PTnM1 and PTnM0 in the PTMnC1 register should be set to 01 respectively. This mode enables external signals to capture and store the present value of the internal counter and can therefore be used for applications such as pulse width measurements.
Page 166
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Counter Value PTnM[1:0] = 01 Counter cleared by CCRP Counter Counter Stop Reset CCRP Resume Pause Time PTnON PTnPAU Active Active Active edge edge edge PTMn Capture Pin PTPnI or PTCKn CCRA Int.
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Registers Descriptions Overall operation of the A/D converter is controlled using six registers. A read only register pair exists to store the A/D Converter data 12-bit value. Three registers, SADC0, SADC1 and SADC2, are the control registers which setup the operating conditions and control function of the A/D converter.
Page 169
I/O or other pin-shared function will be removed. In addition, any internal pull-high resistor connected to the pin will be automatically removed if the pin is selected to be an A/D converter input. • SADC0 Register – HT67F2350 Name START...
Page 170
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM • SADC0 Register – HT67F2360/HT67F2370/HT67F2390 Name START ADBZ ADCEN ADRFS SACS3 SACS2 SACS1 SACS0 START: Start the A/D Conversion Bit 7 0→1→0: Start This bit is used to initiate an A/D conversion process. The bit is normally low but if set high and then cleared low again, the A/D converter will initiate a conversion process.
Page 171
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM • SADC1 Register Name SAINS3 SAINS2 SAINS1 SAINS0 — SACKS2 SACKS1 SACKS0 — — SAINS3~SAINS0: A/D converter input signal select Bit 7~4 0000: External source – External analog channel intput, ANn 0001: Internal source –...
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Bit 1~0 PGAGS1~PGAGS0: PGA gain select 00: Gain=1 01: Gain=1.667 – V =2V as V =1.2V 10: Gain=2.5 – V =3V as V =1.2V 11: Gain=3.333 – V =4V as V =1.2V...
Internal signal derived from PGA output V 0111 xxxx Internal signal derived from PGA output V 10xx xxxx Connected to the ground. A/D Converter Input Signal Selection – HT67F2350 SAINS [3:0] SACS [3:0] Input Signals Description 0000, 0000~1111 AN0~AN15...
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM A/D Operation The START bit in the SADC0 register is used to start the AD conversion. When the microcontroller sets this bit from low to high and then low again, an analog to digital conversion cycle will be initiated.
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Conversion Rate and Timing Diagram A complete A/D conversion contains two parts, data sampling and data conversion. The data sampling which is defined as t takes 4 A/D clock cycles and the data conversion takes 12 A/D clock cycles.
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Summary of A/D Conversion Steps The following summarises the individual steps that should be executed in order to implement an A/D conversion process. • Step 1 Select the required A/D conversion clock by properly programming the SACKS2~SACKS0 bits in the SADC1 register.
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Programming Considerations During microcontroller operations where the A/D converter is not being used, the A/D internal circuitry can be switched off to reduce power consumption, by setting bit ADCEN low in the SADC0 register.
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM A/D 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 179
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Example: using the interrupt method to detect the end of conversion clr ADE ; disable ADC interrupt mov a,03H ; select f /8 as A/D clock and A/D input mov SADC1,a ;...
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Serial Interface Module – SIM These devices contain a Serial Interface Module, which includes both the four-line SPI interface or two-line I C interface types, to allow an easy method of communication with external peripheral hardware.
Page 181
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM SPI Master SPI Slave SPI Master/Slave Connection Data Bus SIMD SDI Pin TX/RX Shift Register SDO Pin Clock CKEG Edge/Polarity CKPOLB Control WCOL Flag SCK Pin Busy Status TRF Flag...
Page 182
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM There are also two control registers for the SPI interface, SIMC0 and SIMC2. Note that the SIMC2 register also has the name SIMA which is used by the I C function. The SIMC1 register is not used by the SPI function, only by the I C function.
Page 183
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM • SIMC2 Register Name CKPOLB CKEG CSEN WCOL Bit 7~6 Undefined bits These bits can be read or written by the application program. CKPOLB: SPI clock line base condition selection Bit 5 0: The SCK line will be high when the clock is inactive.
Page 184
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM SPI Communication After the SPI interface is enabled by setting the SIMEN bit high, then in the Master Mode, when data is written to the SIMD register, transmission/reception will begin simultaneously. When the data transfer is complete, the TRF flag will be set automatically, but must be cleared using the application program.
Page 185
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM SCK (CKPOLB=1) SCK (CKPOLB=0) D7/D0 D6/D1 D5/D2 D4/D3 D3/D4 D2/D5 D1/D6 D0/D7 SDI Data Capture Write to SIMD (SDO changes as soon as writing occurs; SDO is floating if SCS=1) Note: For SPI slave mode, if SIMEN=1 and CSEN=0, SPI is always enabled and ignores the SCS level.
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM 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 187
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM START signal from Master Send slave address and R/W bit from Master Acknowledge from slave Send data byte from Master Acknowledge from slave STOP signal from Master The SIMDEB1 and SIMDEB0 bits determine the debounce time of the I C interface.
Page 188
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM • SIMD Register The SIMD register is used to store the data being transmitted and received. The same register is used by both the SPI and I C functions. Before the device writes data to the I C bus, the actual data to be transmitted must be placed in the SIMD register.
Page 189
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Bit 4 Unimplemented, read as "0" Bit 3~2 SIMDEB1~SIMDEB0: I C Debounce Time Selection 00: No debounce 01: 2 system clock debounce 1x: 4 system clock debounce These bits are used to select the I C debounce time when the SIM is configured as the C interface function by setting the SIM2~SIM0 bits to "110".
Page 190
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Bit 3 TXAK: I C bus transmit acknowledge flag 0: Slave send acknowledge flag 1: Slave does 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 9 clock from the slave device.
Page 191
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM C Bus Communication Communication on the bus requires four separate steps, a START signal, a slave device address transmission, a data transmission and finally a STOP signal. When a START signal is placed on bus, all devices on the bus will receive this signal and be notified of the imminent arrival of data on the bus.
Page 192
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM C Bus Start Signal The START signal can only be generated by the master device connected to the bus and not by the slave device. This START signal will be detected by all devices connected to the bus.
Page 193
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM C Bus Data and Acknowledge Signal The transmitted data is 8-bits wide and is transmitted after the slave device has acknowledged receipt of its slave address. The order of serial bit transmission is the MSB first and the LSB last.
Page 194
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Start SIMTOF=1? SET SIMTOEN HAAS=1? CLR SIMTOF HTX=1? SRW=1? RETI Read from SIMD to CLR HTX release SCL Line SET HTX CLR TXAK RETI Write data to SIMD to Dummy read from SIMD...
Page 195
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Start Slave Address C time-out counter start Stop C time-out counter reset on SCL negative transition C Time-out When an C time-out counter overflow occurs, the counter will stop and the SIMTOEN bit will be cleared to zero and the SIMTOF bit will be set high to indicate that a time-out condition has occurred.
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Serial Interface – SPIA These devices contain an independent SPI function. It is important not to confuse this independent SPI function with the additional one contained within the combined SIM function, which is described in another section of this datasheet.
Page 199
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM SPIAC1 Register Name — — SACKPOLB SACKEG SAMLS SACSEN SAWCOL SATRF — — — — Bit 7~6 Unimplemented, read as "0" Bit 5 SACKPOLB: SPIA clock line base condition selection 0: The SCKA line will be high when the clock is inactive.
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM SPIA Communication After the SPIA interface is enabled by setting the SPIAEN bit high, then in the Master Mode, when data is written to the SPIAD register, transmission/reception will begin simultaneously. When the data transfer is complete, the SATRF flag will be set automatically, but must be cleared using the application program.
Page 201
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM SCSA SCKA (SACKPOLB=1) SCKA (SACKPOLB=0) SDOA D7/D0 D6/D1 D5/D2 D4/D3 D3/D4 D2/D5 D1/D6 D0/D7 SDIA Data Capture Write to SPIAD (SDOA changes as soon as writing occurs; SDOA is floating if SCSA=1) Note: For SPIA slave mode, if SPIAEN=1 and SACSEN=0, SPIA is always enabled and ignores the SCSA level.
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM SPIA Bus Enable/Disable To enable the SPIA bus, set SACSEN=1 and SCSA=0, then wait for data to be written into the SPIAD (TXRX buffer) register. For the Master Mode, after data has been written to the SPIAD (TXRX buffer) register, then transmission or reception will start automatically.
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM • Step 7 Read data from the SPIAD register. • Step 8 Clear SATRF. • Step 9 Go to step 4. Slave Mode: • Step 1 Select the SPI Slave mode using the SASPI2~SASPI0 bits in the SPIAC0 control register •...
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM UART Interface These devices contain up to three integrated full-duplex asynchronous serial communications UART interfaces that enable communication with external devices that contain a serial interface. The UART function has many features and can transmit and receive data serially by transferring a frame of data with eight or nine data bits per transmission as well as being able to detect errors when the data is overwritten or incorrectly framed.
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM UART External Pin To communicate with an external serial interface, the internal UARTn has two external pins known as TXn and RXn. The TXn and RXn pins are the UARTn transmitter and receiver pins respectively.
Page 206
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM UnSR Register The UnSR register is the status register for the UARTn, which can be read by the program to determine the present status of the UARTn. All flags within the UnSR register are read only and further explanations are given below.
Page 207
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Bit 2 RXIFn: Receive TXR_RXRn data register status 0: TXR_RXRn data register is empty 1: TXR_RXRn data register has available data The RXIFn flag is the receive data register status flag. When this read only flag is "0", it indicates that the TXR_RXRn read data register is empty.
Page 208
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM cleared, while the TIDLEn, TXIFn and RIDLEn bits will be set. Other control bits in UnCR1, UnCR2 and BRGn registers will remain unaffected. If the UARTn is active and the UARTENn bit is cleared, all pending transmissions and receptions will be terminated and the module will be reset as defined above.
Page 209
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM UnCR2 Register The UnCR2 register is the second of the UARTn control registers and serves several purposes. One of its main functions is to control the basic enable/disable operation if the UARTn Transmitter and Receiver as well as enabling the various UARTn interrupt sources.
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Bit 3 WAKEn: RXn pin falling edge wake-up function enable control 0: RXn pin wake-up UARTn function is disabled 1: RXn pin wake-up UARTn function is enabled The bit is used to control the wake-up UARTn function when a falling edge on the RXn pin occurs.
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM BRGn Register Name "x": unknown Bit 7~0 D7~D0: Baud Rate values By programming the BRGHn bit in the UnCR2 register which allows selection of the related formula described above and programming the required value in the BRGn register, the required baud rate can be setup.
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Data, Parity and Stop Bit Selection The format of the data to be transferred is composed of various factors such as data bit length, parity on/off, parity type, address bits and the number of stop bits. These factors are determined by the setup of various bits within the UnCR1 register.
Page 213
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Transmitting Data When the UARTn is transmitting data, the data is shifted on the TXn pin from the shift register, with the least significant bit LSB first. In the transmit mode, the TXR_RXRn register forms a buffer between the internal bus and the transmitter shift register.
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM UART Receiver The UARTn is capable of receiving word lengths of either 8 or 9 bits can be selected by programming the BNOn bit in the UnCR1 register. When BNOn bit is set, the word length will be set to 9 bits.
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Receiving Break Any break character received by the UARTn will be managed as a framing error. The receiver will count and expect a certain number of bit times as specified by the values programmed into the BNOn and STOPSn bits.
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Noise Error – NFn Over-sampling is used for data recovery to identify valid incoming data and noise. If noise is detected within a frame, the following will occur: • The read only noise flag, NFn, in the UnSR register will be set on the rising edge of the RXIFn bit.
Page 217
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Note that the UnSR register flags are read only and cannot be cleared or set by the application program, neither will they be cleared when the program jumps to the corresponding interrupt servicing routine, as is the case for some of the other interrupts.
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM UART Power Down and Wake-up When the UARTn clock, f , is switched off, the UARTn will cease to function. If the MCU switches off the UARTn clock f and enters the power down mode while a transmission is still in progress, then the transmission will be paused until the UARTn clock source derived from the microcontroller is activated.
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Comparators Two independent analog conparators are contained in these devices. The comparator functions offer flexibility via their register controlled features such as power-down, polarity select, response time, etc. In sharing their pins with normal I/O pins the comparators do not waste precious I/O pins if the comparator functions are otherwise unused.
Page 220
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM CPnC Register Name — CnEN CnPOL CnOUT CNVTn1 CNVTn0 — — — — — — — — Bit 7 Unimplemented, read as "0" Bit 6 CnEN: Comparator enable control 0: Disable 1: Enable This bit is used to enable the comparator function.
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Bit 4~0 CnOF4~CnOF0: Comparator input offset calibration value This 5-bit field is used to perform the comparator input offset calibration operation and the value after the input offset calibration can be restored into this bit field. Refer to the "Input Offset Calibration"...
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM LCD Driver For large volume applications, which incorporate an LCD in their design, the use of a custom display rather than a more expensive character based display reduces costs significantly. However, the corresponding COM and SEG signals required, which vary in both amplitude and time, to drive such a custom display require many special considerations for proper LCD operation to occur.
Page 223
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM PLCD PLCD3~PLCD0 control QCT2~QCT0 Quick Charging Control RSEL2~RSEL0 1/3 Bias Configuration RSEL2~RSEL0 LCDEN PLCD PLCD3~PLCD0 control QCT2~QCT0 Quick Charging Control RSEL2~RSEL0 1/4 Bias Configuration RSEL2~RSEL0 LCDEN Note: When the R type LCD is disabled, the DC path will be switched off.
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM COMn Phase COMn Non-quick charging time Quick charge control QT: Quick charging time, determined by QCT [2:0]. Quick Charging Mode LCD Memory An area of Data Memory is especially reserved for use for the LCD display data. This data area is known as the LCD Memory.
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM LCD Clock Source The LCD clock source is the internal clock signal, f , divided by 8 using an internal divider circuit. The f internal clock is supplied by either the LIRC or LXT oscillator, the choice of which is determined by a software control bit.
Page 226
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Bit 3~1 RSEL2~RSEL0: R type total bias resistors selection – for both 1/3 and 1/4 bias selections 000: 1170 kΩ 001: 225 kΩ 010: 60 kΩ 011: Quick charging mode – switching between 60 kΩ and 1170 kΩ...
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM C Type Biasing – 1/3 Bias Only For C type biasing the LCD voltage source can be supplied on the external pin PLCD, V1 or V2 or derived from the internal voltage source to generate the required biasing voltages. The C type bias voltage source is selected using the LCDP1 and LCDP0 bits in the LCDC0 register.
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM LCD Driver Output The number of COM and SEG outputs supplied by the LCD driver, as well as its biasing and wave type selections, are dependent upon how the LCD control bits are programmed. The Bias Type, whether C or R type is also selected by a software control bit.
Page 230
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM R and C Type, 4 COM, 1/3 Bias LCD Display Off Mode COM0 ~ COM3 All segment outputs 1 Frame Normal Operation Mode COM0 COM1 COM2 COM3 All segments are OFF...
Page 231
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM LCD Display Off Mode COM0 ~ COM3 All segment outputs Normal Operation Mode 1 Frame COM0 COM1 COM2 COM3 All segments are OFF COM0 side segments are ON COM1 side segments are ON...
Page 232
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM R and C Type, 6 COM, 1/3 Bias LCD Display Off Mode COM0 ~ COM5 All segment outputs 1 Frame Normal Operation Mode COM0 COM1 COM2 COM3 COM4 COM5 All segments are OFF...
Page 233
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM LCD Display Off Mode COM0 ~ COM5 All segment outputs 1 Frame Normal Operation Mode COM0 COM1 COM2 COM3 COM4 COM5 All segments are OFF COM0 side segments are ON...
Page 234
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM R Type, 8 COM, 1/3 Bias LCD Display Off Mode COM0 ~ COM7 All segment outputs 1 Frame Normal Operation Mode COM0 COM1 COM2 COM3 COM4 COM5 COM6 COM7 All segments are OFF...
Page 235
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM LCD Display Off Mode COM0 ~ COM7 All segment outputs 1 Frame Normal Operation Mode COM0 COM1 COM2 COM3 COM4 COM5 COM6 COM7 All segments are OFF COM0 side segments are ON...
Page 236
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM R Type, 8 COM, 1/4 Bias 1 Frame LCD segment COM0 State1 (on) State2 (off) COM1 COM2 COM3 COM4 COM5 COM6 COM7 SEG n SEG n+1 SEG n+2 SEG n+3 LCD Driver Output –...
Page 237
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM 1 Frame LCD segment COM0 State1 (on) State2 (off) COM1 COM2 COM3 COM4 COM5 COM6 COM7 SEG n SEG n+1 SEG n+2 SEG n+3 LCD Driver Output – Type B, 1/8 Duty, 1/4 Bias Rev.
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Programming Considerations Certain precautions must be taken when programming the LCD. One of these is to ensure that the LCD Memory is properly initialised after the microcontroller is powered on. Like the General Purpose Data Memory, the contents of the LCD Memory are in an unknown condition after power- on.
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM 16-bit Multiplication Division Unit – MDU The devices each has a 16-bit Multiplication Division Unit, MDU, which integrates a 16-bit unsigned multiplier and a 32-bit/16-bit divider. The MDU, in replacing the software multiplication and division operations, can therefore save large amounts of computing time as well as the Program and Data Memory space.
Page 241
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM The operation results will be stored in the corresponding MDU data registers and should be read out from the MDU data registers in a specific read access sequence after the operation is completed.
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM 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.
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM CRCDH Register Name Bit 7~0 D7~D0: 16-bit CRC checksum high byte data register CRCCR Register Name — — — — — — — POLY — — — — — —...
Page 244
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM • 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...
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Low Voltage Detector – LVD Each device has a Low Voltage Detector function, also known as LVD. This enabled the device to monitor the power supply voltage, V , and provide a warning signal should it fall below a certain level.
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM LVD Operation The Low Voltage Detector function operates by comparing the power supply voltage, V , with a pre-specified voltage level stored in the LVDC register. This has a range of between 2.0V and 4.0V.
Page 249
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM INTC0 Register Name — MF6F INT1F INT0F MF6E INT1E INT0E — — Bit 7 Unimplemented, read as "0" Bit 6 MF6F: Multi-function 6 interrupt request flag 0: No request 1: Interrupt request...
Page 250
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Bit 1 MF0E: Multi-function 0 interrupt control 0: Disable 1: Enable Bit 0 MF7E: Multi-function 7 interrupt control 0: Disable 1: Enable INTC2 Register Name MF3F MF9F MF8F MF2F MF3E...
Page 251
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Bit 4 INT2F: INT2 interrupt request flag 0: No request 1: Interrupt request Bit 3 MF5E: Multi-function 5 interrupt control 0: Disable 1: Enable Bit 2 MF4E: Multi-function 4 interrupt control...
Page 252
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM MFI1 Register Name STM1AF STM1PF PTM1AF PTM1PF STM1AE STM1PE PTM1AE PTM1PE Bit 7 STM1AF: STM1 Comparator A match Interrupt request flag 0: No request 1: Interrupt request Bit 6 STM1PF: STM1 Comparator P match Interrupt request flag...
Page 253
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM MFI3 Register Name SIMF SPIAF SIME SPIAE Bit 7 SIMF: SIM Interrupt request flag 0: No request 1: Interrupt request Bit 6 SPIAF: SPIA Interrupt request flag 0: No request...
Page 254
1: Enable Bit 1 PTM3AE: PTM3 Comparator A match Interrupt control 0: Disable 1: Enable Bit 0 PTM3PE: PTM3 Comparator P match Interrupt control 0: Disable 1: Enable MFI5 Register – HT67F2350/HT67F2360 Name — — UR1F UR0F — — UR1E UR0E —...
Page 255
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Bit 1 UR1E: UART1 transfer interrupt control 0: Disable 1: Enable Bit 0 UR0E: UART0 transfer interrupt control 0: Disable 1: Enable MFI6 Register Name — CP0F PTM4AF PTM4PF —...
Page 256
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Bit 2 CP1E: Comparator 1 interrupt control 0: Disable 1: Enable Bit 1 PTM5AE: PTM5 Comparator A match Interrupt control 0: Disable 1: Enable Bit 0 PTM5PE: PTM5 Comparator P match Interrupt control...
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Bit 3 Unimplemented, read as "0" Bit 2 TB1E: Time Base 1 interrupt control 0: Disable 1: Enable PTM7AE: PTM7 Comparator A match Interrupt control Bit 1 0: Disable 1: Enable...
Page 258
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Interrupts contained within Multi-Function Interrupts PTM4 P PTM4PF PTM4PE PTM4 A PTM4AF PTM4AE Legend Request Flag, no auto reset in ISR Comp. 0 CP0F CP0E EMI auto disabled Request Flag, auto reset in ISR...
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM External Interrupt The external interrupts are controlled by signal transitions on the pins INT0~INT3. An external interrupt request will take place when the external interrupt request flags, INT0F~INT3F, are set, which will occur when a transition, whose type is chosen by the edge select bits, appears on the external interrupt pins.
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM TM Interrupt The Standard and Periodic TMs have two interrupts, one comes from the comparator A match situation and the other comes from the comparator P match situation. All of the TM interrupts are contained within the Multi-function Interrupts.
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM SPIA Interface Interrupt The SPIA Interface Module Interrupt is contained within the Multi-function Interrupt. A SPIA Interrupt request will take place when the SPIA Interrupt request flag, SPIAF, is set, which occurs when a byte of data has been received or transmitted by the SPIA interface.
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Time Base Interrupt The function of the Time Base Interrupt is to provide regular time signal in the form of an internal interrupt. It is contained within the Multi-function interrupt and controlled by the overflow signal from its internal timer.
Page 263
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM PSC1R Register Name — — — — — — CLKSEL11 CLKSEL10 — — — — — — — — — — — — Bit 7~2 Unimplemented, read as "0" Bit 1~0...
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM 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.
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.
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.
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM 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.
Page 269
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM 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...
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM 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 271
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM 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...
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM 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.
Page 273
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM CALL addr Subroutine call Description Unconditionally calls a subroutine at the specified address. The Program Counter then increments by 1 to obtain the address of the next instruction which is then pushed onto the stack.
Page 274
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM DEC [m] Decrement Data Memory Description Data in the specified Data Memory is decremented by 1. Operation [m] ← [m] − 1 Affected flag(s) DECA [m] Decrement Data Memory with result in ACC Description Data in the specified Data Memory is decremented by 1.
Page 275
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM No operation Description No operation is performed. Execution continues with the next instruction. Operation No operation Affected flag(s) None OR A,[m] Logical OR Data Memory to ACC Description Data in the Accumulator and the specified Data Memory perform a bitwise logical OR operation.
Page 276
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM RLA [m] Rotate Data Memory left with result in ACC Description The contents of the specified Data Memory are rotated left by 1 bit with bit 7 rotated into bit 0.
Page 277
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM RRCA [m] Rotate Data Memory right through Carry with result in ACC Description Data in the specified Data Memory and the carry flag are rotated right by 1 bit. Bit 0 replaces the Carry bit and the original carry flag is rotated into bit 7.
Page 278
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM Set Data Memory SET [m] Description Each bit of the specified Data Memory is set to 1. Operation [m] ← FFH Affected flag(s) None SET [m].i Set bit of Data Memory Description Bit i of the specified Data Memory is set to 1.
Page 279
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM SUBM A,[m] Subtract Data Memory from ACC with result in Data Memory Description The specified Data Memory is subtracted from the contents of the Accumulator. The result is stored in the Data Memory. 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 280
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM 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 pair (TBLP and TBHP) is moved to the specified Data Memory and the high byte moved to TBLH.
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM 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 282
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM LCPL [m] Complement Data Memory Description Each bit of the specified Data Memory is logically complemented (1′s complement). Bits which previously contained a 1 are changed to 0 and vice versa.
Page 283
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM LMOV A,[m] Move Data Memory to ACC Description The contents of the specified Data Memory are copied to the Accumulator. Operation ACC ← [m] Affected flag(s) None LMOV [m],A Move ACC to Data Memory Description The contents of the Accumulator are copied to the specified Data Memory.
Page 284
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM LRR [m] Rotate Data Memory right Description The contents of the specified Data Memory are rotated right by 1 bit with bit 0 rotated into bit 7. Operation [m].i ← [m].(i+1); (i=0~6) [m].7 ←...
Page 285
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM 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 two cycle instruction.
Page 286
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM LSNZ [m] Skip if Data Memory is not 0 Description If the content of the specified Data Memory is not 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 287
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM LSZ [m].i Skip if bit i of Data Memory is 0 Description If bit i of the specified Data Memory 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.
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM 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...
HT67F2350/HT67F2360 HT67F2370/HT67F2390 Advanced A/D Flash MCU with LCD & EEPROM 80-pin LQFP (10mm×10mm) Outline Dimensions Dimensions in inch Symbol Min. Nom. Max. ― 0.472 BSC ― ― 0.394 BSC ― ― 0.472 BSC ― ― 0.394 BSC ― ― 0.016 BSC ―...
Page 292
However, Holtek assumes no responsibility arising from the use of the specifications described. The applications mentioned herein are used solely for the purpose of illustration and Holtek makes no warranty or representation that such applications will be suitable without further modification, nor recommends the use of its products for application that may present a risk to human life due to malfunction or otherwise.
Need help?
Do you have a question about the HT67F2350 and is the answer not in the manual?
Questions and answers