Holtek HT68F Series User manual

Enhanced I/O Flash Type 8-Bit MCU with EEPROM
HT68F20/HT68F30/HT68F40/HT68F50/HT68F60
HT68FU30/HT68FU40/HT68FU50/HT68FU60
Revision: V2.10 Date: July 02, 2014July 02, 2014

Rev. 2.10 2 July 02, 2014 Rev. 2.10 3 July 02, 2014
HT68F20/HT68F30/HT68F40/HT68F50/HT68F60
HT68FU30/HT68FU40/HT68FU50/HT68FU60
Enhanced I/O Flash Type 8-Bit MCU with EEPROM
HT68F20/HT68F30/HT68F40/HT68F50/HT68F60
HT68FU30/HT68FU40/HT68FU50/HT68FU60
Enhanced I/O Flash Type 8-Bit MCU with EEPROM
Table of Contents
Features............................................................................................................ 8
CPU Features ......................................................................................................................... 8
Peripheral Features................................................................................................................. 9
General Description....................................................................................... 10
Selection Table................................................................................................11
Block Diagram................................................................................................ 12
Pin Assignment.............................................................................................. 13
Pin Description .............................................................................................. 17
Absolute Maximum Ratings.......................................................................... 22
D.C. Characteristics....................................................................................... 22
A.C. Characteristics....................................................................................... 24
Comparator Electrical Characteristics ........................................................ 25
Power-on Reset Characteristics................................................................... 25
System Architecture...................................................................................... 26
Clocking and Pipelining......................................................................................................... 26
Program Counter................................................................................................................... 27
Stack ..................................................................................................................................... 28
Arithmetic and Logic Unit – ALU ........................................................................................... 28
Flash Program Memory................................................................................. 29
Structure................................................................................................................................ 29
Special Vectors ..................................................................................................................... 30
Look-up Table........................................................................................................................ 30
Table Program Example........................................................................................................ 31
In Circuit Programming ......................................................................................................... 32
RAM Data Memory ......................................................................................... 33
Structure................................................................................................................................ 33
Special Function Register Description........................................................ 37
Indirect Addressing Registers – IAR0, IAR1 ......................................................................... 37
Memory Pointers – MP0, MP1 .............................................................................................. 37
Bank Pointer – BP................................................................................................................. 38
Accumulator – ACC............................................................................................................... 40
Program Counter Low Register – PCL.................................................................................. 40
Look-up Table Registers – TBLP, TBHP, TBLH..................................................................... 40
Status Register – STATUS.................................................................................................... 41

Rev. 2.10 2 July 02, 2014 Rev. 2.10 3 July 02, 2014
HT68F20/HT68F30/HT68F40/HT68F50/HT68F60
HT68FU30/HT68FU40/HT68FU50/HT68FU60
Enhanced I/O Flash Type 8-Bit MCU with EEPROM
HT68F20/HT68F30/HT68F40/HT68F50/HT68F60
HT68FU30/HT68FU40/HT68FU50/HT68FU60
Enhanced I/O Flash Type 8-Bit MCU with EEPROM
EEPROM Data Memory.................................................................................. 43
EEPROM Data Memory Structure ........................................................................................ 43
EEPROM Registers .............................................................................................................. 43
Reading Data from the EEPROM ......................................................................................... 47
Writing Data to the EEPROM................................................................................................ 47
Write Protection..................................................................................................................... 47
EEPROM Interrupt ................................................................................................................ 47
Programming Considerations................................................................................................ 48
Oscillator ........................................................................................................ 49
Oscillator Overview ............................................................................................................... 49
System Clock Congurations................................................................................................ 49
External Crystal/Ceramic Oscillator – HXT ........................................................................... 51
External RC Oscillator – ERC ............................................................................................... 52
Internal RC Oscillator – HIRC ............................................................................................... 52
External 32.768kHz Crystal Oscillator – LXT ........................................................................ 53
LXT Oscillator Low Power Function ...................................................................................... 54
Internal 32kHz Oscillator – LIRC........................................................................................... 54
Supplementary Oscillators .................................................................................................... 54
Operating Modes and System Clocks ......................................................... 55
System Clocks ...................................................................................................................... 55
System Operation Modes...................................................................................................... 57
Control Register .................................................................................................................... 58
Fast Wake-up ........................................................................................................................ 60
Operating Mode Switching and Wake-up.............................................................................. 61
NORMAL Mode to SLOW Mode Switching ........................................................................... 62
SLOW Mode to NORMAL Mode Switching ........................................................................... 63
Entering the SLEEP1 Mode .................................................................................................. 64
Entering the IDLE0 Mode...................................................................................................... 64
Entering the IDLE1 Mode...................................................................................................... 65
Standby Current Considerations ........................................................................................... 65
Wake-up................................................................................................................................ 66
Programming Considerations................................................................................................ 66
Watchdog Timer............................................................................................. 67
Watchdog Timer Clock Source.............................................................................................. 67
Watchdog Timer Control Register ......................................................................................... 67
Watchdog Timer Operation ................................................................................................... 68
Reset and Initialisation.................................................................................. 69
Reset Functions .................................................................................................................... 69
Reset Initial Conditions ......................................................................................................... 72

