Download Print this page

Holtek HT46R64 User Manual

A/d with lcd type 8-bit mcu
Hide thumbs Also See for HT46R64:

Advertisement

Quick Links

Features
·
Operating voltage:
f
=4MHz: 2.2V~5.5V
SYS
f
=8MHz: 3.3V~5.5V
SYS
·
24 bidirectional I/O lines
·
Two external interrupt input
·
One 8-bit and one 16-bit programmable timer/event
counter with PFD (programmable frequency divider)
function
·
LCD driver with 33´3 or 32´4 segments
(logical output option for SEG0~SEG15)
·
4K´15 program memory
·
192´8 data memory RAM
·
Supports PFD for sound generation
·
Real Time Clock (RTC)
·
8-bit prescaler for RTC
General Description
The HT46R64/HT46C64 are 8-bit, high performance,
RISC architecture microcontroller devices specifically
designed for A/D product applications that interface di-
rectly to analog signals and which require LCD Inter-
face. The mask version HT46C64 is fully pin and
functionally compatible with the OTP version HT46R64
device.
The advantages of low power consumption, I/O flexibil-
ity, timer functions, oscillator options, multi-channel A/D
Rev. 2.10
HT46R64/HT46C64
A/D with LCD Type 8-Bit MCU
·
Watchdog Timer
·
Buzzer output
·
On-chip crystal, RC and 32768Hz crystal oscillator
·
HALT function and wake-up feature reduce power
consumption
·
8-level subroutine nesting
·
8 channels 10-bit resolution A/D converter
·
4-channel 8-bit PWM output shared with 4 I/O lines
·
Bit manipulation instruction
·
16-bit table read instruction
·
Up to 0.5ms instruction cycle with 8MHz system clock
·
63 powerful instructions
·
All instructions in 1 or 2 machine cycles
·
Low voltage reset/detector function
·
52/100-pin LQFP packages
Converter, Pulse Width Modulation function, HALT and
wake-up functions, in addition to a flexible and
configurable LCD interface enhance the versatility of
these devices to control a wide range of applications re-
quiring analog signal processing and LCD interfacing,
such as electronic metering, environmental monitoring,
handheld measurement tools, motor driving, etc., for
both industrial and home appliance application areas.
1
June 6, 2014

Advertisement

loading
Need help?

