CMOS: CMOS output; NMOS: NMOS output;
ST: Schmitt Trigger input; AN: Analog signal;
HXT: High frequency crystal oscillator; LXT: Low frequency crystal oscillator;
LCD: LCD SEG/COM output; PWR: Power
PJPU
PJS1
PJS1
IFS3
STCMOS General purpose I/O. Register enabled pull-up.
ST—PTM4 clock input
Absolute Maximum Ratings
Supply Voltage ................................................................................................VSS−0.3V to VSS+6.0V
Input Voltage ..................................................................................................VSS−0.3V to VDD+0.3V
Storage Temperature ....................................................................................................-50˚C to 125˚C
Operating Temperature ..................................................................................................-40˚C to 85˚C
IOL Total ..................................................................................................................................... 80mA
IOH Total .................................................................................................................................... -80mA
Total Power Dissipation .........................................................................................................500mW
Note: These are stress ratings only. Stresses exceeding the range specified under "Absolute
Maximum Ratings" may cause substantial damage to these devices. Functional operation of
these devices at other conditions beyond those listed in the specication is not implied and
prolonged exposure to extreme conditions may affect devices reliability.
D.C. Characteristics
For data in the following tables, note that factors such as oscillator type, operating voltage, operating
frequency, pin load conditions, temperature and program instruction type, etc., can all exert an
inuence on the measured values.
Operating Voltage Characteristics
Ta= -40°C to 85°C
SymbolParameterTest ConditionsMin.Typ.Max.Unit
f
=8MHz2.2—5.5
SYS
Operating Voltage – HXT
V
DD
Operating Voltage – HIRC
Operating Voltage – LXTf
Operating Voltage – LIRCf
=12MHz2.7—5.5
SYS
f
=16MHz3.3—5.5
SYS
f
=8MHz2.2—5.5
SYS
=12MHz2.7—5.5
SYS
f
=16MHz3.3—5.5
SYS
=32768Hz2.2—5.5V
SYS
=32kHz2.2—5.5V
SYS
Vf
Vf
Rev. 1.6040May 16, 2019Rev. 1.6041May 16, 2019
HT67F2350/HT67F2360
HT67F2370/HT67F2390
Advanced A/D Flash MCU with LCD & EEPROM
Standby Current Characteristics
SymbolStandby Mode
SLEEP Mode
IDLE0 Mode
I
STB
IDLE1 Mode – HIRC
IDLE1 Mode – HXT
Notes: When using the characteristic table data, the following notes should be taken into consideration:
• Any digital inputs are setup in a non oating condition.
• All measurements are taken under conditions of no load and with all peripherals in an off state.
• There are no DC current paths.
• All Standby Current values are taken after a HALT instruction execution thus stopping all instruction execution.
Test Conditions
V
DD
Conditions85°C
2.2V
3V—0.140.192.90
WDT off
Min.Typ. Max.
—0.140.192.90
5V—0.210.503.90
2.2V
—1.22.42.9
WDT on
5V——5.06.0
2.2V
f
on
SUB
—2.44.04.8
5V—5.01012
2.2V
f
on, f
SYS
=8MHz
SUB
—0.30.60.8
5V—1.02.02.2
2.7V
f
on, f
3V—0.61.21.4
SUB
=12MHz
SYS
—0.40.81.0
5V—1.22.42.6
3.3V
f
on, f
SUB
5V—2.04.04.2
=16MHz
SYS
2.2V
f
on, f
SYS
=8MHz
SUB
—1.53.03.2
—0.30.60.8
5V—1.02.02.2
2.7V
f
on, f
SUB
=12MHz
SYS
—0.40.81.0
5V—1.22.42.6
3.3V
f
on, f
SUB
5V—2.04.04.2
=16MHz
SYS
—1.53.03.2
Max.
Ta=25°C
Unit
μA
μA3V——3.03.6
μA3V—3.05.06.0
mA3V—0.51.01.2
mA
mA
mA3V—0.51.01.2
mA3V—0.61.21.4
mA
HT67F2350/HT67F2360
HT67F2370/HT67F2390
Advanced A/D Flash MCU with LCD & EEPROM
Operating Current Characteristics
SymbolOperating Mode
V
2.2V
SLOW Mode – LXT
3V—1020
5V—3050
2.2V
SLOW Mode – LIRC
5V—3050
2.2V
5V—23
FAST Mode – HIRC
I
DD
2.7V
5V—34.5
3.3V
5V—4.57.0
2.2V
5V—23
FAST Mode – HXT
2.7V
5V—34.5
3.3V
5V—4.57.0
Notes: When using the characteristic table data, the following notes should be taken into consideration:
• Any digital inputs are setup in a non oating condition.
• All measurements are taken under conditions of no load and with all peripherals in an off state.
• There are no DC current paths.
• All Operating Current values are measured using a continuous NOP instruction program loop.
DD
f
SYS
f
SYS
f
SYS
f
SYS
f
SYS
f
SYS
f
SYS
f
SYS
Test Conditions
Conditions
=32768Hz
=32kHz
=8MHz
=12MHz
=16MHz
=8MHz
=12MHz
=16MHz
Min.Typ.Max.Unit
—816
—816
—0.81.2
—1.22.2
—3.24.8
—0.81.2
—1.22.2
—3.24.8
Ta=25°C
μA
μA3V—1020
mA3V—11.5
mA3V—1.52.75
mA
mA3V—11.5
mA3V—1.52.75
mA
Rev. 1.6042May 16, 2019Rev. 1.6043May 16, 2019
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 inuence on the measured values.
High Speed Internal Oscillator – HIRC – Frequency Accuracy
During the program writing operation the writer will trim the HIRC oscillator at a user selected
HIRC frequency and user selected voltage of either 3V or 5V.
8/12/16 MHz
SymbolParameter
8 MHz Writer Trimmed HIRC
f
HIRC
Frequency
12 MHz Writer Trimmed HIRC
Frequency
16 MHz Writer Trimmed HIRC
Frequency
2.2V~5.5V
2.7V~5.5V
3.3V~5.5V
Notes: 1. The 3V/5V values for VDD are provided as these are the two selectable xed voltages at which the HIRC
frequency is trimmed by the writer.
2. The row below the 3V/5V trim voltage row is provided to show the values for the full VDD range
operating voltage. It is recommended that the trim voltage is xed at 3V for application voltage ranges
from 2.2V to 3.3V and xed at 5V for application voltage ranges from 3.3V to 5.5V.
3. The minimum and maximum tolerance values provided in the table are only for the frequency at which
the writer trims the HIRC oscillator. After trimming at this chosen specic frequency any change in
HIRC oscillator frequency using the oscillator register control bits by the application program will give
a frequency tolerance to within ±20%.
Note: The RPH internal pull high resistance value is calculated by connecting to ground and enabling the input pin
with a pull-high resistor and then measuring the input sink current at the specied supply voltage level.
Dividing the voltage by this measured current provides the RPH value.
Test Conditions
V
DD
Conditions
Min.Typ.Max. Unit
5V—0—1.5
DD
DD
5V—3.5—5.0
——0.8V
3V
VOL=0.1V
5V3264—
VOH=0.9VDD,
3V
SLEDCn[m+1:m]=00,
n=0, 1, 2, 3 or 4, m=0, 2,
5V-1.5-2.9—
4 or 6
VOH=0.9VDD,
3V
SLEDCn[m+1:m]=01,
n=0, 1, 2, 3 or 4, m=0, 2,
5V-2.5-5.1—
4 or 6
VOH=0.9VDD,
3V
SLEDCn[m+1:m]=10,
n=0, 1, 2, 3 or 4, m=0, 2,
5V-3.6-7.3—
4 or 6
VOH=0.9VDD,
3V
SLEDCn[m+1:m]=11,
n=0, 1, 2, 3 or 4, m=0, 2,
5V-8.0-16.0—
4 or 6
DD
-0.7-1.5—
-1.3-2.5—
-1.8-3.6—
-4.0-8.0—
—V
DD
—V
DD
1632—
DD
DD
3V—2060100
5V—103050
SS
——±1μA
——4590120μs
V——0—0.2V
V
mA
mA
kΩ
Advanced A/D Flash MCU with LCD & EEPROM
Memory Characteristics
SymbolParameter
V
RW
VDD for Read / Write——V
Program Flash / Data EEPROM Memory
Erase / Write cycle time – Program
t
DEW
Flash Memory
Write cycle time – Data EEPROM
Memory
I
DDPGM
E
P
t
RETD
Programming / Erase current on V
DD
Cell Endurance——100K——E/W
ROM Data Retention time—Ta=25°C—40—Year
RAM Data Memory
V
DR
RAM Data Retention voltage—Device in SLEEP Mode1.0——V
LVD/LVR Electrical Characteristics
SymbolParameter
V
V
I
LVR
I
LVD
t
LVDS
t
LVR
t
BGS
t
LVD
LVR
LVD
Low Voltage Reset Voltage—
Low Voltage Detect Voltage—
Additional Current Consumption
for LVR Enable
Additional Current Consumption
for LVD Enable
LVDO Stable Time
Minimum Low Voltage Width to
Reset
VBG Turn on Stable Time— No load——200μs
Minimum Low Voltage Width to
Interrupt
V
DD
LVR enabled, voltage select 2.1V
LVR enabled, voltage select 2.55V2.55
LVR enabled, voltage select 3.15V3.15
LVR enabled, voltage select 3.8V3.8
LVD enabled, voltage select 2.0V
LVD enabled, voltage select 2.2V2.2
LVD enabled, voltage select 2.4V2.4
LVD enabled, voltage select 2.7V2.7
LVD enabled, voltage select 3.0V3.0
LVD enabled, voltage select 3.3V3.3
LVD enabled, voltage select 3.6V3.6
LVD enabled, voltage select 4.0V4.0
— LVD disabled, VBGEN=0——25μA
— LVR disabled, VBGEN=0——25μA
For LVR enable, VBGEN=0,
—
LVD off → on
For LVR disable, VBGEN=0,
—
LVD off → on
——120240480μs
——60120240μs
HT67F2350/HT67F2360
HT67F2370/HT67F2390
Ta= -40°C~85°C
Test Conditions
V
DD
Conditions
———23
———46
————5.0mA
Test Conditions
Conditions
Min. Typ.Max.Unit
—V
DDmin
DDmax
Ta=25°C
Min. Typ. Max. Unit
2.1
-5%
+5%V
2.0
-5%
+5%V
——15μs
——150μs
V
ms
Rev. 1.6046May 16, 2019Rev. 1.6047May 16, 2019
HT67F2350/HT67F2360
HT67F2370/HT67F2390
Advanced A/D Flash MCU with LCD & EEPROM
A/D Converter Characteristics
SymbolParameter
V
DD
V
ADI
V
REF
Operating Voltage——2.2—5.5V
Input Voltage——0—V
Reference Voltage——2—V
DNLDifferential Non-linearity
INLIntegral Non-linearity
I
ADC
t
ADCK
t
ADS
t
ADC
t
ON2ST
t
START
I
PGA
V
CM
V
OR
V
VR
Additional Current Consumption
for A/D Converter Enable
Clock Period——0.5—10μs
Sampling Time———4—t
Conversion Time (Including A/D
Sample and Hold Time)
During program execution, the Program Counter is used to keep track of the address of the
next instruction to be executed. It is automatically incremented by one each time an instruction
is executed except for instructions, such as “JMP” or “CALL” that demand a jump to a non-
consecutive Program Memory address. For devices with a Program Memory capacity in excess of
8K words, the Program Memory high byte address must be setup by selecting a certain program
memory bank which is implemented using the program memory bank pointer bits, PBPn. Only
the lower 8 bits, known as the Program Counter Low Register, are directly addressable by the
application program.
When executing instructions requiring jumps to non-consecutive addresses such as a jump instruction,
a subroutine call, interrupt or reset, etc., the microcontroller manages program control by loading
the required address into the Program Counter. For conditional skip instructions, once the condition
has been met, the next instruction, which has already been fetched during the present instruction
execution, is discarded and a dummy cycle takes its place while the correct instruction is obtained.
The lower byte of the Program Counter, known as the Program Counter Low register or PCL, is
available for program control and is a readable and writeable register. By transferring data directly
into this register, a short program jump can be executed directly; however, as only this low byte
is available for manipulation, the jumps are limited to the present page of memory that is 256
locations. When such program jumps are executed it should also be noted that a dummy cycle
will be inserted. Manipulating the PCL register may cause program branching, so an extra cycle is
needed to pre-fetch.
Fetch Inst. 1
Device
HT67F2350PC12~PC8PC7~PC0
HT67F2360PBP0, PC12~PC8PC7~PC0
HT67F2370PBP1~PBP0, PC12~PC8PC7~PC0
HT67F2390PBP2~PBP0, PC12~PC8PC7~PC0
Execute Inst. 1
Fetch Inst. 2Execute Inst. 2
Fetch Inst. 3Flush Pipeline
Fetch Inst. 6Execute Inst. 6
Instruction Fetching
Program Counter
High ByteLow Byte (PCL)
Program Counter
Fetch Inst. 7
Rev. 1.6052May 16, 2019Rev. 1.6053May 16, 2019
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. The activated level is indexed by the Stack Pointer, and is
neither readable nor writeable. At a subroutine call or interrupt acknowledge signal, the contents of
the Program Counter are pushed onto the stack. At the end of a subroutine or an interrupt routine,
signaled by a return instruction, 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 ag will be recorded but
the acknowledge signal will be inhibited. When the Stack Pointer is decremented, by RET or RETI,
the interrupt will be serviced. This feature prevents stack overow allowing the programmer to use
the structure more easily. However, when the stack is full, a CALL subroutine instruction can still
be executed which will result in a stack overow. Precautions should be taken to avoid such cases
which might cause unpredictable program branching.
If the stack is overow, the rst Program Counter save in the stack will be lost.
Program Counter
Top of Stack
Stack
Pointer
Bottom of Stack
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 specied register. As these ALU calculation or operations may
result in carry, borrow or other status changes, the status register will be correspondingly updated to
reect these changes. The ALU supports the following functions:
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. By using the appropriate programming tools, these Flash devices offer users the exibility to
conveniently debug and develop their applications while also offering a means of eld programming
and updating.
Structure
The Program Memory has a capacity of 8K×16 to 64K×16 bits. The Program Memory is addressed by the
Program Counter and also contains data, table information and interrupt entries. Table data, which can be
setup in any location within the Program Memory, is addressed by a separate table pointer registers.
HT67F2350/HT67F2360
HT67F2370/HT67F2390
Advanced A/D Flash MCU with LCD & EEPROM
DeviceCapacityBanks
HT67F23508K × 16—
HT67F236016K × 160~1
HT67F237032K × 160~3
HT67F239064K × 160~7
Special Vectors
Within the Program Memory, certain locations are reserved for the reset and interrupts. The location
000H is reserved for use by these devices reset for program initialisation. After a device reset is
initiated, the program will jump to this location and begin execution.
Look-up Table
Any location within the Program Memory can be dened as a look-up table where programmers can
store xed data. To use the look-up table, the table pointer must rst be setup by placing the address
of the look up data to be retrieved in the table pointer register, TBLP and TBHP. These registers
dene the total address of the look-up table.
After setting up the table pointer, the table data can be retrieved from the Program Memory using
the "TABRD [m]" or "TABRDL [m]" instructions respectively when the memory [m] is located in
sector 0. If the memory [m] is located in other sectors except sector 0, the data can be retrieved from
the program memory using the corresponding extended table read instruction such as "LTABRD [m]"
or "LTABRDL [m]" respectively. When the instruction is executed, the lower order table byte from
the Program Memory will be transferred to the user dened Data Memory register [m] as specied
in the instruction. The higher order table data byte from the Program Memory will be transferred to
the TBLH special register. Any unused bits in this transferred higher order byte will be read as "0".
The accompanying diagram illustrates the addressing data ow of the look-up table.
Last Page or
TBHP Register
TBLP Register
Program Memory
Address
Data
16 bits
Register TBLH
High ByteLow Byte
Rev. 1.6054May 16, 2019Rev. 1.6055May 16, 2019
User Selected
Register
HT67F2350/HT67F2360
HT67F2370/HT67F2390
Advanced A/D Flash MCU with LCD & EEPROM
000H
004H
03CH
n00H
nFFH
1FFFH
HT67F2350
Initialisation Vector
Interrupt Vectors
Look-up Table
16 bits
2000H
3FFFH
HT67F2360HT67F2370
Initialisation Vector
Interrupt Vectors
Look-up Table
16 bits
Bank 1
4000H
5FFFH
6000H
7FFFH
Initialisation Vector
Interrupt Vectors
Look-up Table
16 bits
Bank 1
Bank 2
Bank 3
Program Memory Structure
8000H
9FFFH
A000H
BFFFH
C000H
DFFF
E000H
FFFFH
H
HT67F2390
Initialisation Vector
Interrupt Vectors
Look-up Table
16 bits
Bank 1
Bank 2
Bank 3
Bank 4
Bank 5
Bank 6
Bank 7
Table Program Example
The accompanying example shows how the table pointer and table data is dened 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 value at this ORG statement is "1F00H" which refers to the start address of
the last page within the 8K Program Memory of the device. The table pointer low byte register is
setup here to have an initial value of "06H". This will ensure that the rst data read from the data
table will be at the Program Memory address "1F06H" or 6 locations after the start of the last page.
Note that the value for the table pointer is referenced to the rst address of the present page pointed
by the TBHP register if the "TABRD [m]" instruction is being used. The high byte of the table data
which in this case is equal to zero will be transferred to the TBLH register automatically when the
"TABRD [m]" instruction is executed.
Because the TBLH register is a read/write register and can be restored, care should be taken
to ensure its protection if both the main routine and Interrupt Service Routine use table read
instructions. If using the table read instructions, the Interrupt Service Routines may change the
value of the TBLH and subsequently cause errors if used again by the main routine. As a rule it is
recommended that simultaneous use of the table read instructions should be avoided. However, in
situations where simultaneous use cannot be avoided, the interrupts should be disabled prior to the
execution of any main routine table-read instructions. Note that all table related instructions require
two instruction cycles to complete their operation.
HT67F2350/HT67F2360
HT67F2370/HT67F2390
Advanced A/D Flash MCU with LCD & EEPROM
Table Read Program Example
tempreg1 db ? ; temporary register #1
tempreg2 db ? ; temporary register #2
:
mov a,06h ; initialise low table pointer - note that this address is referenced
mov tblp,a ; to the last page or the page that tbhp pointed
mov a,1fh ; initialise high table pointer
mov tbhp,a
:
tabrd tempreg1 ; transfers value in table referenced by table pointer data at program
; memory address "1F06H" transferred to tempreg1 and TBLH
dec tblp ; reduce value of table pointer by one
tabrd tempreg2 ; transfers value in table referenced by table pointer data at program
; memory address "1F05H" transferred to tempreg2 and TBLH in this
; example the data "1AH" is transferred to tempreg1 and data "0FH" to
; register tempreg2
:
org 1F00h ; sets initial address of program memory
dc 00Ah, 00Bh, 00Ch, 00Dh, 00Eh, 00Fh, 01Ah, 01Bh
:
Rev. 1.6056May 16, 2019Rev. 1.6057May 16, 2019
HT67F2350/HT67F2360
HT67F2370/HT67F2390
Advanced A/D Flash MCU with LCD & EEPROM
In Circuit Programming – ICP
The provision of Flash type Program Memory provides the user with a means of convenient and
easy upgrades and modications 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. This enables product manufacturers to easily
keep their manufactured products supplied with the latest program releases without removal and re-
Erase Page32 words / page64 words / page128 words / page
Writing Word32 words / time64 words / time128 words / time
Reading Word1 word / time1 word / time1 word / time
In Application Programming Control Registers
The Address register, FARL and FARH, the Data registers, FD0L/FD0H, FD1L/FD1H, FD2L/FD2H
and FD3L/FD3H, and the Control registers, FC0, FC1 and FC2, are the corresponding Flash access
registers located in Data Memory sector 0 and sector 1 respectively for IAP. If using the indirect
addressing method to access the FC0, FC1 and FC2 registers, all read and write operations to the
registers must be performed using the Indirect Addressing Register, IAR1 or IAR2, and the Memory
Pointer pair, MP1L/MP1H or MP2L/MP2H. Because the FC0, FC1 and FC2 control registers are
located at the address of 43H~45H in Data Memory sector 1, the desired value ranged from 43H to
45H must rst be written into the MP1L or MP2L Memory Pointer low byte and the value "01H"
must also be written into the MP1H or MP2H Memory Pointer high byte.
Rev. 1.6058May 16, 2019Rev. 1.6059May 16, 2019
HT67F2350/HT67F2360
HT67F2370/HT67F2390
Advanced A/D Flash MCU with LCD & EEPROM
Register Name
FC0CFWEN FMOD2 FMOD1 FMOD0 FWPENFWTFRDENFRD
FC1D7D6D5D4D3D2D1D0
FC2———————CLWB
FARLA7A6A5A4A3A2A1A0
FARH (HT67F2350)———A12A11A10A9A8
FARH (HT67F2360)——A13A12A 11A10A9A8
FARH (HT67F2370)—A14A13A12A11A10A9A8
FARH (HT67F2390)A15A14A13A12A 11A10A9A8
FD0LD7D6D5D4D3D2D1D0
FD0HD15D14D13D12D11D10D9D8
FD1LD7D6D5D4D3D2D1D0
FD1HD15D14D13D12D11D10D9D8
FD2LD7D6D5D4D3D2D1D0
FD2HD15D14D13D12D11D10D9D8
FD3LD7D6D5D4D3D2D1D0
FD3HD15D14D13D12D11D10D9D8
• FC0 Register
Bit76543210
NameCFWENFMOD2FMOD1FMOD0FWPENFWTFRDENFRD
R/WR/WR/WR/WR/WR/WR/WR/WR/W
POR00000000
76543210
IAP Registers List
Bit
Bit 7 CFWEN: Flash Memory Write enable control
0: Flash memory write function is disabled
1: Flash memory write function has been successfully enabled
When this bit is cleared to 0 by application program, the Flash memory write function
is disabled. Note that writing a "1" into this bit results in no action. This bit is used
to indicate that the Flash memory write function status. When this bit is set to 1 by
hardware, it means that the Flash memory write function is enabled successfully.
Otherwise, the Flash memory write function is disabled as the bit content is zero.
Bit 6~4 FMOD2~FMOD0: Mode selection
000: Write program memory
001: Page erase program memory
010: Reserved
011: Read program memory
10x: Reserved
110: FWEN mode – Flash memory Write function Enabled mode
111: Reserved
Bit 3 FWPEN: Flash memory Write Procedure Enable control
0: Disable
1: Enable
When this bit is set to 1 and the FMOD eld is set to "110", the IAP controller will
execute the "Flash memory write function enable" procedure. Once the Flash memory
write function is successfully enabled, it is not necessary to set the FWPEN bit any
more.
HT67F2350/HT67F2360
HT67F2370/HT67F2390
Advanced A/D Flash MCU with LCD & EEPROM
Bit 2 FWT: Flash memory Write Initiate control
0: Do not initiate Flash memory write or Flash memory write process is completed
1: Initiate Flash memory write process
This bit is set by software and cleared by hardware when the Flash memory write
process is completed.
0: Do not initiate Flash memory read or Flash memory read process is completed
1: Initiate Flash memory read process
This bit is set by software and cleared by hardware when the Flash memory read
process is completed.
• FC1 Register
Bit76543210
NameD7D6D5D4D3D2D1D0
R/WR/WR/WR/WR/WR/WR/WR/WR/W
POR00000000
Bit 7~0 D7~D0: Whole chip reset pattern
When user writes a specific value of "55H" to this register, it will generate a reset
signal to reset whole chip.
• FC2 Register
Bit76543210
Name———————CLWB
R/W———————R/W
POR———————0
Bit 7~1 Unimplemented, read as "0"
Bit 0 CLWB: Flash memory Write Buffer Clear control
0: Do not initiate Write Buffer Clear process or Write Buffer Clear process is
completed
1: Initiate Write Buffer Clear process
This bit is set by software and cleared by hardware when the Write Buffer Clear
process is completed.
• FARL Register
Bit76543210
NameA7A6A5A4A3A2A1A0
R/WR/WR/WR/WR/WR/WR/WR/WR/W
POR00000000
Bit 7~0 Flash Memory Address bit 7 ~ bit 0
• FARH Register – HT67F2350
Bit76543210
Name———A12A11A10A9A8
R/W———R/WR/WR/WR/WR/W
POR———00000
Bit 7~5 Unimplemented, read as "0"
Bit 4~0 Flash Memory Address bit 12 ~ bit 8
Rev. 1.6060May 16, 2019Rev. 1.6061May 16, 2019
HT67F2350/HT67F2360
HT67F2370/HT67F2390
Advanced A/D Flash MCU with LCD & EEPROM
• FARH Register – HT67F2360
Bit76543210
Name——A13A12A11A10A9A8
R/W——R/WR/WR/WR/WR/WR/W
POR——000000
Bit 7~6 Unimplemented, read as "0"
Bit 5~0 Flash Memory Address bit 13 ~ bit 8
• FARH Register – HT67F2370
Bit76543210
Name—A14A13A12A 11A10A9A8
R/W—R/WR/WR/WR/WR/WR/WR/W
POR—0000000
Bit 7 Unimplemented, read as "0"
Bit 6~0 Flash Memory Address bit 14 ~ bit 8
• FARH Register – HT67F2390
Bit76543210
NameA15A14A13A12A 11A10A9A8
R/WR/WR/WR/WR/WR/WR/WR/WR/W
POR00000000
Bit 7~0 Flash Memory Address bit 15 ~ bit 8
• FD0L Register
Bit76543210
NameD7D6D5D4D3D2D1D0
R/WR/WR/WR/WR/WR/WR/WR/WR/W
POR00000000
Bit 7~0 The rst Flash Memory data bit 7 ~ bit 0
Note that the data written into the low byte data register FD0L will only be stored in
the FD0L register and not be loaded into the lower 8-bit write buffer.
• FD0H Register
Bit76543210
NameD15D14D13D12D11D10D9D8
R/WR/WR/WR/WR/WR/WR/WR/WR/W
POR00000000
Bit 7~0 The rst Flash Memory data bit 15 ~ bit 8
Note that when the 8-bit data is written into the high byte data register FD0H, the
whole 16-bit data stored in the FD0H and FD0L registers will simultaneously be
loaded into the 16-bit write buffer and then the content of the Flash Memory address
register pair, FARH and FARL, will be incremented by one.
• FD1L Register
Bit76543210
NameD7D6D5D4D3D2D1D0
R/WR/WR/WR/WR/WR/WR/WR/WR/W
POR00000000
Bit 7~0 The second Flash Memory data bit 7 ~ bit 0
HT67F2350/HT67F2360
HT67F2370/HT67F2390
Advanced A/D Flash MCU with LCD & EEPROM
• FD1H Register
Bit76543210
NameD15D14D13D12D11D10D9D8
R/WR/WR/WR/WR/WR/WR/WR/WR/W
POR00000000
Bit 7~0 The second Flash Memory data bit 15 ~ bit 8
• FD2L Register
Bit76543210
NameD7D6D5D4D3D2D1D0
R/WR/WR/WR/WR/WR/WR/WR/WR/W
POR00000000
Bit 7~0 The third Flash Memory data bit 7 ~ bit 0
• FD2H Register
Bit76543210
NameD15D14D13D12D11D10D9D8
R/WR/WR/WR/WR/WR/WR/WR/WR/W
POR00000000
Bit 7~0 The third Flash Memory data bit 15 ~ bit 8
• FD3L Register
Bit76543210
NameD7D6D5D4D3D2D1D0
R/WR/WR/WR/WR/WR/WR/WR/WR/W
POR00000000
Bit 7~0 The fourth Flash Memory data bit 7 ~ bit 0
• FD3H Register
Bit76543210
NameD15D14D13D12D11D10D9D8
R/WR/WR/WR/WR/WR/WR/WR/WR/W
POR00000000
Bit 7~0 The fourth Flash Memory data bit 15 ~ bit 8
Rev. 1.6062May 16, 2019Rev. 1.6063May 16, 2019
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 rst enable the Flash memory write operation by the following procedure:
Step 1. Write "110" into the FMOD2~FMOD0 bits to select the FWEN mode.
Step 2. Set the FWPEN bit to "1". The step 1 and step 2 can be executed simultaneously.
Step 3. The pattern data with a sequence of 00H, 04H, 0DH, 09H, C3H and 40H must be written
into the FD1L, FD1H, FD2L, FD2H, FD3L and FD3H registers respectively.
Step 4. A counter with a time-out period of 300μs will be activated to allow users writing the correct
pattern data into the FD1L/FD1H ~ FD3L/FD3H register pairs. The counter clock is derived
from the LIRC oscillator.
Step 5. If the counter overows or the pattern data is incorrect, the Flash memory write operation
will not be enabled and users must again repeat the above procedure. Then the FWPEN bit
will automatically be cleared to 0 by hardware.
Step 6. If the pattern data is correct before the counter overows, the Flash memory write operation
will be enabled and the FWPEN bit will automatically be cleared to 0 by hardware. The
CFWEN bit will also be set to 1 by hardware to indicate that the Flash memory write
operation is successfully enabled.
Step 7. Once the Flash memory write operation is enabled, the user can change the Flash ROM data
through the Flash control register.
Step 8. To disable the Flash memory write operation, the user can clear the CFWEN bit to 0.
Flash Memory
Write Function
Enable Procedure
Set FMOD [2:0] =110 & FWPEN=1
Select FWEN mode & Start Flash write
Hardware activate a counter
Wrtie the following pattern to Flash Data registers
HT67F2370/HT67F2390
Advanced A/D Flash MCU with LCD & EEPROM
Special Purpose Data Memory Structure – 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. The method of indirect
addressing for RAM data manipulation uses these Indirect Addressing Registers and Memory
Pointers, in contrast to direct memory addressing, where the actual memory address is specied.
Actions on the IAR0, IAR1 and IAR2 registers will result in no actual read or write operation to
these registers but rather to the memory location specied by their corresponding Memory Pointers,
MP0, MP1L/MP1H or MP2L/MP2H. Acting as a pair, IAR0 and MP0 can together access data
only from Sector 0 while the IAR1 register together with MP1L/MP1H register pair and IAR2
register together with MP2L/MP2H register pair can access data from any Data Memory sector. As
the Indirect Addressing Registers are not physically implemented, reading the Indirect Addressing
Registers indirectly will return a result of "00H" and writing to the registers indirectly will result in
no operation.
HT67F2350/HT67F2360
HT67F2370/HT67F2390
Memory Pointers – MP0, MP1H/MP1L, MP2H/MP2L
Five Memory Pointers, known as MP0, MP1L, MP1H, MP2L and MP2H, are provided. These
Memory Pointers are physically implemented in the Data Memory and can be manipulated in the
same way as normal registers providing a convenient way with which to address and track data.
When any operation to the relevant Indirect Addressing Registers is carried out, the actual address
that the microcontroller is directed to is the address specied by the related Memory Pointer. MP0,
together with Indirect Addressing Register, IAR0, are used to access data from Sector 0, while
MP1L/MP1H together with IAR1 and MP2L/MP2H together with IAR2 are used to access data
from all data sectors according to the corresponding MP1H or MP2H register. Direct Addressing can
be used in all data sectors using the corresponding instruction which can address all available data
memory space.
Indirect Addressing Program Example
• Example 1
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
mo v block,a
mov a,offset adres1 ; Accumulator loaded with rst RAM address
mov mp0,a ; setup memory pointer with rst RAM address
loo p:
clr IAR0 ; clear the data at address dened by MP0
inc mp0 ; increment memory pointer
sdz block ; check if last memory location has been cleared
jmp loop
continue:
Rev. 1.6072May 16, 2019Rev. 1.6073May 16, 2019
HT67F2350/HT67F2360
HT67F2370/HT67F2390
Advanced A/D Flash MCU with LCD & EEPROM
• Example 2
da ta .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
mo v block,a
mov a,01h ; setup the memory sector
mo v mp1h,a
mov a,offset adres1 ; Accumulator loaded with rst RAM address
mov mp1l,a ; setup memory pointer with rst RAM address
loo p:
clr IAR1 ; clear the data at address dened by MP1L
inc mp1l ; increment memory pointer MP1L
sdz block ; check if last memory location has been cleared
jmp loop
continue:
:
The important point to note here is that in the example shown above, no reference is made to specic
RAM addresses.
Direct Addressing Program Example using extended instructions
data .section ‘data’
temp db ?
code .section at 0 code
org 00h
start:
lmov a,[m] ; move [m] data to acc
lsub a, [m+1] ; com pare [m] and [m+1] d ata
snz c ; [m]>[m+1]?
jmp continue ; no
lmov a,[m] ; y es, exchange [m] an d [m+1] data
mo v tem p,a
lmov a,[m+1]
lmov [m],a
mo v a,t emp
lmov [m+1],a
continue:
:
Note: Here "m" is a data memory address located in any data memory sectors. For example,
m=1F0H, it indicates address 0F0H in Sector 1.
Advanced A/D Flash MCU with LCD & EEPROM
Program Memory Bank Pointer – PBP
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" operation using the "JMP" or "CALL" instruction. After that a jump to a non-
consecutive Program Memory address which is located in a certain bank selected by the program
memory bank pointer bits will occur.
PBP Register – HT67F2360
Bit76543210
NameD7D6D5D4D3D2D1PBP0
R/WR/WR/WR/WR/WR/WR/WR/WR/W
POR00000000
Bit 7~1 D7~D1: General data bits and can be read or written.
Bit 0 PBP0: Program Memory Bank Point bit 0
0: Bank 0
1: Bank 1
PBP Register – HT67F2370
Bit76543210
NameD7D6D5D4D3D2PBP1PBP0
R/WR/WR/WR/WR/WR/WR/WR/WR/W
POR00000000
HT67F2350/HT67F2360
HT67F2370/HT67F2390
Bit 7~2 D7~D2: General data bits and can be read or written.
Bit 1~0 PBP1~PBP0: Program Memory Bank Point bit 1 ~ bit 0
00: Bank 0
01: Bank 1
10: Bank 2
11: Bank 3
PBP Register – HT67F2390
Bit76543210
NameD7D6D5D4D3PBP2PBP1PBP0
R/WR/WR/WR/WR/WR/WR/WR/WR/W
POR00000000
Bit 7~3 D7~D3: General data bits and can be read or written.
Bit 2~0 PBP2~PBP0: Program Memory Bank Point bit 2 ~ bit 0
000: Bank 0
001: Bank 1
010: Bank 2
011: Bank 3
100: Bank 4
101: Bank 5
110: Bank 6
111: Bank 7
Rev. 1.6074May 16, 2019Rev. 1.6075May 16, 2019
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. Without the Accumulator it would be necessary to write the result of
each calculation or logical operation such as addition, subtraction, shift, etc., to the Data Memory
resulting in higher programming and timing overheads. Data transfer operations usually involve
the temporary storage function of the Accumulator; for example, when transferring data between
one user-defined register and another, it is necessary to do this by passing the data through the
Accumulator as no direct transfer between two registers is permitted.
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. Loading
a value directly into this PCL register will cause a jump to the specied Program Memory location;
however, as the register is only 8-bit wide, only jumps within the current Program Memory page are
permitted. When such operations are used, note that a dummy cycle will be inserted.
Look-up Table Registers – TBLP, TBHP, TBLH
These three special function registers are used to control operation of the look-up table which
is stored in the Program Memory. The TBLP and TBHP registers are the table pointer pair and
indicates the location where the table data is located. Their value must be setup before any table
read instructions are executed. Their value can be changed, for example using the "INC" or "DEC"
instructions, allowing for easy table data pointing and reading. TBLH is the location where the high
order byte of the table data is stored after a table read data instruction has been executed. Note that
the lower order table data byte is transferred to a user dened location.
Status Register – STATUS
This 8-bit register contains the zero ag (Z), carry ag (C), auxiliary carry ag (AC), overow ag
(OV), SC ag, CZ ag, power down ag (PDF), and watchdog time-out ag (TO). These arithmetic/
logical operation and system management ags are used to record the status and operation of the
microcontroller.
With the exception of the TO and PDF ags, bits in the status register can be altered by instructions
like most other registers. Any data written into the status register will not change the TO or PDF ag.
In addition, operations related to the status register may give different results due to the different
instruction operations. The TO ag can be affected only by a system power-up, a WDT time-out or
by executing the "CLR WDT" or "HALT" instruction. The PDF ag is affected only by executing
the "HALT" or "CLR WDT" instruction or during a system power-up.
The Z, OV, AC, C, SC and CZ ags generally reect the status of the latest operations.
• C is set if an operation results in a carry during an addition operation or if a borrow does not take
place during a subtraction operation; otherwise C is cleared. C is also affected by a rotate through
carry instruction.
• AC is set if an operation results in a carry out of the low nibbles in addition, or no borrow from
the high nibble into the low nibble in subtraction; otherwise AC is cleared.
• Z is set if the result of an arithmetic or logical operation is zero; otherwise Z is cleared.
• OV is set if an operation results in a carry into the highest-order bit but not a carry out of the
highest-order bit, or vice versa; otherwise OV is cleared.
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.
• SC is the result of the "XOR" operation which is performed by the OV ag and the MSB of the
current instruction operation result.
• CZ is the operational result of different ags for different instructions. Refer to register
denitions for more details.
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 registers are important and if
the subroutine can corrupt the status register, precautions must be taken to correctly save it.
STATUS Register
Bit76543210
NameSCCZTOPDFOVZACC
R/WRRRRR/WR/WR/WR/W
PORxx00xxxx
"x": unknown
Bit 7 SC: The result of the "XOR" operation which is performed by the OV ag and the
MSB of the instruction operation result.
Bit 6 CZ: The operational result of different ags for different instructions.
For SUB/SUBM/LSUB/LSUBM instructions, the CZ ag is equal to the Z ag.
For SBC/ SBCM/ LSBC/ LSBCM instructions, the CZ ag is the "AND" operation
result which is performed by the previous operation CZ ag and current operation zero
ag. For other instructions, the CZ ag will not be affected.
Bit 5 TO: Watchdog Time-out ag
0: After power up or executing the "CLR WDT" or "HALT" instruction
1: A watchdog time-out occurred
Bit 4 PDF: Power down ag
0: After power up or executing the "CLR WDT" instruction
1: By executing the "HALT" instruction
Bit 3 OV: Overow ag
0: No overow
1: An operation results in a carry into the highest-order bit but not a carry out of the
highest-order bit or vice versa
Bit 2 Z: Zero ag
0: The result of an arithmetic or logical operation is not zero
1: The result of an arithmetic or logical operation is zero
Bit 1 AC: Auxiliary ag
0: No auxiliary carry
1: An operation results in a carry out of the low nibbles, in addition, or no borrow
from the high nibble into the low nibble in subtraction
Bit 0 C: Carry ag
0: No carry-out
1: An operation results in a carry during an addition operation or if a borrow does
not take place during a subtraction operation
The "C" ag is also affected by a rotate through carry instruction.
Rev. 1.6076May 16, 2019Rev. 1.6077May 16, 2019
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. By
incorporating this kind of data memory, a whole new host of application possibilities are made
available to the designer. The availability of EEPROM storage allows information such as product
identification numbers, calibration values, specific user data, system setup data or other product
information to be stored directly within the product microcontroller. The process of reading and
writing data to the EEPROM memory has been reduced to a very trivial affair.
DeviceCapacityAddress
HT67F2350
HT67F2360
HT67F2370512 × 8000H ~ 1FFH
HT67F23901024 × 8000H ~ 3FFH
EEPROM Data Memory Structure
The EEPROM Data Memory capacity is up to 1024×8 bits for the series of devices. Unlike the
Program Memory and RAM Data Memory, the EEPROM Data Memory is not directly mapped
into memory space and is therefore not directly addressable in the same way as the other types of
memory. Read and Write operations to the EEPROM are carried out in single byte operations using
an address and data register in sector 0 and a single control register in sector 1.
256 × 800H ~ FFH
EEPROM Registers
Three registers control the overall operation of the internal EEPROM Data Memory. These are the
address register, EEA, the data register, EED and a single control register, EEC. As both the EEA
and EED registers are located in sector 0, they can be directly accessed in the same was as any other
Special Function Register. The EEC register, however, being located in sector 1, can be read from
or written to indirectly using the MP1H/MP1L or MP2H/MP2L Memory Pointer pair and Indirect
Addressing Register, IAR1 or IAR2. Because the EEC control register is located at address 40H
in sector 1, the Memory Pointer low byte register, MP1L or MP2L, must rst be set to the value
40H and the Memory Pointer high byte register, MP1H or MP2H, set to the value, 01H, before any
operations on the EEC register are executed.
Register Name
EEA
(HT67F2350/60)
EEAL
(HT76F2370/90)
EEAH
(HT67F2370)
EEAH
(HT67F2390)
EEDD7D6D5D4D3D2D1D0
EEC————WRENWRRDENRD
Bit
76543210
EEA7EEA6EEA5EEA4EEA3EEA2EEA1EEA0
EEAL7EEAL6EEAL5EEAL4EEAL3EEAL2EEAL1EEAL0
———————EEAH0
——————EEAH1EEAH0
EEPROM Registers List
HT67F2350/HT67F2360
HT67F2370/HT67F2390
Advanced A/D Flash MCU with LCD & EEPROM
EEA Register – HT67F2350/HT67F2360
Bit76543210
NameEEA7EEA6EEA5EEA4EEA3EEA2EEA1EEA0
R/WR/WR/WR/WR/WR/WR/WR/WR/W
POR00000000
Bit 7~0 EEA7~EEA0: Data EEPROM address bit 7 ~ bit0
EEAL Register – HT67F2370/HT67F2390
Bit76543210
NameEEAL7EEAL6EEAL5EEAL4EEAL3EEAL2EEAL1EEAL0
R/WR/WR/WR/WR/WR/WR/WR/WR/W
POR00000000
Bit 7~0 EEAL7~EEAL0: Data EEPROM low byte address bit 7 ~ bit 0
EEAH Register – HT67F2370
Bit76543210
Name———————EEAH0
R/W———————R/W
POR———————0
Bit 7~1 Unimplemented, read as "0"
Bit 0 EEAH0: Data EEPROM high byte address bit 0
EEAH Register – HT67F2390
Bit76543210
Name——————EEAH1EEAH0
R/W——————R/WR/W
POR——————00
Bit 7~2 Unimplemented, read as "0"
Bit 1~0 EEAH1~EEAH0: Data EEPROM high byte address bit 1 ~ bit 0
EED Register
Bit76543210
NameD7D6D5D4D3D2D1D0
R/WR/WR/WR/WR/WR/WR/WR/WR/W
POR00000000
Bit 7~0 D7~D0: Data EEPROM data bit 7 ~ bit 0
Rev. 1.6078May 16, 2019Rev. 1.6079May 16, 2019
HT67F2350/HT67F2360
HT67F2370/HT67F2390
Advanced A/D Flash MCU with LCD & EEPROM
EEC Register
Bit76543210
Name————WRENWRRDENRD
R/W————R/WR/WR/WR/W
POR————0000
Bit 7~4 Unimplemented, read as "0"
Bit 3 WREN: Data EEPROM write enable
0: Disable
1: Enable
This is the Data EEPROM Write Enable Bit which must be set high before Data
EEPROM write operations are carried out. Clearing this bit to zero will inhibit Data
EEPROM write operations. Note that the WREN bit will automatically be cleared to
zero after the write operation is nished.
Bit 2 WR: EEPROM write control
0: Write cycle has nished
1: Activate a write cycle
This is the Data EEPROM Write Control Bit and when set high by the application
program will activate a write cycle. This bit will be automatically reset to zero by the
hardware after the write cycle has nished. Setting this bit high will have no effect if
the WREN has not rst been set high.
Bit 1 RDEN: Data EEPROM read enable
0: Disable
1: Enable
This is the Data EEPROM Read Enable Bit which must be set high before Data
EEPROM read operations are carried out. Clearing this bit to zero will inhibit Data
EEPROM read operations.
Bit 0 RD: EEPROM read control
0: Read cycle has nished
1: Activate a read cycle
This is the Data EEPROM Read Control Bit and when set high by the application
program will activate a read cycle. This bit will be automatically reset to zero by the
hardware after the read cycle has nished. Setting this bit high will have no effect if
the RDEN has not rst been set high.
Note: The WREN, WR, RDEN and RD can not be set to "1" at the same time in one instruction. The
WR and RD can not be set to "1" at the same time.
Reading Data from the EEPROM
To read data from the EEPROM, the EEPROM address of the data to be read must rst be placed in
the EEA register or EEAL/EEAH register pair. Then the read enable bit, RDEN, in the EEC register
must be set high to enable the read function. If the RD bit in the EEC register is now set high, a
read cycle will be initiated. Setting the RD bit high will not initiate a read operation if the RDEN bit
has not been set. When the read cycle terminates, the RD bit will be automatically cleared to zero,
after which the data can be read from the EED register. The data will remain in the EED register
until another read or write operation is executed. The application program can poll the RD bit to
determine when the data is valid for reading.
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 rst 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 rst be set high to enable the write
function. After this, the WR bit in the EEC register must be immediately set high to initiate a write
cycle successfully. These two instructions must be executed consecutively. The global interrupt bit
EMI should also rst be cleared before implementing any write operations, and then set high again
after the write cycle has started. Note that setting the WR bit high will not initiate a write cycle if
the WREN bit has not been set. 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. When the write cycle terminates, the WR bit will be automatically cleared to zero by the
microcontroller, informing the user that the data has been written to the EEPROM. The application
program can therefore poll the WR bit to determine when the write cycle has ended.
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. As the EEPROM control register
is located in sector 1, this adds a further measure of protection against spurious write operations.
During normal program operation, ensuring that the Write Enable bit in the control register is
cleared will safeguard against incorrect write operations.
HT67F2350/HT67F2360
HT67F2370/HT67F2390
EEPROM Interrupt
The EEPROM write interrupt is generated when an EEPROM write cycle has ended. The EEPROM
interrupt must rst be enabled by setting the DEE bit in the relevant interrupt register. However, as
the EEPROM is contained within a Multi-function Interrupt, the associated multi-function interrupt
enable bit must also be set. When an EEPROM write cycle ends, the DEF request flag and its
associated multi-function interrupt request ag will both be set. If the global, EEPROM and Multi-
function interrupts are enabled and the stack is not full, a jump to the associated Multi-function
Interrupt vector will take place. When the interrupt is serviced only the Multi-function interrupt ag
will be automatically reset, the EEPROM interrupt ag must be manually reset by the application
program.
Rev. 1.6080May 16, 2019Rev. 1.6081May 16, 2019
HT67F2350/HT67F2360
HT67F2370/HT67F2390
Advanced A/D Flash MCU with LCD & EEPROM
Programming Considerations
Care must be taken that data is not inadvertently written to the EEPROM. Protection can be Periodic
by ensuring that the Write Enable bit is normally cleared to zero when not writing. Also the Memory
Pointer high byte register could be normally cleared to zero as this would inhibit access to sector 1
where the EEPROM control register exist. Although certainly not necessary, consideration might be
given in the application program to the checking of the validity of new write data by a simple read
back process. When writing data the WR bit must be set high immediately after the WREN bit has
been set high, to ensure the write cycle executes correctly. The global interrupt bit EMI should also
be cleared before a write cycle is executed and then re-enabled after the write cycle starts. Note that
the device should not enter the 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 ; user dened address
MOV EEA, A
MOV A, 040H ; setup memory pointer low byte MP1L
MOV MP1L, A ; MP1L points to EEC register
MOV A, 01H ; setup Memory Pointer high byte MP1H
MOV MP1H, A
SET IAR1.1 ; set RDEN bit, enable read operations
SET IAR1.0 ; start Read Cycle - set RD bit
BACK:
SZ IAR1.0 ; check for read cycle end
JMP BACK
CLR IAR1 ; disable EEPROM write
CLR MP1H
MOV A, EED ; move read data to register
MOV READ_DATA, A
• Writing Data to the EEPROM – polling method
MOV A, EEPROM_ADRES ; user dened address
MOV EEA, A
MOV A, EEPROM_DATA ; user dened data
MOV EED, A
MOV A, 040H ; setup memory pointer low byte MP1L
MOV MP1L, A ; MP1L points to EEC register
MOV A, 01H ; setup Memory Pointer high byte MP1H
MOV MP1H, A
CLR EMI
SET IAR1.3 ; set WREN bit, enable write operations
SET IAR1.2 ; start Write Cycle - set WR bit
SET EMI
BACK:
SZ IAR1.2 ; check for write cycle end
JMP BACK
CLR IAR1 ; disable EEPROM write
CLR MP1H
Oscillators
Various oscillator types offer the user a wide range of functions according to their various application
requirements. The exible 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 a combination of application program and relevant control registers.
Oscillator Overview
In addition to being the source of the main system clock the oscillators also provide clock sources
for the Watchdog Timer and Time Base Interrupts. External oscillators requiring some external
components as well as fully integrated internal oscillators, requiring no external components, are
provided to form a wide range of both fast and slow system oscillators. All oscillator options are
selected through register programming. The higher frequency oscillators provide higher performance
but carry with it the disadvantage of higher power requirements, while the opposite is of course true
for the lower frequency oscillators. With the capability of dynamically switching between fast and
slow system clock, the device has the exibility to optimize the performance/power ratio, a feature
especially important in power sensitive portable applications.
HT67F2350/HT67F2360
HT67F2370/HT67F2390
Advanced A/D Flash MCU with LCD & EEPROM
TypeNameFrequencyPins
External High Speed CrystalHXT400kHz~16MHzOSC1/OSC2
Internal High Speed RCHIRC8/12/16MHz—
External Low Speed CrystalLXT32.768kHzXT1/XT2
Internal Low Speed RCLIRC32kHz—
Oscillator Types
System Clock Congurations
Th
ere are four methods of generating the system clock, two high speed oscillators and two low
speed oscillators for all devices. The high speed oscillator is the external crystal/ceramic oscillator,
HXT, and the internal 8/12/16MHz RC oscillator, HIRC. The two low speed oscillators are the
internal 32kHz RC oscillator, LIRC, and the external 32.768kHz crystal oscillator, LXT. Selecting
whether the low or high speed oscillator is used as the system oscillator is implemented using the
CKS2~CKS0 bits in the SCC register and as the system clock can be dynamically selected.
The actual source clock used for the low speed oscillators is chosen via the FSS bit in the SCC
register while for the high speed oscillator the source clock is selected by the FHS bit in the SCC
register. The frequency of the slow speed or high speed system clock is determined using the
CKS2~CKS0 bits in the SCC register. Note that two oscillator selections must be made namely one
high speed and one low speed system oscillators. It is not possible to choose a no-oscillator selection
for either the high or low speed oscillator.
Rev. 1.6082May 16, 2019Rev. 1.6083May 16, 2019
HT67F2350/HT67F2360
HXT
Prescaler
f
H
LXT
High Speed
Oscollators
Low Speed
Oscollators
fH/2
f
H
/16
f
H
/64
f
H
/8
f
H
/4
f
H
/32
CKS2~CKS0
f
SYS
f
SUB
f
SUB
HXTEN
FSS
LIRC
LXTEN
f
LIRC
f
LIRC
HIRC
HIRCEN
f
H
FHS
HT67F2370/HT67F2390
Advanced A/D Flash MCU with LCD & EEPROM
System Clock Congurations
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. For most crystal oscillator congurations, the simple
connection of a crystal across OSC1 and OSC2 will create the necessary phase shift and feedback for
oscillation, without requiring external capacitors. However, for some crystal types and frequencies,
to ensure oscillation, it may be necessary to add two small value capacitors, C1 and C2. Using a
ceramic resonator will usually require two small value capacitors, C1 and C2, to be connected as
shown for oscillation to occur. The values of C1 and C2 should be selected in consultation with the
crystal or resonator manufacturer’s specication.
For oscillator stability and to minimise the effects of noise and crosstalk, it is important to ensure
that the crystal and any associated resistors and capacitors along with interconnecting lines are all
located as close to the MCU as possible.
C1
C2
Note: 1. RPis normally not required. C1 and C2 are required.
2. Although not shown OSC1/OSC2 pins have a parasitic
capacitance of around 7pF.
OSC1
R
P
OSC2
Internal
Oscillator
Circuit
R
F
To internal
circuits
Crystal/Resonator Oscillator
Crystal FrequencyC1C2
12MHz0 pF0 pF
8MHz0 pF0 pF
4MHz0 pF0 pF
1MHz100 pF100 pF
Note
: C1 and C2 values are for guidance only.
HXT Oscillator C1 and C2 Values
Crystal Recommended Capacitor Values
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
manufacturing process and the inclusion of internal frequency compensation circuits are used to
ensure that the inuence of the power supply voltage, temperature and process variations on the
oscillation frequency are minimised. As a result, at a power supply of 3V or 5V and at a temperature
of 25°C degrees, the selected trimmed oscillation frequency will have a tolerance within 1%. Note
that if this internal system clock is selected, as it requires no external pins for its operation, I/O pins
are free for use as normal I/O pins or other pin-shared functional pins.
External 32.768kHz Crystal Oscillator – LXT
The External 32.768kHz Crystal System Oscillator is one of the low frequency oscillator choices,
which is selected via a software control bit, FSS. This clock source has a xed frequency of 32.768kHz
and requires a 32.768kHz crystal to be connected between pins XT1 and XT2. The external resistor
and capacitor components connected to the 32.768kHz crystal are necessary to provide oscillation.
For applications where precise frequencies are essential, these components may be required to
provide frequency compensation due to different crystal manufacturing tolerances. After the LXT
oscillator is enabled by setting the LXTEN bit to 1, there is a time delay associated with the LXT
oscillator waiting for it to start-up.
When the microcontroller enters the SLEEP or IDLE Mode, the system clock is switched off to stop
microcontroller activity and to conserve power. However, in many microcontroller applications it
may be necessary to keep the internal timers operational even when the microcontroller is in the
SLEEP or IDLE Mode. To do this, another clock, independent of the system clock, must be provided.
However, for some crystals, to ensure oscillation and accurate frequency generation, it is necessary
to add two small value external capacitors, C1 and C2. The exact values of C1 and C2 should be
selected in consultation with the crystal or resonator manufacturer’s specification. The external
parallel feedback resistor, RP, and the pull high resistor, RU, are required.
The pin-shared software control bits determine if the XT1/XT2 pins are used for the LXT oscillator
or as I/O or other pin-shared functional pins.
• If the LXT oscillator is not used for any clock source, the XT1/XT2 pins can be used as normal I/O
or other pin-shared functional pins.
• If the LXT oscillator is used for any clock source, the 32.768kHz crystal should be connected to
the XT1/XT2 pins.
For oscillator stability and to minimise the effects of noise and crosstalk, it is important to ensure
that the crystal and any associated resistors and capacitors along with interconnecting lines are all
located as close to the MCU as possible.
HT67F2350/HT67F2360
HT67F2370/HT67F2390
V
C1
32.768
kHz
C2
Note: 1. RP, RU, C1 and C2 are required.
2. Although not shown XT1/XT2 pins have a parasitic
capacitance of around 7pF.
Rev. 1.6084May 16, 2019Rev. 1.6085May 16, 2019
DD
XT1
R
R
P
U
XT2
External LXT Oscillator
Internal
Oscillator
Circuit
Internal RC
Oscillator
To internal
circuits
HT67F2350/HT67F2360
HT67F2370/HT67F2390
Advanced A/D Flash MCU with LCD & EEPROM
LXT Oscillator C1 and C2 Values
Crystal FrequencyC1C2
32.768kHz10pF10pF
Note: 1. C1 and C2 values are for guidance only.
2. RP=5M~10MΩ is recommended.
3. RU=10MΩ is recommended.
32.768kHz Crystal Recommended Capacitor Values
Internal 32kHz Oscillator – LIRC
The Internal 32 kHz System Oscillator is one of the low frequency oscillator choices, which is
selected via a software control bit, FSS. It is a fully integrated RC oscillator with a typical frequency
of 32 kHz at 5V, requiring no external components for its implementation. Device trimming during
the manufacturing process and the inclusion of internal frequency compensation circuits are used
to ensure that the inuence of the power supply voltage, temperature and process variations on the
oscillation frequency are minimised. As a result, at a power supply of 5V and at a temperature of
25˚C degrees, the xed oscillation frequency of 32 kHz will have a tolerance within 5%.
Operating Modes and System Clocks
Present day applications require that their microcontrollers have high performance but often still
demand that they consume as little power as possible, conicting requirements that are especially
true in battery powered portable applications. The fast clocks required for high performance will
by their nature increase current consumption and of course vice-versa lower speed clocks reduce
current consumption. 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.
System Clocks
Each device has different clock sources for both the CPU and peripheral function operation. By
providing the user with a wide range of clock selections using register programming, a clock system
can be congured to obtain maximum application performance.
The main system clock, can come from either a high frequency, fH, or low frequency, f
and is selected using the CKS2~CKS0 bits in the SCC register. The high speed system clock is
sourced from an HXT or HIRC oscillator, selected via conguring the FHS bit in the SCC register.
The low speed system clock source can be sourced from the internal clock f
then it can be sourced by either the LXT or LIRC oscillators, selected via conguring the FSS bit in
the SCC register. The other choice, which is a divided version of the high speed system oscillator
has a range of fH/2~fH/64.
SUB
. If f
, source,
SUB
is selected
SUB
HIRCEN
HXTEN
High Speed
Oscollators
HIRC
HXT
HT67F2350/HT67F2360
HT67F2370/HT67F2390
Advanced A/D Flash MCU with LCD & EEPROM
f
FHS
f
H
Prescaler
FSS
H
fH/2
f
H
f
H
f
H
f
H
f
H
/4
/8
/16
/32
/64
f
SYS
f
PSC0
CKS2~CKS0
Prescaler 0
f
Time Base 0
LXTEN
LXT
LIRC
Low Speed
Oscollators
f
LIRC
f
SUB
f
SYS
f
/4
SYS
f
SUB
TB0[2:0]
CLKSEL0[1:0]
f
SYS
f
/4
SYS
f
SUB
f
PSC1
Time Base 1Prescaler 1
TB1[2:0]
CLKSEL1[1:0]
f
f
LIRC
LIRC
WDT
LVR
Device Clock Congurations
Note: When the system clock source f
is switched to f
SYS
from fH, the high speed oscillation
SUB
can be stopped to conserve the power or continue to oscillate to provide the clock source,
fH~fH/64, for peripheral circuit to use, which is determined by conguring the corresponding
high speed oscillator enable control bit.
SUB
Rev. 1.6086May 16, 2019Rev. 1.6087May 16, 2019
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. There are two modes allowing normal operation of the
microcontroller, the FAST Mode and SLOW Mode. The remaining four modes, the SLEEP, IDLE0,
IDLE1 and IDLE2 Mode are used when the microcontroller CPU is switched off to conserve power.
Operation
Mode
FASTOnxx000~110fH~fH/64OnOnOn
SLOWOnxx111f
IDLE0Off01
IDLE1Off11xxxOnOnOnOn
IDLE2Off10
SLEEPOff00xxxOffOffOffOn
CPU
FHIDENFSIDEN CKS2~CKS0
Note: 1. The fH clock will be switched on or off by conguring the corresponding oscillator enable
bit in the SLOW mode.
2. The f
clock will be switched on if the WDT function is enabled.
LIRC
Register Setting
000~110Off
111On
000~110On
111Off
f
SYS
SUB
f
On/Off
OffOnOn
OnOffOn
f
H
(1)
SUBfLIRC
OnOn
(2)
FAST Mode
As the name suggests this is one of the main operating modes where the microcontroller has all of
its functions operational and where the system clock is provided by one of the high speed oscillators.
This mode operates allowing the microcontroller to operate normally with a clock source will come
from one of the high speed oscillators, either the HXT or HIRC oscillators. The high speed oscillator
will however first be divided by a ratio ranging from 1 to 64, the actual ratio being selected by
the CKS2~CKS0 bits in the SCC register. Although a high speed oscillator is used, running the
microcontroller at a divided clock ratio reduces the operating current.
SLOW Mode
This is also a mode where the microcontroller operates normally although now with a slower speed
clock source. The clock source used will be from f
SUB
. The f
clock is derived from either the
SUB
LIRC or LXT oscillator.
SLEEP Mode
The SLEEP Mode is entered when a HALT instruction is executed and when the FHIDEN and
FSIDEN bit are low. In the SLEEP mode the CPU will be stopped and both the high and low speed
oscillators will be switched off. However the f
clock will continue to operate if the WDT function
LIRC
is enabled by the WDTC register.
IDLE0 Mode
The IDLE0 Mode is entered when a HALT instruction is executed and when the FHIDEN bit in
the SCC register is low and the FSIDEN bit in the SCC register is high. In the IDLE0 Mode the
CPU will be switched off but the low speed oscillator will be turned on to drive some peripheral
functions.
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.
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 and low speed oscillator will be switched off but the high speed oscillator will be turned on to
provide a clock source to keep some peripheral functions operational.
Control Registers
The registers, SCC, HIRCC, HXTC and LXTC, are used to control the system clock and the
These three bits are used to select which clock is used as the system clock source. In
addition to the system clock source directly derived from fH or f
, a divided version
SUB
of the high speed system oscillator can also be chosen as the system clock source.
Bit 4 Unimplemented, read as "0"
Bit 3 FHS: High Frequency clock selection
0: HIRC
1: HXT
Bit 2 FSS: Low Frequency clock selection
0: LIRC
1: LXT
Rev. 1.6088May 16, 2019Rev. 1.6089May 16, 2019
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" instruction.
Bit 0 FSIDEN: Low Frequency oscillator control when CPU is switched off
0: Disable
1: Enable
This bit is used to control whether the low speed oscillator is activated or stopped
when the CPU is switched off by executing an "HALT" instruction. The LIRC
oscillator is controlled by this bit together with the WDT function enable control when
the LIRC is selected to be the low speed oscillator clock source or the WDT function
is enabled respectively. If this bit is cleared to 0 but the WDT function is enabled, the
LIRC oscillator will also be enabled.
HIRCC Register
Bit76543210
Name————HIRC1HIRC0HIRCFHIRCEN
R/W————R/WR/WRR/W
POR————0001
Bit 7~4 Unimplemented, read as "0"
Bit 3~2 HIRC1~HIRC0: HIRC frequency selection
00: 8 MHz
01: 12 MHz
10: 16 MHz
11: 8 MHz
When the HIRC oscillator is enabled or the HIRC frequency selection is changed by
the application program, the clock frequency will automatically be changed after the
HIRCF ag is set to 1.
Bit 1 HIRCF: HIRC oscillator stable ag
0: HIRC unstable
1: HIRC stable
This bit is used to indicate whether the HIRC oscillator is stable or not. When the
HIRCEN bit is set to 1 to enable the HIRC oscillator or the HIRC frequency selection
is changed by the application program, the HIRCF bit will rst be cleared to 0 and
then set to 1 after the HIRC oscillator is stable.
Bit 0 HIRCEN: HIRC oscillator enable control
0: Disable
1: Enable
HT67F2350/HT67F2360
HT67F2370/HT67F2390
Advanced A/D Flash MCU with LCD & EEPROM
HXTC Register
Bit76543210
Name—————HXTMHXTFHXTEN
R/W—————R/WRR/W
POR—————000
Bit 7~3 Unimplemented, read as "0"
Bit 2 HXTM: HXT mode selection
0: HXT frequency ≤ 10 MHz
1: HXT frequency > 10 MHz
This bit is used to select the HXT oscillator operating mode. Note that this bit must
be properly congured before the HXT is enabled. When the OSC1 and OSC2 pins
are enabled and the HXTEN bit is set to 1 to enable the HXT oscillator, it is invalid to
change the value of this bit. Otherwise, this bit value can be changed with no operation
on the HXT function.
Bit 1 HXTF: HXT oscillator stable ag
0: HXT unstable
1: HXT stable
This bit is used to indicate whether the HXT oscillator is stable or not. When the
HXTEN bit is set to 1 to enable the HXT oscillator, the HXTF bit will rst be cleared
to 0 and then set to 1 after the HXT oscillator is stable.
Bit 0 HXTEN: HXT oscillator enable control
0: Disable
1: Enable
LXTC Register
Bit76543210
Name——————LXTFLXTEN
R/W——————RR/W
POR——————00
Bit 7~2 Unimplemented, read as "0"
Bit 1 LXTF: LXT oscillator stable ag
0: LXT unstable
1: LXT stable
This bit is used to indicate whether the LXT oscillator is stable or not. When the
LXTEN bit is set to 1 to enable the LXT oscillator, the LXTF bit will rst be cleared
to 0 and then set to 1 after the LXT oscillator is stable.
Bit 0 LXTEN: LXT oscillator enable control
0: Disable
1: Enable
Rev. 1.6090May 16, 2019Rev. 1.6091May 16, 2019
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.
In simple terms, Mode Switching between the FAST Mode and SLOW Mode is executed using the
CKS2~CKS0 bits in the SCC register while Mode Switching from the FAST/SLOW Modes to the
SLEEP/IDLE Modes is executed via the HALT instruction. When a HALT instruction is executed,
whether the device enters the IDLE Mode or the SLEEP Mode is determined by the condition of the
FHIDEN and FSIDEN bits in the SCC register.
HALT instruction executed
SLEEP
CPU stop
FHIDEN=0
FSIDEN=0
off
f
H
off
f
SUB
FAST
f
SYS=fH~fH
fHon
/64
CPU run
f
on
SYS
f
on
SUB
HALT instruction executed
IDLE2
CPU stop
FHIDEN=1
FSIDEN=0
on
f
H
off
f
SUB
SLOW
f
SYS=fSUB
f
on
SUB
CPU run
f
on
SYS
fHon/off
HALT instruction executed
IDLE1
CPU stop
FHIDEN=1
FSIDEN=1
on
f
H
on
f
SUB
HALT instruction executed
IDLE0
CPU stop
FHIDEN=0
FSIDEN=1
off
f
H
on
f
SUB
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" in the SCC register. This will then use the low speed system oscillator
which will consume less power. Users may decide to do this for certain operations which do not
require high performance and can subsequently reduce power consumption.
The SLOW Mode is sourced from the LXT or LIRC oscillator determined by the FSS bit in the SCC
register and therefore requires this oscillator to be stable before full mode switching occurs.
FAST Mode
CKS2~CKS0 = 111
SLOW 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
IDLE2 Mode
Rev. 1.6092May 16, 2019Rev. 1.6093May 16, 2019
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
FAST mode from f
, the CKS2~CKS0 bits should be set to "000" ~ "110" and then the system
SUB
clock will respectively be switched to fH ~ fH/64.
However, if fH is not used in SLOW mode and thus switched off, it will take some time to re-
oscillate and stabilise when switching to the FAST mode from the SLOW Mode. This is monitored
using the HXTF bit in the HXTC register or the HIRCF bit in the HIRCC register. The time duration
required for the high speed system oscillator stabilization is specied in the relevant characteristics.
FHIDEN=0, FSIDEN=0
HALT instruction is executed
FHIDEN=0, FSIDEN=1
HALT instruction is executed
. When system clock is switched back to the
SUB
CKS2~CKS0 = 000~110
SLEEP Mode
IDLE0 Mode
SLOW Mode
FAST Mode
FHIDEN=1, FSIDEN=1
HALT instruction is executed
IDLE1 Mode
FHIDEN=1, FSIDEN=0
HALT instruction is executed
IDLE2 Mode
Entering the SLEEP Mode
There is only one way for the device to enter the SLEEP 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 "0". In this mode all the clocks and functions will be switched off except the WDT function.
When this instruction is executed under the conditions described above, the following will occur:
• The system clock will be stopped and the application program will stop at the "HALT"
instruction.
• The Data Memory contents and registers will maintain their present condition.
• The I/O ports will maintain their present conditions.
• In the status register, the Power Down ag PDF will be set, and WDT timeout ag TO will be
cleared.
• The WDT will be cleared and resume counting if the WDT function is enabled by the WDTC
register.
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". When this instruction is executed under the conditions
described above, the following will occur:
• The fH clock will be stopped and the application program will stop at the "HALT" instruction, but
the f
clock will be on.
SUB
• The Data Memory contents and registers will maintain their present condition.
• The I/O ports will maintain their present conditions.
• In the status register, the Power Down ag PDF will be set, and WDT timeout ag TO will be
cleared.
• The WDT will be cleared and resume counting if the WDT function is enabled by the WDTC
register.
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". When this instruction is executed under the conditions described above, the following
will occur:
• The fH and f
• The Data Memory contents and registers will maintain their present condition.
• The I/O ports will maintain their present conditions.
• In the status register, the Power Down ag PDF will be set, and WDT timeout ag TO will be
cleared.
• The WDT will be cleared and resume counting if the WDT function is enabled by the WDTC
register.
clocks will be on but the application program will stop at the "HALT" instruction.
SUB
Entering the IDLE2 Mode
There is only one way for the device to enter the IDLE2 Mode and that is to execute the "HALT"
instruction in the application program with the FHIDEN bit in the SCC register equal to "1" and the
FSIDEN bit in the SCC register equal to "0". When this instruction is executed under the conditions
described above, the following will occur:
• The fH clock will be on but the f
clock will be off and the application program will stop at the
SUB
"HALT" instruction.
• The Data Memory contents and registers will maintain their present condition.
• The I/O ports will maintain their present conditions.
• In the status register, the Power Down ag PDF will be set, and WDT timeout ag TO will be
cleared.
• The WDT will be cleared and resume counting if the WDT function is enabled by the WDTC
register.
Rev. 1.6094May 16, 2019Rev. 1.6095May 16, 2019
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. Special attention must be made
to the I/O pins on the device. All high-impedance input pins must be connected to either a xed
high or low level as any oating input pins could create internal oscillations and result in increased
current consumption. This also applies to devices which have different package types, as there may
be unbonded pins. These must either be setup as outputs or if setup as inputs must have pull-high
resistors connected.
Care must also be taken with the loads, which are connected to I/O pins, which are setup as outputs.
These should be placed in a condition in which minimum current is drawn or connected only to
external circuits that do not draw current, such as other CMOS inputs. Also note that additional
standby current will also be required if the LIRC oscillator has enabled.
In the IDLE1 and IDLE 2 Mode the high speed oscillator is on, if the peripheral function clock
source is derived from the high speed oscillator, the additional standby current will also be perhaps
in the order of several hundred micro-amps.
Wake-up
To minimise power consumption the device can enter the SLEEP or any IDLE Mode, where the
CPU will be switched off. However, when the device is woken up again, it will take a considerable
time for the original system oscillator to restart, stabilise and allow normal operation to resume.
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
• An external reset
• A system interrupt
• A WDT overow
When the device executes the "HALT" instruction, the PDF ag will be set to 1. The PDF ag will
be cleared to 0 if the device experiences a system power-up or executes the clear Watchdog Timer
instruction. If the system is woken up by a WDT overow, a Watchdog Timer reset will be initiated
and the TO ag will be set to 1. The TO ag is set if a WDT time-out occurs and causes a wake-up
that only resets the Program Counter and Stack Pointer, other ags remain in their original status.
Each pin on Port A can be setup using the PAWU register to permit a negative transition on the pin
to wake up the system. When a Port A pin wake-up occurs, the program will resume execution at
the instruction following the "HALT" instruction. If the system is woken up by an interrupt, then
two possible situations may occur. The rst is where the related interrupt is disabled or the interrupt
is enabled but the stack is full, in which case the program will resume execution at the instruction
following the "HALT" instruction. In this situation, the interrupt which woke up the device will not
be immediately serviced, but will rather be serviced later when the related interrupt is nally enabled
or when a stack level becomes free. The other situation is where the related interrupt is enabled and
the stack is not full, in which case the regular interrupt response takes place. If an interrupt request
flag is set high before entering the SLEEP or IDLE Mode, the wake-up function of the related
interrupt will be disabled.
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
oscillator has an approximate frequency of 32 kHz and this specied internal clock period can vary
with VDD, temperature and process variations. The Watchdog Timer source clock is then subdivided
by a ratio of 28 to 218 to give longer timeouts, the actual value being chosen using the WS2~WS0
bits in the WDTC register.
Watchdog Timer Control Register
A single register, WDTC, controls the required timeout period as well as the enable/disable
operation. This register controls the overall operation of the Watchdog Timer.
WDTC Register
Bit76543210
NameWE4WE3WE2WE1WE0WS2WS1WS0
R/WR/WR/WR/WR/WR/WR/WR/WR/W
POR01010011
Bit 7~3 WE4~WE0: WDT function enable control
10101: Disabled
01010: Enabled
Other values: Reset MCU
If these bits are changed due to adverse environmental conditions, the microcontroller
will be reset. The reset operation will be activated after a delay time, t
WRF bit in the RSTFC register will be set to 1.
Bit 2~0 WS2~WS0: WDT time-out period selection
000: 28/f
001: 210/f
010: 212/f
011: 214/f
100: 215/f
101: 216/f
110: 217/f
111: 218/f
These three bits determine the division ratio of the watchdog timer source clock,
which in turn determines the time-out period.
HT67F2350/HT67F2360
HT67F2370/HT67F2390
Advanced A/D Flash MCU with LCD & EEPROM
. The LIRC internal
LIRC
, and the
SRESET
LIRC
LIRC
LIRC
LIRC
LIRC
LIRC
LIRC
LIRC
RSTFC Register
Bit76543210
Name————RSTFLVRFLRFWRF
R/W————R/WR/WR/WR/W
POR————0x00
"x": unknown
Bit 7~4 Unimplemented, read as "0"
Bit 3 RSTF: Reset control register software reset ag
Described elsewhere.
Bit 2 LVRF: LVR function reset ag
Described elsewhere.
Bit 1 LRF: LVR control register software reset ag
Described elsewhere.
Rev. 1.6096May 16, 2019Rev. 1.6097May 16, 2019
HT67F2350/HT67F2360
HT67F2370/HT67F2390
Advanced A/D Flash MCU with LCD & EEPROM
Bit 0 WRF: WDT control register software reset ag
0: Not occurred
1: Occurred
This bit is set to 1 by the WDT control register software reset and cleared by the
application program. Note that this bit can only be cleared to 0 by the application program.
Watchdog Timer Operation
The Watchdog Timer operates by providing a device reset when its timer overows. This means
that in the application program and during normal operation the user has to strategically clear the
Watchdog Timer before it overows to prevent the Watchdog Timer from executing a reset. This is
done using the clear watchdog instruction. If the program malfunctions for whatever reason, jumps
to an unknown location, or enters an endless loop, the clear instruction will not be executed in the
correct manner, in which case the Watchdog Timer will overow and reset the device. With regard to
the Watchdog Timer enable/disable function, there are ve bits, WE4~WE0, in the WDTC register
to offer the enable/disable control and reset control of the Watchdog Timer. The WDT function will
be enabled when the WE4~WE0 bits are set to a value of 01010B while the WDT function will
be disabled if the WE4~WE0 bits are equal to 10101B. If the WE4~WE0 bits are set to any other
values rather than 01010B and 10101B, it will reset the device after a delay time, t
on these bits will have a value of 01010B.
WE4 ~ WE0 BitsWDT Function
10101B Disable
01010BEnable
Any other valueReset MCU
Watchdog Timer Enable/Disable Control
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. Four methods can be adopted to clear the contents of the Watchdog Timer.
The rst is a WDT reset, which means a certain value except 01010B and 10101B written into the
WE4~WE0 eld, the second is using the Watchdog Timer software clear instruction and the third
is via a HALT instruction. The last is an external hardware reset, which means a low level on the
external reset pin if the external reset pin exists by the RSTC register.
There is only one method of using software instruction to clear the Watchdog Timer. That is to use
the single "CLR WDT" instruction to clear the WDT contents.
The maximum time out period is when the 218 division ratio is selected. As an example, with a 32
kHz LIRC oscillator as its source clock, this will give a maximum watchdog period of around 8
second for the 218 division ratio and a minimum timeout of 8ms for the 28 division ration.
. After power
SRESET
WE4~WE0 bitsWDTC RegisterReset MCU
“CLR WDT” Instruction
“HALT” Instruction
RES pin reset
LIRC8-stage DividerWDT Prescaler
f
LIRC
(f
/28~ f
LIRC
LIRC
CLR
/218)
Watchdog timer
f
LIRC
8
/2
8-to-1 MUXWS2~WS0
WDT Time-out
8
(2
/f
~ 218/f
LIRC
LIRC
)
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 rst applied to the microcontroller. In this case, internal circuitry will
ensure that the microcontroller, after a short delay, will be in a well defined state and ready to
execute the rst program instruction. After this power-on reset, certain important internal registers
will be set to dened states before the program commences. One of these registers is the Program
Counter, which will be reset to zero forcing the microcontroller to begin program execution from the
lowest Program Memory address.
In addition to the power-on reset, situations may arise where it is necessary to forcefully apply a
reset condition when the microcontroller is already running, the RES line is forcefully pulled low.
In such a case, known as a normal operation reset, some of the microcontroller registers remain
unchanged allowing the microcontroller to preceed with normal operation after the reset line is
allowed to return high.
The Watchdog Timer overow is one of many reset types and will reset the microcontroller. Another
reset exists in the form of a Low Voltage Reset, LVR, where a full reset, similar to the RES reset is
implemented in situations where the power supply voltage falls below a certain threshold. Another
type of reset is when the Watchdog Timer overows and resets the microcontroller. All types of reset
operations result in different register conditions being setup.
HT67F2350/HT67F2360
HT67F2370/HT67F2390
Advanced A/D Flash MCU with LCD & EEPROM
Reset Functions
There are five ways in which a microcontroller reset can occur, through events occurring both
internally and externally.
Power-on Reset
The most fundamental and unavoidable reset is the one that occurs after power is rst applied to
the microcontroller. As well as ensuring that the Program Memory begins execution from the rst
memory address, a power-on reset also ensures that certain other registers are preset to known
conditions. All the I/O port and port control registers will power up in a high condition ensuring that
all pins will be rst set to inputs.
Power-on Reset
SST Time-out
Note: t
RSTD
V
DD
t
RSTD
is power-on delay with typical time=48 ms
Power-On Reset Timing Chart
Rev. 1.6098May 16, 2019Rev. 1.6099May 16, 2019
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. For this reason it is recommended that an
external RC network is connected to the RES pin, whose additional time delay will ensure that the
RES pin remains low for an extended period to allow the power supply to stabilise. During this time
delay, normal operation of the microcontroller will be inhibited. After the RES line reaches a certain
voltage value, the reset delay time, t
microcontroller will begin normal operation. The abbreviation SST in the gures stands for System
Start-up Time. For most applications a resistor connected between VDD and the RES line and a
capacitor connected betweeb VSS and the RES pin will provide a suitable external reset circuit. Any
wiring connected to the RES pin should be kept as short as possible to minimise any stray noise
interference. For applications that operate within an environment where more noise is present the
Enhanced Reset Circuit shown is recommended.
1N4148*
, is invoked to provide an extea delay time after which the
RSTD
V
0.01µF**
DD
10kΩ~
100kΩ
VDD
RES
300Ω*
0.1µF~1µF
VSS
Note: "*" It is recommended that this component is added for added ESD protection.
"**" It is recommended that this component is added in environments where power line noise
is signicant.
External RES Circuit
Pulling the RES pin low using external hardware will also execute a device reset. In this case, as in
the case of other resets, the Program Counter will reset to zero and program execution initiated from
this point.
0.9V
DD
t
RSTD+tSST
Internal Reset
Note: t
RSTD
0.4V
RES
DD
is power-on delay with typical time=16 ms
RES Reset Timing Chart
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. If the content of the RSTC register is set to any value other than 01010101B or
10101010B, it will reset the device after a delay time, t
value of 01010101B.
RSTC7 ~ RSTC0 BitsReset Function
01010101BI/O
10101010BRES
Any other valueReset MCU
Internal Reset Function Control
• RSTC Register
Bit76543210
NameRSTC7RSTC6RSTC5RSTC4RSTC3RSTC2RSTC1RSTC0
R/WR/WR/WR/WR/WR/WR/WR/WR/W
POR01010101
Bit 7~0 RSTC7~RSTC0: Reset function control
01010101: I/O pin
10101010: RES pin
Other values: Reset MCU
If these bits are changed due to adverse environmental conditions, the microcontroller
will be reset. The reset operation will be activated after a delay time, t
RSTF bit in the RSTFC register will be set to 1.
All resets will reset this register to POR value except the WDT time out hardware
warm reset. Note that if the register is set to 10101010 to select the RES pin, this
conguration has higher priority than other related pin-shared controls.
• RSTFC Register
Bit76543210
Name————RSTFLVRFLRFWRF
R/W————R/WR/WR/WR/W
POR————0x00
Bit 7~4 Unimplemented, read as "0"
Bit 3 RSTF: Reset control register software reset ag
0: Not occurred
1: Occurred
This bit is set to 1 by the RSTC control register software reset and cleared by the
application program. Note that this bit can only be cleared to 0 by the application
program.
Bit 2 LVRF: LVR function reset ag
Described elsewhere.
Bit 1 LRF: LVR control register software reset ag
Described elsewhere.
Bit 0 WRF: WDT control register software reset ag
Described elsewhere.
. After power on the register will have a
SRESET
SRESET
"x": unknown
, and the
Rev. 1.60100May 16, 2019Rev. 1.60101May 16, 2019
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.