Rev. 2.10 4 July 02, 2014 Rev. 2.10 5 July 02, 2014
HT68F20/HT68F30/HT68F40/HT68F50/HT68F60
HT68FU30/HT68FU40/HT68FU50/HT68FU60
Enhanced I/O Flash Type 8-Bit MCU with EEPROM
HT68F20/HT68F30/HT68F40/HT68F50/HT68F60
HT68FU30/HT68FU40/HT68FU50/HT68FU60
Enhanced I/O Flash Type 8-Bit MCU with EEPROM
Input/Output Ports ......................................................................................... 82
Pull-high Resistors ................................................................................................................ 84
Port A Wake-up ..................................................................................................................... 86
I/O Port Control Registers ..................................................................................................... 86
Pin-remapping Functions ...................................................................................................... 89
Pin-remapping Registers....................................................................................................... 89
I/O Pin Structures.................................................................................................................. 96
Programming Considerations................................................................................................ 96
Timer Modules – TM ...................................................................................... 97
Introduction ........................................................................................................................... 97
TM Operation ........................................................................................................................ 98
TM Clock Source................................................................................................................... 98
TM Interrupts......................................................................................................................... 98
TM External Pins................................................................................................................... 98
TM Input/Output Pin Control Registers ................................................................................. 99
Programming Considerations.............................................................................................. 109
Compact Type TM .........................................................................................110
Compact TM Operation........................................................................................................110
Compact Type TM Register Description...............................................................................111
Compact Type TM Operating Modes ...................................................................................115
Compare Match Output Mode..............................................................................................115
Timer/Counter Mode ............................................................................................................115
PWM Output Mode...............................................................................................................118
Standard Type TM – STM ............................................................................ 121
Standard TM Operation....................................................................................................... 121
Standard Type TM Register Description ............................................................................. 122
Standard Type TM Operating Modes .................................................................................. 131
Compare Output Mode........................................................................................................ 131
Timer/Counter Mode ........................................................................................................... 134
PWM Output Mode.............................................................................................................. 134
Single Pulse Mode .............................................................................................................. 138
Capture Input Mode ............................................................................................................ 140
Enhanced Type TM – ETM........................................................................... 142
Enhanced TM Operation ..................................................................................................... 143
Enhanced Type TM Register Description............................................................................ 143
Enhanced Type TM Operating Modes................................................................................. 150
Compare Output Mode........................................................................................................ 150
Timer/Counter Mode ........................................................................................................... 155
PWM Output Mode.............................................................................................................. 155
Single Pulse Output Mode .................................................................................................. 161
Capture Input Mode ............................................................................................................ 163

Rev. 2.10 4 July 02, 2014 Rev. 2.10 5 July 02, 2014
HT68F20/HT68F30/HT68F40/HT68F50/HT68F60
HT68FU30/HT68FU40/HT68FU50/HT68FU60
Enhanced I/O Flash Type 8-Bit MCU with EEPROM
HT68F20/HT68F30/HT68F40/HT68F50/HT68F60
HT68FU30/HT68FU40/HT68FU50/HT68FU60
Enhanced I/O Flash Type 8-Bit MCU with EEPROM
Comparators ................................................................................................ 166
Comparator Operation ........................................................................................................ 166
Comparator Registers ......................................................................................................... 166
Comparator Interrupt........................................................................................................... 169
Programming Considerations.............................................................................................. 169
Serial Interface Module – SIM ..................................................................... 169
SPI Interface ....................................................................................................................... 170
SPI Registers ...................................................................................................................... 171
SPI Communication ............................................................................................................ 174
I2C Interface ........................................................................................................................ 176
I2C Interface Operation........................................................................................................ 176
I2C Registers ....................................................................................................................... 177
I2C Bus Communication ...................................................................................................... 181
I2C Bus Start Signal............................................................................................................. 182
Slave Address ..................................................................................................................... 182
I2C Bus Read/Write Signal .................................................................................................. 183
I2C Bus Data and Acknowledge Signal ............................................................................... 183
Peripheral Clock Output.............................................................................. 185
Peripheral Clock Operation ................................................................................................. 185
Interrupts ...................................................................................................... 186
Interrupt Registers............................................................................................................... 186
Interrupt Operation .............................................................................................................. 200
External Interrupt................................................................................................................. 204
Comparator Interrupt........................................................................................................... 204
Multi-function Interrupt ........................................................................................................ 205
Time Base Interrupts........................................................................................................... 205
Serial Interface Module Interrupt......................................................................................... 207
External Peripheral Interrupt ............................................................................................... 207
EEPROM Interrupt .............................................................................................................. 207
LVD Interrupt ....................................................................................................................... 208
TM Interrupts....................................................................................................................... 208
Interrupt Wake-up Function................................................................................................. 208
Programming Considerations.............................................................................................. 209
Power Down Mode and Wake-up................................................................ 210
Entering the IDLE or SLEEP Mode ..................................................................................... 210
Standby Current Considerations ......................................................................................... 210
Wake-up...............................................................................................................................211
Low Voltage Detector – LVD ....................................................................... 212
LVD Register ....................................................................................................................... 212
LVD Operation..................................................................................................................... 213