Need help?

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

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Holtek HT46R64

  • Page 1 The mask version HT46C64 is fully pin and quiring analog signal processing and LCD interfacing, functionally compatible with the OTP version HT46R64 such as electronic metering, environmental monitoring, device.
  • Page 2: Block Diagram

    HT46R64/HT46C64 Block Diagram Rev. 2.10 June 6, 2014...
  • Page 3: Pin Assignment

    HT46R64/HT46C64 Pin Assignment H T 4 6 R 6 4 / H T 4 6 C 6 4 5 2 L Q F P - A H T 4 6 R 6 4 / H T 4 6 C 6 4 1 0 0 L Q F P - A Rev.
  • Page 4: Pin Description

    HT46R64/HT46C64 Pin Description Pin Name Options Description PA0/BZ Bidirectional 8-bit input/output port. Each bit can be configured as wake-up in- Wake-up PA1/BZ put by option. Software instructions determine the CMOS output or Schmitt Pull-high Trigger input with or without pull-high resistor (determined by pull-high op-...
  • Page 5 HT46R64/HT46C64 D.C. Characteristics Ta=25°C Test Conditions Symbol Parameter Min. Typ. Max. Unit Conditions ¾ ¾ =4MHz Operating Voltage ¾ ¾ =8MHz ¾ 3V No load, ADC Off, Operating Current =4MHz (Crystal OSC, RC OSC) ¾ Operating Current No load, ADC Off, ¾...
  • Page 6 HT46R64/HT46C64 Test Conditions Symbol Parameter Min. Typ. Max. Unit Conditions ¾ LCD Common and Segment =0.1V Current ¾ -160 ¾ LCD Common and Segment =0.9V Current -180 -360 ¾ ¾ Pull-high Resistance of I/O Ports and INT0, INT1 ¾ ¾...
  • Page 7: Functional Description

    HT46R64/HT46C64 Functional Description Execution Flow After accessing a program memory word to fetch an in- struction code, the value of the PC is incremented by 1. The system clock is derived from either a crystal or an The PC then points to the memory word containing the RC oscillator or a 32768Hz crystal oscillator.
  • Page 8 HT46R64/HT46C64 · Location 008H The lower byte of the PC (PCL) is a readable and Location 008H is reserved for the external interrupt writeable register (06H). Moving data into the PCL per- service program also. If the INT1 input pin is activated, forms a short jump.
  • Page 9 HT46R64/HT46C64 Stack Register - STACK The stack register is a special part of the memory used to save the contents of the program counter. The stack is organized into 8 levels and is neither part of the data nor part of the program, and is neither readable nor writeable.
  • Page 10 HT46R64/HT46C64 Status Register - STATUS Indirect Addressing Register Location 00H and 02H are indirect addressing registers The status register (0AH) is 8 bits wide and contains, a that are not physically implemented. Any read/write op- carry flag (C), an auxiliary carry flag (AC), a zero flag (Z),...
  • Page 11 HT46R64/HT46C64 Once an interrupt subroutine is serviced, other inter- call to location 04H or 08H occurs. The interrupt request rupts are all blocked (by clearing the EMI bit). This flag (EIF0 or EIF1) and EMI bits are all cleared to disable scheme may prevent any further interrupt nesting.
  • Page 12 HT46R64/HT46C64 During the execution of an interrupt subroutine, other It is recommended that a program should not use the ²CALL subroutine² within the interrupt subroutine. It¢s be- maskable interrupt acknowledgments are all held until the ²RETI² instruction is executed or the EMI bit and the...
  • Page 13 (system clock/4) or a real time clock oscillator (RTC os- Multi-function Timer cillator). The timer is designed to prevent a software The HT46R64/HT46C64 provides a multi-function timer malfunction or sequence from jumping to an unknown for the WDT, time base and RTC but with different location with unpredictable results.
  • Page 14 HT46R64/HT46C64 Time Base · Real Time Clock - RTC The PDF flag is set but the TO flag is cleared. · LCD driver is still running (if the WDT OSC or RTC The real time clock (RTC) is operated in the same man- OSC is selected).
  • Page 15 HT46R64/HT46C64 To minimize power consumption, all the I/O pins should be carefully managed before entering the HALT status. Reset There are three ways in which reset may occur. · RES is reset during normal operation · RES is reset during HALT ·...
  • Page 16 HT46R64/HT46C64 The register states are summarized below: Reset WDT Time-out RES Reset RES Reset WDT Time-out Register (Power On) (Normal Operation) (Normal Operation) (HALT) (HALT)* TMR0 xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx uuuu uuuu TMR0C 00-0 1000 00-0 1000...
  • Page 17 HT46R64/HT46C64 Timer/Event Counter internal lower-order byte buffer (8-bit) and writing TMR1H will transfer the specified data and the contents Two timer/event counters (TMR0,TMR1) are imple- of the lower-order byte buffer to TMR1H and TMR1L mented in the microcontroller. The Timer/Event Counter registers, respectively.
  • Page 18 HT46R64/HT46C64 In the event count or timer mode, the timer/event coun- sult remains in the timer/event counter even if the ter 0(1) starts counting at the current contents in the activated transient occurs again. In other words, only timer/event counter 0(1) and ends at FFH(FFFFH).
  • Page 19 HT46R64/HT46C64 To enable the counting operation, the Timer ON bit or 18H). For output operation, all the data is latched and (T0ON: bit 4 of TMR0C; T1ON: bit 4 of TMR1C) should remains unchanged until the output latch is rewritten.
  • Page 20 HT46R64/HT46C64 Input/Output Ports output function and writing ²0² will force the PD0~PD3 to The PA0 and PA1 are pin-shared with BZ and BZ signal, remain at ²0². The I/O functions of PD0/PD1/PD2/PD3 respectively. If the BZ/BZ option is selected, the output signal in output mode of PA0/PA1 will be the buzzer sig- are as shown.
  • Page 21 HT46R64/HT46C64 In a (6+2) bit PWM function, the contents of the PWM register is divided into two groups. Group 1 of the PWM The microcontroller provides 4 channels (6+2)/(7+1) register is denoted by DC which is the value of (dependent on options) bits PWM output shared with PWM.7~PWM.2.
  • Page 22 HT46R64/HT46C64 In a (7+1) bits PWM function, the contents of the PWM The A/D converter control register is used to control the register is divided into two groups. Group 1 of the PWM A/D converter. The bit2~bit0 of the ADCR are used to register is denoted by DC which is the value of select an analog input channel.
  • Page 23 HT46R64/HT46C64 Bit No. Label Function ACS0 ACS1 Defines the analog channel select. ACS2 PCR0 Defines the port B configuration select. If PCR0, PCR1 and PCR2 are all zero, the ADC circuit is PCR1 power off to reduce power consumption PCR2 Indicates end of A/D conversion.
  • Page 24 HT46R64/HT46C64 The following programming example illustrates how to setup and implement an A/D conversion. The method of polling the EOCB bit in the ADCR register is used to detect when the conversion cycle is complete. Example: using EOCB Polling Method to detect end of conversion...
  • Page 25 HT46R64/HT46C64 LCD Display Memory The device provides an area of embedded data memory for LCD display. This area is located from 40H to 60H of the RAM at Bank 1. Bank pointer (BP; located at 04H of the RAM) is the switch between the RAM and the LCD display memory.
  • Page 26 HT46R64/HT46C64 D u r i n g a R e s e t P u l s e N o r m a l O p e r a t i o n M o d e H A L T M o d e...
  • Page 27 HT46R64/HT46C64 Low Voltage Reset/Detector Functions There is a low voltage detector (LVD) and a low voltage reset circuit (LVR) implemented in the microcontroller. These two functions can be enabled/disabled by options. Once the LVD options is enabled, the user can use the RTCC.3 to enable/disable (1/0) the LVD circuit and read the LVD detector status (0/1) from RTCC.5;...
  • Page 28 HT46R64/HT46C64 Options The following shows the options in the device. All these options should be defined in order to ensure proper functioning system. Options OSC type selection. This option is to decide if an RC or crystal or 32768Hz crystal oscillator is chosen as system clock.
  • Page 29: Application Circuits

    HT46R64/HT46C64 Application Circuits R C S y s t e m O s c i l l a t o r S e e r i g h t s i d e C r y s t a l S y s t e m...
  • Page 30: Instruction Set

    For easier understanding of the various instruction The standard logical operations such as AND, OR, XOR codes, they have been subdivided into several func- and CPL all have their own instruction within the Holtek tional groupings. microcontroller instruction set. As with the case of most...
  • Page 31 In addition to the above functional instructions, a range of other instructions also exist such as the ²HALT² in- ory is an extremely flexible feature of all Holtek microcontrollers. This feature is especially useful for struction for Power-down operations and instructions to...
  • Page 32 HT46R64/HT46C64 Mnemonic Description Cycles Flag Affected Rotate RRA [m] Rotate Data Memory right with result in ACC None Note RR [m] Rotate Data Memory right None RRCA [m] Rotate Data Memory right through Carry with result in ACC Note RRC [m]...
  • Page 33: Instruction Definition

    HT46R64/HT46C64 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. ACC ¬ ACC + [m] + C...
  • Page 34 HT46R64/HT46C64 CALL addr Subroutine call Description Unconditionally calls a subroutine at the specified address. The Program Counter then in- crements by 1 to obtain the address of the next instruction which is then pushed onto the stack. The specified address is then loaded and the program continues execution from this new address.
  • Page 35 HT46R64/HT46C64 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. [m] ¬ [m] Operation Affected flag(s) CPLA [m]...
  • Page 36 HT46R64/HT46C64 INC [m] Increment Data Memory Description Data in the specified Data Memory is incremented by 1. [m] ¬ [m] + 1 Operation Affected flag(s) INCA [m] Increment Data Memory with result in ACC Description Data in the specified Data Memory is incremented by 1. The result is stored in the Accumu- lator.
  • Page 37 HT46R64/HT46C64 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. ACC ¬ ACC ²OR² x Operation Affected flag(s)
  • Page 38 HT46R64/HT46C64 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 bit 0.
  • Page 39 HT46R64/HT46C64 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 the result of subtraction is negative, the C flag will be cleared to 0, otherwise if the result is positive or zero, the C flag will be set to 1.
  • Page 40 HT46R64/HT46C64 SIZ [m] Skip if increment Data Memory is 0 Description The contents of the specified Data Memory are first incremented by 1. If the result is 0, the following instruction is skipped. As this requires the insertion of a dummy instruction while the next instruction is fetched, it is a two cycle instruction.
  • Page 41 HT46R64/HT46C64 SWAP [m] Swap nibbles of Data Memory Description The low-order and high-order nibbles of the specified Data Memory are interchanged. [m].3~[m].0 « [m].7 ~ [m].4 Operation Affected flag(s) None SWAPA [m] Swap nibbles of Data Memory with result in ACC Description The low-order and high-order nibbles of the specified Data Memory are interchanged.
  • Page 42 HT46R64/HT46C64 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. ACC ¬ ACC ²XOR² [m] Operation Affected flag(s)
  • Page 43: Package Information

    HT46R64/HT46C64 Package Information Note that the package information provided here is for consultation purposes only. As this information may be updated at regular intervals users are reminded to consult the Holtek website for the latest version of the package information.
  • Page 44 HT46R64/HT46C64 52-pin LQFP (14mm´14mm) Outline Dimensions Dimensions in inch Symbol Min. Nom. Max. 0.622 0.630 0.638 0.547 0.551 0.555 0.622 0.630 0.638 0.547 0.551 0.555 ¾ ¾ 0.039 BSC ¾ 0.015 0.019 0.053 0.055 0.057 ¾ ¾ 0.063 ¾ 0.002 0.008...
  • Page 45 HT46R64/HT46C64 100-pin LQFP (14mm´14mm) Outline Dimensions Dimensions in inch Symbol Min. Nom. Max. ¾ ¾ 0.630 BSC ¾ ¾ 0.551 BSC ¾ ¾ 0.630 BSC ¾ ¾ 0.551 BSC ¾ ¾ 0.020 BSC 0.007 0.009 0.011 0.053 0.055 0.057 ¾...
  • Page 46 Holtek¢s products are not authorized for use as critical components in life support devices or systems. Holtek reserves the right to alter its products without prior notification.

This manual is also suitable for:

Ht46c64