HT83F10 HOLTEK [Holtek Semiconductor Inc], HT83F10 Datasheet
HT83F10
Related parts for HT83F10
HT83F10 Summary of contents
Page 1
... DAC outputs and voltage type PWM outputs. Rev. 1.00 Flash Type Voice OTP MCU 4-level subroutine nesting 2.7V Low voltage detection, tolerance 5% Integrated LDO regulator in HT83F10P/20P/40P/60P/80P Power-down function and wake-up feature reduce power consumption (0.5 s) instruction cycle with 4MHz (8MHz) system clock 3.6V ...
Page 2
... The devices include a comprehensive range of features, with most features common to all devices. The main features distinguishing them are Flash Voice Memory capacity. The functional differences between the devices are shown in the following table. OTP Part No. VDD VIN Program Memory HT83F10 2.7V~3. HT83F10P 3.3V 3.6V~24V HT83F20 2.7V~3. HT83F20P 3.3V 3.6V~24V HT83F40 2.7V~3. HT83F40P 3 ...
Page 3
Pin Assignment Pin Description Pin Name I/O Options Bidirectional 8-bit I/O port, Each bit can be configured as a wake-up input by Wake-up, configuration option. Software instructions determine if the pin is a CMOS out- PA0~PA7 I/O Pull-high put or ...
Page 4
Pin Name I/O Options VDD_PBIO PB I/O external positive power supply (determine by option) LDO_OUT O LDO output LDO_IN I LDO input CS I Flash data memory chip select pin SI I Flash data memory data input pin SO O ...
Page 5
Symbol Parameter I LDO Output Current LDO I I/O Port Sink Current OL1 I I/O Port Source Current OH1 I PWM1/PWM2 Sink Current OL2 I PWM1/PWM2 Sink Current OH2 I AUD Source Current AUD R Pull-high Resistance PH A.C. Characteristics ...
Page 6
T vs. F Chart Characteristics Curves V vs. F Chart Characteristics Curves Rev. 1.00 3.0V 6 HT83FXX May 12, 2009 ...
Page 7
System Architecture A key factor in the high-performance features of the Holtek range of Voice microcontrollers is attributed to the internal system architecture. The range of devices take advantage of the usual features found within RISC microcontrollers providing increased speed ...
Page 8
Program Counter During program execution, the Program Counter is used to keep track of the address of the next instruction to be executed automatically incremented by one each time an instruction is executed except for instructions, such as ...
Page 9
However, when the stack is full, a CALL subroutine in- struction can still be executed which will result in a stack overflow. Precautions should be taken to avoid such cases which might cause unpredictable program branching. Arithmetic and Logic Unit ...
Page 10
... TBLH : : org 700h ; sets initial address of HT83F10/20/40/60/80 last page dc 00Ah, 00Bh, 00Ch, 00Dh, 00Eh, 00Fh, 01Ah, 01Bh : : Rev. 1.00 The following diagram illustrates the addressing/data flow of the look-up table ...
Page 11
Because the TBLH register is a read-only register and cannot 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 ...
Page 12
Special Function Registers To ensure successful operation of the microcontroller, certain internal registers are implemented in the RAM Data Memory area. These registers ensure correct op- eration of internal functions such as timers, interrupts, watchdog, etc., as well as external ...
Page 13
The following example shows how to clear a section of four RAM locations already defined as locations adres1 to adres4. data .section data adres1 db ? adres2 db ? adres3 db ? adres4 db ? block db ? code .section ...
Page 14
CLR WDT or HALT in- struction. The PDF flag is affected only by executing the HALT or CLR WDT instruction or during a system power-up. The Z, OV, AC and C flags generally reflect the ...
Page 15
Voice Control and Audio output Registers - DAL, DAH, VOL The devices include a single 12-bit current type DAC function for driving an external 8 speaker through an external NPN transistor or Power Amplifier. The pro- grammer must writer the ...
Page 16
Rev. 1.00 Read Data Byte Timing Page Program Timing Earse All Timing 16 HT83FXX May 12, 2009 ...
Page 17
WRITE The WRITE instruction is used to write a page byte of data into the Flash Data Memory. To instigate a WRITE instruction, the CS bit should be set low, then the in- struction code 02 , all transmitted via ...
Page 18
Input/Output Ports Holtek microcontrollers offer considerable flexibility on their I/O ports. With the input or output designation of ev- ery pin fully under user program control, pull-high op- tions for all ports and wake-up options on certain pins, the user ...
Page 19
Programming Considerations Within the user program, one of the first things to con- sider is port initialization. After a reset, all of the I/O data and port control registers will be set high. This means that all I/O pins will ...
Page 20
Timers The provision of timers form an important part of any microcontroller, giving the designer a means of carrying out time related functions. These devices contain two count up timers of 8-bit capacity. The provision of an in- ternal prescaler ...
Page 21
The interrupt can be disabled by ensuring that the Timer Interrupt Enable bit in the Inter- rupt Control Register, INTC, is reset to zero. Prescaler All of the ...
Page 22
Timer Program Example The following example program section is based on the HT83F60 device, which contain two 8-bit timers. Programming the timer for other devices is conducted in a very similar way. The program shows how the timer registers are ...
Page 23
Time Base The Time Base function will generate a regular interrupt signal synchronised to the system clock which can be used by the application as a time base signal. Time Base Operation The Time Base operation is a very simple ...
Page 24
Serial Interface 2 The device contains both SPI and I C serial interface functions, which allows two methods of easy communi- cation with external peripheral hardware. As the SPI and function share the same external pins and ...
Page 25
Master (SIMEN=1) Master/Salve (SIMEN=0) CSEN=1 SCS Z L SDO Z O SDI L(CPOL=1) SCK Z H(CPOL=0) Z floating, H output high, L output low, I Input, O output level, I,Z input floating (no pull-high) SPI Registers The ...
Page 26
Rev. 1.00 SPI Interface Timing SPI Control Register - SIMC0 SPI Control Register - SIMC2 26 HT83FXX May 12, 2009 ...
Page 27
Rev. 1.00 SPI Transfer Control Flowchart 27 HT83FXX May 12, 2009 ...
Page 28
I C Interface 2 The I C bus is a bidirectional 2-line communication inter- face originally developed by Philips. The possibility of transmitting and receiving data on only 2 lines offers many new application possibilities for microcontroller based applications. ...
Page 29
The following gives further explanation of each bit: SIMEN 2 The SIMEN bit determines if the I C bus is enabled or disabled. If data transferred or received 2 on the I C bus then this bit ...
Page 30
I C Bus Communication 2 Communication on the I C bus requires four separate steps, a START signal, a slave device address transmis- sion, a data transmission and finally a STOP signal. When a START signal is placed on ...
Page 31
I SRW Bit The SRW bit in the SIMC1 register defines whether the microcontroller slave device wishes to read data 2 from the I C bus or write data to the I microcontroller should examine this bit to determine ...
Page 32
Rev. 1. Bus ISR Flow Chart Bus Initialisation Flow Chart 32 HT83FXX May 12, 2009 ...
Page 33
Interrupts Interrupts are an important part of any microcontroller system. When an internal function such as a Time Base or Timer requires microcontroller attention, their corre- sponding interrupt will enforce a temporary suspension of the main program allowing the microcontroller ...
Page 34
Interrupt Priority Interrupts, occurring in the interval between the rising edges of two consecutive T2 pulses, will be serviced on the latter of the two T2 pulses, if the corresponding inter- rupts are enabled. In case of simultaneous requests, the ...
Page 35
Timer Interrupt For a timer generated interrupt to occur, the correspond- ing timer interrupt enable bit must be first set. Each de- vice contains two 8-bit timers whose corresponding interrupt enable bits are known as ET0 and ET1and are located ...
Page 36
Reset and Initialisation A reset function is a fundamental part of any microcontroller ensuring that the device can be set to some predetermined condition irrespective of outside parameters. The most important reset condition is after power is first applied to ...
Page 37
Watchdog Time-out Reset during Normal Operation The Watchdog time-out Reset during normal opera- tion is the same as a hardware RES pin reset except that the Watchdog time-out flag TO will be set WDT Time-out Reset during ...
Page 38
The different kinds of resets all affect the internal registers of the microcontroller in different ways. To ensure reliable continuation of normal program execution after a reset occurs important to know what condition the microcontroller is in after ...
Page 39
Oscillator Various oscillator options offer the user a wide range of functions according to their various application require- ments. Two types of system clocks can be selected while various clock source options for the Watchdog Timer are provided for maximum ...
Page 40
Power Down Mode and Wake-up Power Down Mode All of the Holtek microcontrollers have the ability to enter a Power Down Mode, also known as the HALT Mode or Sleep Mode. When the device enters this mode, the nor- mal ...
Page 41
Low Drop Output - LDO All device include a fully integrated LDO regulator which can be used to provide a fixed voltage for user applica- tions. The integrated LDO is a simple three terminal de- vice with an external input ...
Page 42
Voice Output The device contains an internal 12-bit DAC function which can be used for audio signal generation. Voice Control Two internal registers DAL and DAH contain the 12-bit digital value for conversion by the internal DAC. There is also ...
Page 43
Pulse Width Modulation Output All devices include a single 12-bit PWM function which can directly drive external audio components such as speakers. Pulse Width Modulator Operation The PWM output is provided on two complimentary out- puts on the PWM1 and ...
Page 44
Configuration Options Configuration options refer to certain options within the MCU that are programmed into the device during the program- ming process. During the development process, these options are selected using the HT-IDE software development tools. As these options are ...
Page 45
Application Circuits V =2.7V~3.6V DD Rev. 1.00 45 HT83FXX May 12, 2009 ...
Page 46
V =3.6V~24V IN Rev. 1.00 46 HT83FXX May 12, 2009 ...
Page 47
Instruction Set Introduction the succ essful o pera microcontroller is its instruction set, which is a set of pro- gram instruction codes that directs the microcontroller to ...
Page 48
Bit Operations The ability to provide single bit operations on Data Mem- ory is an extremely flexible feature of all Holtek microcontrollers. This feature is especially useful for output port bit programming where individual bits or port pins can be ...
Page 49
Mnemonic Rotate RRA [m] Rotate Data Memory right with result in ACC RR [m] Rotate Data Memory right RRCA [m] Rotate Data Memory right through Carry with result in ACC RRC [m] Rotate Data Memory right through Carry RLA [m] ...
Page 50
Instruction Definition ADC A,[m] Add Data Memory to ACC with Carry Description The contents of the specified Data Memory, Accumulator and the carry flag are added. The result is stored in the Accumulator. Operation ACC ACC + [ ...
Page 51
CALL addr Subroutine call Description Unconditionally calls a subroutine at the specified address. The Program Counter then in- crements obtain the address of the next instruction which is then pushed onto the stack. The specified address is ...
Page 52
CPL [m] Complement Data Memory Description Each bit of the specified Data Memory is logically complemented (1 s complement). Bits which previously contained a 1 are changed to 0 and vice versa. Operation [m] [m] Affected flag(s) Z CPLA [m] ...
Page 53
INC [m] Increment Data Memory Description Data in the specified Data Memory is incremented by 1. Operation [m] [ Affected flag(s) Z INCA [m] Increment Data Memory with result in ACC Description Data in the specified Data Memory ...
Page 54
OR A,x Logical OR immediate data to ACC Description Data in the Accumulator and the specified immediate data perform a bitwise logical OR op- eration. The result is stored in the Accumulator. Operation ACC ACC OR x Affected flag(s) Z ...
Page 55
RLC [m] Rotate Data Memory left through Carry Description The contents of the specified Data Memory and the carry flag are rotated left by 1 bit. Bit 7 replaces the Carry bit and the original carry flag is rotated into ...
Page 56
SBC A,[m] Subtract Data Memory from ACC with Carry Description The contents of the specified Data Memory and the complement of the carry flag are sub- tracted from the Accumulator. The result is stored in the Accumulator. Note that if ...
Page 57
SIZ [m] Skip if increment Data Memory is 0 Description The contents of the specified Data Memory are first incremented the result is 0, the following instruction is skipped. As this requires the insertion of a dummy ...
Page 58
SWAP [m] Swap nibbles of Data Memory Description The low-order and high-order nibbles of the specified Data Memory are interchanged. Operation [m].3~[m].0 Affected flag(s) None SWAPA [m] Swap nibbles of Data Memory with result in ACC Description The low-order and ...
Page 59
XOR A,[m] Logical XOR Data Memory to ACC Description Data in the Accumulator and the specified Data Memory perform a bitwise logical XOR op- eration. The result is stored in the Accumulator. Operation ACC ACC XOR [m] Affected flag(s) Z ...
Page 60
Package Information 44-pin QFP (10mm´10mm) Outline Dimensions Symbol Rev. 1.00 Dimensions in mm Min. Nom. 13.00 9.90 13.00 9.90 0.80 0.30 1.90 0.25 0.73 0.10 0. ...
Page 61
Holtek Semiconductor Inc. (Headquarters) No.3, Creation Rd. II, Science Park, Hsinchu, Taiwan Tel: 886-3-563-1999 Fax: 886-3-563-1189 http://www.holtek.com.tw Holtek Semiconductor Inc. (Taipei Sales Office) 4F-2, No. 3-2, YuanQu St., Nankang Software Park, Taipei 115, Taiwan Tel: 886-2-2655-7070 Fax: 886-2-2655-7373 Fax: 886-2-2655-7383 ...