Rev. 2.10 6 July 02, 2014 Rev. 2.10 7 July 02, 2014
HT68F20/HT68F30/HT68F40/HT68F50/HT68F60
HT68FU30/HT68FU40/HT68FU50/HT68FU60
Enhanced I/O Flash Type 8-Bit MCU with EEPROM
HT68F20/HT68F30/HT68F40/HT68F50/HT68F60
HT68FU30/HT68FU40/HT68FU50/HT68FU60
Enhanced I/O Flash Type 8-Bit MCU with EEPROM
SCOM Function for LCD.............................................................................. 214
LCD Operation .................................................................................................................... 214
LCD Bias Control ................................................................................................................ 215
Conguration Options................................................................................. 217
Application Circuits..................................................................................... 218
UART Module Serial Interface .................................................................... 219
UART Module Features....................................................................................................... 219
UART Module Overview...................................................................................................... 219
UART Module Block Diagram ............................................................................................. 219
Pin Assignment ................................................................................................................... 220
UART Module Pin Description............................................................................................. 222
UART Module D.C. Characteristics..................................................................................... 223
UART Module A.C. Characteristics ..................................................................................... 224
UART Module Functional Description ................................................................................. 224
UART Module Internal Signal.............................................................................................. 225
UART Module SPI Interface ................................................................................................ 225
UART Module External Pin Interfacing................................................................................ 226
UART Data Transfer Scheme.............................................................................................. 227
UART Commands ............................................................................................................... 227
UART Status and Control Registers.................................................................................... 228
Baud Rate Generator .......................................................................................................... 233
UART Module Setup and Control........................................................................................ 235
Managing Receiver Errors .................................................................................................. 240
UART Module Interrupt Structure........................................................................................ 241
UART Module Power-down and Wake-up .......................................................................... 242
Using the UART Function.................................................................................................... 243
Application Circuit with UART Module................................................................................. 244
Instruction Set.............................................................................................. 245
Introduction ......................................................................................................................... 245
Instruction Timing ................................................................................................................ 245
Moving and Transferring Data............................................................................................. 245
Arithmetic Operations.......................................................................................................... 245
Logical and Rotate Operation ............................................................................................. 246
Branches and Control Transfer ........................................................................................... 246
Bit Operations ..................................................................................................................... 246
Table Read Operations ....................................................................................................... 246
Other Operations................................................................................................................. 246
Instruction Set Summary ............................................................................ 247
Table Conventions............................................................................................................... 247
Instruction Denition................................................................................... 249

Rev. 2.10 6 July 02, 2014 Rev. 2.10 7 July 02, 2014
HT68F20/HT68F30/HT68F40/HT68F50/HT68F60
HT68FU30/HT68FU40/HT68FU50/HT68FU60
Enhanced I/O Flash Type 8-Bit MCU with EEPROM
HT68F20/HT68F30/HT68F40/HT68F50/HT68F60
HT68FU30/HT68FU40/HT68FU50/HT68FU60
Enhanced I/O Flash Type 8-Bit MCU with EEPROM
Package Information ................................................................................... 258
16-pin DIP (300mil) Outline Dimensions ............................................................................. 259
16-pin NSOP (150mil) Outline Dimensions......................................................................... 261
16-pin SSOP (150mil) Outline Dimensions ......................................................................... 262
20-pin DIP (300mil) Outline Dimensions ............................................................................. 263
20-pin SOP (300mil) Outline Dimensions ........................................................................... 265
20-pin SSOP (150mil) Outline Dimensions ......................................................................... 266
24-pin SKDIP (300mil) Outline Dimensions ........................................................................ 267
24-pin SOP (300mil) Outline Dimensions ........................................................................... 269
24-pin SSOP (150mil) Outline Dimensions ......................................................................... 270
28-pin SKDIP (300mil) Outline Dimensions ........................................................................ 271
28-pin SOP (300mil) Outline Dimensions ........................................................................... 272
28-pin SSOP (150mil) Outline Dimensions ......................................................................... 273
SAW Type 32-pin (5mm×5mm) QFN Outline Dimensions .................................................. 274
SAW Type 40-pin (6mm×6mm for 0.75mm) QFN Outline Dimensions............................... 275
44-pin LQFP (10mm×10mm) (FP 2.0mm) Outline Dimensions .......................................... 276
48-pin SSOP (300mil) Outline Dimensions ......................................................................... 277
SAW Type 48-pin (7mm×7mm) QFN Outline Dimensions .................................................. 278
48-pin LQFP (7mm×7mm) Outline Dimensions .................................................................. 279

Rev. 2.10 8 July 02, 2014 Rev. 2.10 9 July 02, 2014
HT68F20/HT68F30/HT68F40/HT68F50/HT68F60
HT68FU30/HT68FU40/HT68FU50/HT68FU60
Enhanced I/O Flash Type 8-Bit MCU with EEPROM
HT68F20/HT68F30/HT68F40/HT68F50/HT68F60
HT68FU30/HT68FU40/HT68FU50/HT68FU60
Enhanced I/O Flash Type 8-Bit MCU with EEPROM
Features
CPU Features
• OperatingVoltage:
♦fSYS=8MHz:2.2V~5.5V
♦fSYS=12MHz:2.7V~5.5V
♦fSYS=20MHz:4.5V~5.5V
• Upto0.2μsinstructioncyclewith20MHzsystemclockatVDD=5V
• Powerdownandwake-upfunctionstoreducepowerconsumption
• Fiveoscillators:
♦ExternalCrystal--HXT
♦External32.768kHzCrystal--LXT
♦ExternalRC--ERC
♦InternalRC--HIRC
♦Internal32kHzRC--LIRC
• Multi-modeoperation:NORMAL,SLOW,IDLEandSLEEP
• Fullyintegratedinternal4MHz,8MHzand12MHzoscillatorrequiresnoexternalcomponents
• Allinstructionsexecutedinoneortwoinstructioncycles
• Tablereadinstructions
• 63powerfulinstructions
• Upto12-levelsubroutinenesting
• Bitmanipulationinstruction

Rev. 2.10 8 July 02, 2014 Rev. 2.10 9 July 02, 2014
HT68F20/HT68F30/HT68F40/HT68F50/HT68F60
HT68FU30/HT68FU40/HT68FU50/HT68FU60
Enhanced I/O Flash Type 8-Bit MCU with EEPROM
HT68F20/HT68F30/HT68F40/HT68F50/HT68F60
HT68FU30/HT68FU40/HT68FU50/HT68FU60
Enhanced I/O Flash Type 8-Bit MCU with EEPROM
Peripheral Features
• FlashProgramMemory:1K×14~12K×16
• RAMDataMemory:64×8~576×8
•True EEPROMMemory:32×8~256×8
• WatchdogTimerfunction
• Upto50bidirectionalI/Olines
• Softwarecontrolled4-SCOMlinesLCDdriverwith1/2bias
• Multiplepin-sharedexternalinterrupts
• MultipleTimerModulefortimemeasure,inputcapture,comparematchoutput,PWMoutputor
singlepulseoutputfunction
• SerialInterfacesModule–SIMforSPIorI2C
•DualComparatorfunctions
• DualTime-Basefunctionsforgenerationofxedtimeinterruptsignals
• Lowvoltageresetfunction
• Lowvoltagedetectfunction
• Optionalperipheral--UARTmoduleforfullyduplexasynchronouscommunication
• Widerangeofavailablepackagetypes
• Flashprogrammemorycanbere-programmedupto100,000times
• Flashprogrammemorydataretention>10years
• EEPROMdatamemorycanbere-programmedupto1,000,000times
• EEPROMdatamemorydataretention>10years

Rev. 2.10 10 July 02, 2014 Rev. 2.10 11 July 02, 2014
HT68F20/HT68F30/HT68F40/HT68F50/HT68F60
HT68FU30/HT68FU40/HT68FU50/HT68FU60
Enhanced I/O Flash Type 8-Bit MCU with EEPROM
HT68F20/HT68F30/HT68F40/HT68F50/HT68F60
HT68FU30/HT68FU40/HT68FU50/HT68FU60
Enhanced I/O Flash Type 8-Bit MCU with EEPROM
General Description
TheHT68FXXseriesofdevicesareFlashMemoryI/Otype8-bithighperformanceRISC
architecturemicrocontrollers.OfferinguserstheconvenienceofFlashMemorymulti-programming
features,thesedevicesalsoincludeawiderangeoffunctionsandfeatures.Othermemoryincludes
an area of RAM Data Memory as well as an area of true EEPROM memory for storage of non-
volatile data such as serial numbers, calibration data etc. Multiple and extremely flexible Timer
Modules provide timing, pulse generation and PWM generation functions. Analog features
include dual comparator functions. Communication with the outside world is catered for by
including fully integrated SPI or I2C interface functions, two popular interfaces which provide
designers with a means of easy communication with external peripheral hardware. Protective
features such as an internal Watchdog Timer, Low Voltage Reset and Low Voltage Detector
coupled with excellent noise immunity and ESD protection ensure that reliable operation is
maintainedinhostileelectricalenvironments.
AfullchoiceofHXT,LXT,ERC,HIRCandLIRCoscillatorfunctionsareprovidedincludinga
fullyintegratedsystemoscillatorwhichrequiresnoexternalcomponentsforitsimplementation.
Theabilitytooperateandswitchdynamicallybetweenarangeofoperatingmodesusingdifferent
clocksourcesgivesuserstheabilitytooptimisemicrocontrolleroperationandminimisepower
consumption.
TheUARTmoduleiscontainedintheHT68FUx0seriesofdevices.Itcansupporttheapplications
suchasdatacommunicationnetworksbetweenmicrocontrollers,low-costdatalinksbetweenPCs
andperipheraldevices,portableandbatteryoperateddevicecommunication,etc.
TheinclusionofexibleI/Oprogrammingfeatures,Time-Basefunctionsalongwithmanyother
featuresensurethatthedeviceswillndexcellentuseinapplicationssuchaselectronicmetering,
environmentalmonitoring,handheldinstruments,householdappliances,electronicallycontrolled
tools,motordrivinginadditiontomanyothers.

Rev. 2.10 10 July 02, 2014 Rev. 2.10 11 July 02, 2014
HT68F20/HT68F30/HT68F40/HT68F50/HT68F60
HT68FU30/HT68FU40/HT68FU50/HT68FU60
Enhanced I/O Flash Type 8-Bit MCU with EEPROM
HT68F20/HT68F30/HT68F40/HT68F50/HT68F60
HT68FU30/HT68FU40/HT68FU50/HT68FU60
Enhanced I/O Flash Type 8-Bit MCU with EEPROM
Selection Table
Mostfeaturesarecommontoalldevices,themainfeaturedistinguishingthemareMemorycapacity,
I/Ocount,TMfeatures,stackcapacityandpackagetypes.Thefollowingtablesummarisesthemain
featuresofeachdevice.
Part No. VDD
Program
Memory
Data
Memory
Data
EEPROM
I/O Ext.
Int. TM Module Interface
(SPI/I2C)
UART Stack
Package
HT68F20 2.2V~5.5V 1K×14 64×8 32×8 18 2 10-bit CTM×1
10-bit STM×1 √— 4 16DIP/NSOP/SSOP
20DIP/SOP/SSOP
HT68F30 2.2V~5.5V 2K×14 96×8 64×8 22 210-bit CTM×1
10-bit ETM×1 √—4
16DIP/NSOP/SSOP
20DIP/SOP/SSOP
24SKDIP/SOP/SSOP
HT68FU30
14 √24SKDIP/SOP
HT68F40
2.2V~5.5V 4K×15 192×8 128×8
42
2
10-bit CTM×1
10-bit ETM×1
16-bit STM×1
√
—
8
24/28SKDIP/SOP/SSOP
44LQFP, 32/40QFN
48SSOP/QFN
HT68FU40
34 √40QFN, 44LQFP,
48SSOP/QFN
HT68F50 2.2V~5.5V 8K×16 384×8 256×8 42 2
10-bit CTM×2
10-bit ETM×1
16-bit STM×1
√—8
28SKDIP/SOP/SSOP
44LQFP, 40QFN
48SSOP/QFN
HT68FU50
34 √44LQFP, 48QFN
HT68F60
2.2V~5.5V 12K×16 576×8 256×8
50
4
10-bit CTM×2
10-bit ETM×1
16-bit STM×1
√
—
12
40QFN, 44LQFP
48SSOP/LQFP/QFN
HT68FU60
42 √40QFN, 44LQFP
48LQFP/QFN
Note:Asdevicesexistinmorethanonepackageformat,thetablereectsthesituationforthepackagewiththe
mostpins.
ThereisanadditionalperipheralknownastheUARTmoduleinHT68FU30,HT68FU40,HT68FU50and
HT68FU60devices.AllinformationrelatedtotheUARTModulewillbedescribedinthefollowingUART
Modulesection.

Rev. 2.10 12 July 02, 2014 Rev. 2.10 13 July 02, 2014
HT68F20/HT68F30/HT68F40/HT68F50/HT68F60
HT68FU30/HT68FU40/HT68FU50/HT68FU60
Enhanced I/O Flash Type 8-Bit MCU with EEPROM
HT68F20/HT68F30/HT68F40/HT68F50/HT68F60
HT68FU30/HT68FU40/HT68FU50/HT68FU60
Enhanced I/O Flash Type 8-Bit MCU with EEPROM
Block Diagram

Rev. 2.10 12 July 02, 2014 Rev. 2.10 13 July 02, 2014
HT68F20/HT68F30/HT68F40/HT68F50/HT68F60
HT68FU30/HT68FU40/HT68FU50/HT68FU60
Enhanced I/O Flash Type 8-Bit MCU with EEPROM
HT68F20/HT68F30/HT68F40/HT68F50/HT68F60
HT68FU30/HT68FU40/HT68FU50/HT68FU60
Enhanced I/O Flash Type 8-Bit MCU with EEPROM
Pin Assignment
Note:1.Bracketedpinnamesindicatenon-defaultpinoutremappinglocations.
2.Ifthepin-sharedpinfunctionshavemultipleoutputssimultaneously,itspinnamesattherightsideofthe
"/"signcanbeusedforhigherpriority.

Rev. 2.10 14 July 02, 2014 Rev. 2.10 15 July 02, 2014
HT68F20/HT68F30/HT68F40/HT68F50/HT68F60
HT68FU30/HT68FU40/HT68FU50/HT68FU60
Enhanced I/O Flash Type 8-Bit MCU with EEPROM
HT68F20/HT68F30/HT68F40/HT68F50/HT68F60
HT68FU30/HT68FU40/HT68FU50/HT68FU60
Enhanced I/O Flash Type 8-Bit MCU with EEPROM
Note:1.Bracketedpinnamesindicatenon-defaultpinoutremappinglocations.
2.Ifthepin-sharedpinfunctionshavemultipleoutputssimultaneously,itspinnamesattherightsideofthe
"/"signcanbeusedforhigherpriority.

Rev. 2.10 14 July 02, 2014 Rev. 2.10 15 July 02, 2014
HT68F20/HT68F30/HT68F40/HT68F50/HT68F60
HT68FU30/HT68FU40/HT68FU50/HT68FU60
Enhanced I/O Flash Type 8-Bit MCU with EEPROM
HT68F20/HT68F30/HT68F40/HT68F50/HT68F60
HT68FU30/HT68FU40/HT68FU50/HT68FU60
Enhanced I/O Flash Type 8-Bit MCU with EEPROM
Note:1.Bracketedpinnamesindicatenon-defaultpinoutremappinglocations.
2.Ifthepin-sharedpinfunctionshavemultipleoutputssimultaneously,itspinnamesattherightsideofthe
"/"signcanbeusedforhigherpriority.

Rev. 2.10 16 July 02, 2014 Rev. 2.10 17 July 02, 2014
HT68F20/HT68F30/HT68F40/HT68F50/HT68F60
HT68FU30/HT68FU40/HT68FU50/HT68FU60
Enhanced I/O Flash Type 8-Bit MCU with EEPROM
HT68F20/HT68F30/HT68F40/HT68F50/HT68F60
HT68FU30/HT68FU40/HT68FU50/HT68FU60
Enhanced I/O Flash Type 8-Bit MCU with EEPROM
Note:1.Bracketedpinnamesindicatenon-defaultpinoutremappinglocations.
2.Ifthepin-sharedpinfunctionshavemultipleoutputssimultaneously,itspinnamesattherightsideofthe
"/"signcanbeusedforhigherpriority.

Rev. 2.10 16 July 02, 2014 Rev. 2.10 17 July 02, 2014
HT68F20/HT68F30/HT68F40/HT68F50/HT68F60
HT68FU30/HT68FU40/HT68FU50/HT68FU60
Enhanced I/O Flash Type 8-Bit MCU with EEPROM
HT68F20/HT68F30/HT68F40/HT68F50/HT68F60
HT68FU30/HT68FU40/HT68FU50/HT68FU60
Enhanced I/O Flash Type 8-Bit MCU with EEPROM
Pin Description
Withtheexceptionofthepowerpins,allpinsonthesedevicescanbereferencedbytheirPortname,
e.g.PA.0,PA.1etc,whichrefertothedigitalI/Ofunctionofthepins.HoweverthesePortpinsare
alsosharedwithotherfunctionsuchastheSerialPortpinsetc.Thefunctionofeachpinislisted
inthefollowingtable,howeverthedetailsbehindhoweachpiniscongurediscontainedinother
sectionsofthedatasheet.
ThefollowingtablesonlyincludethepinswhicharedirectlyrelatedtotheMCU.Thepin
descriptionsoftheadditionalperipheralfunctionsarelocatedattheendofthedatasheetalongwith
therelevantperipheralfunctionfunctionaldescription.
HT68F20
Pin Name Function OP I/T O/T Pin-Shared Mapping
PA0~PA7 Port A PAWU
PAPU ST CMOS —
PB0~PB5 Port B PBPU ST CMOS —
PC0~PC3 Port C PCPU ST CMOS —
C0-, C1- Comparator 0, 1 input
CP0C
CP1C
AN — PA3, PC3
C0+, C1+ Comparator 0, 1 input AN — PA2, PC2
C0X, C1X Comparator 0, 1 output — CMOS PA0, PA5
TCK0, TCK1 TM0, TM1 input — ST — PA2, PA4
TP0_0 TM0 I/O TMPC0 ST CMOS PA0
TP1_0, TP1_1 TM1 I/O TMPC0 ST CMOS PA1, PC0
INT0, INT1 Ext. Interrupt 0, 1 — ST — PA3, PA4
PINT Peripheral Interrupt — ST — PC3
PCK Peripheral Clock output — — CMOS PC2
SDI SPI Data input — ST — PA6
SDO SPI Data output — — CMOS PA5
SCS SPI Slave Select — ST CMOS PB5
SCK SPI Serial Clock — ST CMOS PA7
SCL I2C Clock — ST NMOS PA7
SDA I2C Data — ST NMOS PA6
SCOM0~SCOM3 SCOM0~SCOM3 SCOMC — SCOM PC0, PC1, PC2, PC3
OSC1 HXT/ERC pin CO HXT — PB1
OSC2 HXT pin CO — HXT PB2
XT1 LXT pin CO LXT — PB3
XT2 LXT pin CO — LXT PB4
RES Reset input CO ST — PB0
VDD Power supply — PWR — —
VSS Ground — PWR — —
Note:I/T:Inputtype; O/T:Outputtype
OP:Optionalbycongurationoption(CO)orregisteroption
PWR:Power; CO:Congurationoption; ST:SchmittTriggerinput
CMOS:CMOSoutput; NMOS:NMOSoutput
SCOM:SoftwarecontrolledLCDCOM; AN:Analoginputpin
HXT:Highfrequencycrystaloscillator
LXT:Lowfrequencycrystaloscillator
AsthePinDescriptionSummarytableappliestothepackagetypewiththemostpins,notalloftheabove
listedpinsmaybepresentonpackagetypeswithsmallernumbersofpins.

Rev. 2.10 18 July 02, 2014 Rev. 2.10 19 July 02, 2014
HT68F20/HT68F30/HT68F40/HT68F50/HT68F60
HT68FU30/HT68FU40/HT68FU50/HT68FU60
Enhanced I/O Flash Type 8-Bit MCU with EEPROM
HT68F20/HT68F30/HT68F40/HT68F50/HT68F60
HT68FU30/HT68FU40/HT68FU50/HT68FU60
Enhanced I/O Flash Type 8-Bit MCU with EEPROM
HT68F30
Pin Name Function OP I/T O/T Pin-Shared Mapping
PA0~PA7 Port A PAWU
PAPU ST CMOS —
PB0~PB5 Port B PBPU ST CMOS —
PC0~PC7 Port C PCPU ST CMOS —
C0-, C1- Comparator 0, 1 input
CP0C
CP1C
AN — PA3, PC3
C0+, C1+ Comparator 0, 1 input AN — PA2, PC2
C0X, C1X Comparator 0, 1 output — CMOS PA0, PA5
TCK0, TCK1 TM0, TM1 input — ST — PA2, PA4
TP0_0, TP0_1 TM0 I/O TMPC0 ST CMOS PA0, PC5
TP1A TM1 I/O TMPC0 ST CMOS PA1
TP1B_0, TP1B_1 TM1 I/O TMPC0 ST CMOS PC0, PC1
INT0, INT1 Ext. Interrupt 0, 1 — ST — PA3, PA4
PINT Peripheral Interrupt PRM0 ST — PC3 or PC4
PCK Peripheral Clock output PRM0 — CMOS PC2 or PC5
SDI SPI Data input PRM0 ST — PA6 or PC0
SDO SPI Data output PRM0 — CMOS PA5 or PC1
SCS SPI Slave Select PRM0 ST CMOS PB5 or PC6
SCK SPI Serial Clock PRM0 ST CMOS PA7 or PC7
SCL I2C Clock PRM0 ST NMOS PA7 or PC7
SDA I2C Data PRM0 ST NMOS PA6 or PC0
SCOM0~SCOM3 SCOM0~SCOM3 SCOMC — SCOM PC0, PC1, PC6, PC7
OSC1 HXT/ERC pin CO HXT — PB1
OSC2 HXT pin CO — HXT PB2
XT1 LXT pin CO LXT — PB3
XT2 LXT pin CO — LXT PB4
RES Reset input CO ST — PB0
VDD Power supply — PWR — —
VSS Ground — PWR — —
Note:I/T:Inputtype; O/T:Outputtype
OP:Optionalbycongurationoption(CO)orregisteroption
PWR:Power; CO:Congurationoption; ST:SchmittTriggerinput
CMOS:CMOSoutput; NMOS:NMOSoutput
SCOM:SoftwarecontrolledLCDCOM; AN:Analoginputpin
HXT:Highfrequencycrystaloscillator
LXT:Lowfrequencycrystaloscillator
AsthePinDescriptionSummarytableappliestothepackagetypewiththemostpins,notalloftheabove
listedpinsmaybepresentonpackagetypeswithsmallernumbersofpins.

Rev. 2.10 18 July 02, 2014 Rev. 2.10 19 July 02, 2014
HT68F20/HT68F30/HT68F40/HT68F50/HT68F60
HT68FU30/HT68FU40/HT68FU50/HT68FU60
Enhanced I/O Flash Type 8-Bit MCU with EEPROM
HT68F20/HT68F30/HT68F40/HT68F50/HT68F60
HT68FU30/HT68FU40/HT68FU50/HT68FU60
Enhanced I/O Flash Type 8-Bit MCU with EEPROM
HT68F40
Pin Name Function OP I/T O/T Pin-Shared Mapping
PA0~PA7 Port A PAWU
PAPU ST CMOS —
PB0~PB7 Port B PBPU ST CMOS —
PC0~PC7 Port C PCPU ST CMOS —
PD0~PD7 Port D PDPU ST CMOS —
PE0~PE7 Port E PEPU ST CMOS —
PF0~PF1 Port F PFPU ST CMOS —
C0-, C1- Comparator 0, 1 input CP0C
CP1C AN — PA3, PC3
C0+, C1+ Comparator 0, 1 input CP0C
CP1C AN — PA2, PC2
C0X,C1X Comparator 0, 1 output
CP0C
CP1C
PRM0
— CMOS PA0, PA5 or PF0, PF1
TCK0~TCK2 TM0~TM2 input PRM1 ST — PA2, PA4, PC2 or PD2, PD3, PD0
TP0_0, TP0_1 TM0 I/O TMPC0
PRM2 ST CMOS PA0, PC5 or PC6, PD5
TP1A TM1 I/O TMPC0
PRM2 ST CMOS PA1 or PC7
TP1B_0~TP1B_2 TM1 I/O TMPC0
PRM2 ST CMOS PC0, PC1, PC5 or -, -, PE4
TP2_0, TP2_1 TM2 I/O TMPC1
PRM2 ST CMOS PC3, PC4 or PD1, PD4
INT0, INT1 Ext. Interrupt 0, 1 PRM1 ST — PA3, PA4 or PC4, PC5 or PE6, PE7
PINT Peripheral Interrupt PRM0 ST — PC3 or PC4
PCK Peripheral Clock output PRM0 — CMOS PC2 or PC5
SDI SPI Data input PRM0 ST — PA6 or PD2 or PB7
SDO SPI Data output PRM0 — CMOS PA5 or PD3 or PB6
SCS SPI Slave Select PRM0 ST CMOS PB5 or PD0 or PD7
SCK SPI Serial Clock PRM0 ST CMOS PA7 or PD1 or PD6
SCL I2C Clock PRM0 ST NMOS PA7 or PD1 or PD6
SDA I2C Data PRM0 ST NMOS PA6 or PD2 or PB7
SCOM0~SCOM3 SCOM0~SCOM3 SCOMC — SCOM PC0, PC1, PC6, PC7
OSC1 HXT/ERC pin CO HXT — PB1
OSC2 HXT pin CO — HXT PB2
XT1 LXT pin CO LXT — PB3
XT2 LXT pin CO — LXT PB4
RES Reset input CO ST — PB0
VDD Power supply — PWR — —
VSS Ground — PWR — —
Note:I/T:Inputtype; O/T:Outputtype
OP:Optionalbycongurationoption(CO)orregisteroption
PWR:Power; CO:Congurationoption; ST:SchmittTriggerinput
CMOS:CMOSoutput; NMOS:NMOSoutput
SCOM:SoftwarecontrolledLCDCOM; AN:Analoginputpin
HXT:Highfrequencycrystaloscillator
LXT:Lowfrequencycrystaloscillator
AsthePinDescriptionSummarytableappliestothepackagetypewiththemostpins,notalloftheabove
listedpinsmaybepresentonpackagetypeswithsmallernumbersofpins.

Rev. 2.10 20 July 02, 2014 Rev. 2.10 21 July 02, 2014
HT68F20/HT68F30/HT68F40/HT68F50/HT68F60
HT68FU30/HT68FU40/HT68FU50/HT68FU60
Enhanced I/O Flash Type 8-Bit MCU with EEPROM
HT68F20/HT68F30/HT68F40/HT68F50/HT68F60
HT68FU30/HT68FU40/HT68FU50/HT68FU60
Enhanced I/O Flash Type 8-Bit MCU with EEPROM
HT68F50
Pin Name Function OP I/T O/T Pin-Shared Mapping
PA0~PA7 Port A PAWU
PAPU ST CMOS —
PB0~PB7 Port B PBPU ST CMOS —
PC0~PC7 Port C PCPU ST CMOS —
PD0~PD7 Port D PDPU ST CMOS —
PE0~PE7 Port E PEPU ST CMOS —
PF0~PF1 Port F PFPU ST CMOS —
C0-, C1- Comparator 0, 1 input CP0C
CP1C AN — PA3, PC3
C0+, C1+ Comparator 0, 1 input CP0C
CP1C AN — PA2, PC2
C0X, C1X Comparator 0, 1 output
CP0C
CP1C
PRM0
— CMOS PA0, PA5 or PF0, PF1
TCK0~TCK3 TM0~TM3 input PRM1 ST — PA2, PA4, PC2, PC4 or PD2, PD3, PD0, -
TP0_0, TP0_1 TM0 I/O TMPC0
PRM2 ST CMOS PA0, PC5 or PC6, PD5
TP1A TM1 I/O TMPC0
PRM2 ST CMOS PA1 or PC7
TP1B_0~TP1B_2 TM1 I/O TMPC0
PRM2 ST CMOS PC0, PC1, PC5 or -, -, PE4
TP2_0, TP2_1 TM2 I/O TMPC1
PRM2 ST CMOS PC3, PC4 or PD1, PD4
TP3_0, TP3_1 TM3 I/O TMPC1
PRM2 ST CMOS PD3, PD0 or PE5, PE3
INT0, INT1 Ext. Interrupt 0, 1 PRM1 ST — PA3, PA4 or PC4, PC5 or PE6, PE7
PINT Peripheral Interrupt PRM0 ST — PC3 or PC4
PCK Peripheral Clock output PRM0 — CMOS PC2 or PC5
SDI SPI Data input PRM0 ST — PA6 or PD2 or PB7
SDO SPI Data output PRM0 — CMOS PA5 or PD3 or PB6
SCS SPI Slave Select PRM0 ST CMOS PB5 or PD0 or PD7
SCK SPI Serial Clock PRM0 ST CMOS PA7 or PD1 or PD6
SCL I2C Clock PRM0 ST NMOS PA7 or PD1 or PD6
SDA I2C Data PRM0 ST NMOS PA6 or PD2 or PB7
SCOM0~SCOM3 SCOM0~SCOM3 SCOMC — SCOM PC0, PC1, PC6, PC7
OSC1 HXT/ERC pin CO HXT — PB1
OSC2 HXT pin CO — HXT PB2
XT1 LXT pin CO LXT — PB3
XT2 LXT pin CO — LXT PB4
RES Reset input CO ST — PB0
VDD Power supply — PWR — —
VSS Ground — PWR — —
Note:I/T:Inputtype; O/T:Outputtype; ST:SchmittTriggerinput
OP:Optionalbycongurationoption(CO)orregisteroption
PWR:Power; CO:Congurationoption;
CMOS:CMOSoutput; NMOS:NMOSoutput
SCOM:SoftwarecontrolledLCDCOM; AN:Analoginputpin
HXT:Highfrequencycrystaloscillator; LXT:Lowfrequencycrystaloscillator
AsthePinDescriptionSummarytableappliestothepackagetypewiththemostpins,notalloftheabove
listedpinsmaybepresentonpackagetypeswithsmallernumbersofpins.
This manual suits for next models
9
Table of contents
Other Holtek I/O System manuals
Popular I/O System manuals by other brands

System Sensor
System Sensor M201E installation instructions

M-system
M-system R7E-PA8 instruction manual

Solid State Logic
Solid State Logic Multichannel Digital Audio Interface... reference guide

Rice Lake
Rice Lake I/O Module installation manual

NI
NI R Series Getting started guide

Allen-Bradley
Allen-Bradley 1738-IR2M12 User information

Unitronics
Unitronics Uni-I/O UIA-0006 user guide

Mitsubishi
Mitsubishi A8GT-50KBF user manual

CREVIS
CREVIS FnIO S Series NA-9171 quick guide

ELPRO
ELPRO 905U-L installation manual

Siemens
Siemens Simatic 6DL2804-1 Series Hardware installation manual

National Instruments
National Instruments 9215E Operating instructions and specifications