Basic Information Functional Description Application Description Points to Note Others

Basic Information


Question 1

How do I change the shared pin assignments for WM0/PWM1/PWM2/TMR0/TMR1/INT0/INT1/PFD in the HT56R2x?

Answer

The HT56R23/24/25/26 can select the pin function using the PINMAP registers. The PINMAP configuration is as follows:



Question 2

How do I use the HT56R6xx LED driver?

Answer

The LED driver in the HT56R6xx is controlled by software using the LEDCRTRL register to control the LED on/off function, the LED duty and COM/SEG effective polarity. For a practical configuration, set the LEDSEL bit to 1 to select the LED function, then use the LEDEN bit to control the LED, LEDEN=1 for on and LEDEN=0 for off. The COMP/SEGP bit needs to be at a high level to be effective and DTYE2~0 to setup the LED driver duty.


Question 3

How do I choose different resistors for the R-type LCD in the HT56R6x?

Answer

RSEL1/0 in the LCDCTRL register is used to setup the voltage divider resistors. Different resistors correspond to different driver capabilities, so a practical configuration should be based on the actual LCD panel. The actual configuration is shown in the table below.

 

HT56R62/65/66/67

RSEL 1/0

1/2 Bias

1/3 Bias

00

400kΩ

600kΩ

01

200kΩ

300kΩ

10

67kΩ

100kΩ

11

34kΩ

50kΩ


 


Question 4

How do I choose different resistors for the R-type LCD in the HT56R6xx?

Answer

RSEL1/0 in the LCDCTRL register can be used to setup the voltage divider resistors. Different resistors correspond to different driver capabilities, so a practical configuration should be based on the actual LCD panel. The actual configuration is shown in the table below.


Question 5

What is the accuracy, measured in bits, of the 12-bit A/D? What’s the sampling and conversion time?

Answer

The conversion accuracy of the 12-bit A/D is 10 bits. The conversion time is 16 tADs with a minimal value of 0.5 us.


Question 6

What is difference between the HT56R2x, HT56R6x and HT56R6xx devices and how should a selection be made?

Answer

The most obvious difference between the HT56R6x, HT56R6xx and HT56R2x lies in the LCD driver. The HT56R2x series MCU includes a maximum of four R-type 1/2 bias LCD driver lines COM0~3. These are used with other I/O lines to emulate the SEG output to drive 1/2 bias LCD panels. The HT56R6x and HT56R6xx both contain a complete LCD driver module.
The HT56R6xx series are R-type LCD drive types while the HT56R6x are both R or C type LCD drive types.



Functional Description


Question 1

What clock modes are provided in the Tiny Power series MCU?

Answer

The Tiny Power series MCU provides a dual clock mode, a high speed fM clock and low speed fSL clock which can both be selected as the clock source using configuration options. The high speed clock, fM, can be sourced from an external crystal, an external RC or external clock using the OSC options. The slow speed clock, fSL, can be either an 32K RC or 32768 XTAL, selected using a configuration option. The system clock is fM when the system is operating in the high speed mode which is selected using the application program. The system clock will be fSL or fM divided by 2~64 when the system is operating in the slow speed, also selected using the application program. Note that the system frequency of the HT56R678/668/67 can only be chosen to be fM/2~fM/64 with no fSL provided.



Application Description


Question 1

How do I configure the OSC3/OSC4 pins to connect to a 32768Hz crystal?

Answer

Whether the OSC3/OSC4 is connected to the 32768Hz oscillator is decided by the RTC option in the configuration options. When selected, the 32768Hz clock will be enabled and the OSC3/OSC4 pins should connect to a 32768Hz crystal as the clock source for fSUB or fSL. When not selected, the 32768Hz clock will be disabled and the OSC3/OSC4 pins need not be connected to a 32768 crystal.


Question 2

How do I use the R/C type LCD driver function provided by the HT56R6x LCD?

Answer

The R or C type LCD driver in the HT56R6x should be setup through configuration options while parameters such as bias and duty can all be setup by software freely. Decide the driver method through the configuration option, set LEDSEL=0 to select the LCD and then enable the SEG outputs through the LCDOUT1 and LCDOUT2 registers, setup the LCD bias, duty, driver waveform, divider register (effective to R-type) and LCD switch through the LCDCTRL register.


Question 3

How do I use the R-type LCD provided by the HT56R6xx LCD?

Answer

The R or C type LCD driver in the HT56R6xx should be setup using configuration options while parameters such as bias and duty can all be setup using the application program. The driver type is determined using the configuration options. Set LEDSEL=0 to select the LCD and then enable the SEG outputs using the LCDOUT1 and LCDOUT2 registers. The LCDCTRL register is used to, setup the LCD bias, duty, driver waveform, voltage divider register (effective for R-type only) and LCD enable/disable.


Question 4

What do the terms EC mode, Filter on and EC mode mean?

Answer

The EC mode means the external clock mode which is where the system clock is driven by an external clock source on the OSC1 pin, this allows the system clock to be synchronised with external circuitry To filter out noise the device is equipped with a filter circuit on the input clock line. The filter circuit can be enabled/disabled by configuration option.


Question 5

The HT56R678 SEG pin is pin-shared with a SIM pin which has three configuration options. How is this used?

Answer

When the configuration options select the SIM function, the common lines will be setup as serial data lines. The SIMCTL0 register determines whether the SPI or I2C function is selected. If the SIM function is disabled then the shared lines will be setup as LCD SEG outputs lines and any operations relating to the SIM will have no effect. The option function of SPI_WCOL and SPI_CSEN is the same as the SPI option which are used to control the on/off function of WCOL and CSEN. Note that, in the HT56R6x/HT56R6xx series MCUs, only the HT56R64 continues to use this old control method whereby the SIM is controlled using configuration options such as SIO, SIO WCOL, SIO CSEN, SIO CPOL, SEG11/SDA and SEG12/SCL.


Question 6

How is the on/off function of the WDT controlled?

Answer

The WDT in the HT56R6x/HT56R6xx series MCU has a dual control function using both the configuration options and the WDTEN.3~0 bits in the MISC register. The WDT will be disabled only when the disable configuration option is selected and when WDTEN.3~0=1010b. When the enable configuration option is selected or when WDTEN.3~0 is setup with other values, the WDT will not be disabled.


Question 7

What is the accuracy of the LIRC oscillator? How will it be influenced by temperature variations?

Answer

The accuracy of the 32KHz LIRC Oscillator in the Tiny Power series of MCUs has been greatly improved. The typical value, at an operating voltage of 2.2V~5.5V, and after room temperature calibration is 32KHz with a minimum value of 28.8KHz and maximum of 35.2KHz.


Question 8

How are the COM0~3 lines used in the HT56R2x?

Answer

The HT56R2x series of MCUs includes devices with a 1/2 bias LCD driver function. The COM0~3 outputs are controlled using the LCDC register. When both the LCDEN bit and COMxEN (x=0~3) bits are set to 1, the corresponding COM, I/O common ports will output a VDD/2 voltage along with the other I/O ports emulating the SEG output to implement a 1/2 bias LCD driver.


Question 9

What operation modes do the HT56 series MCU provide? How can mode switching be implemented?

Answer

The HT56 series of MCUs provides five operation modes, Normal mode, Slow mode0, Slow mode1, Idle mode, and Sleep mode all which are set up using the HLCLK and IDLEN bits in the CLKMOD register in combination with the HALT instruction. When HLCLK(CLKMOD.0)=1, the system is in the Normal mode. When HLCLK=0, the system is in the Slow mode. When IDLEN=1 and the HALT instruction is executed, the system enters the Idle mode. When IDLEN=0 with the HALT instruction executed, the system enters the Sleep mode. For more mode switching information refer to the data sheet.


Question 10

How does the HT56R2x generate 3.3V voltage level SPI signals?

Answer

The HT56R2x provides a 3.3V voltage level SPI signal interface which is setup using configuration options and which can communicate with other 3.3V low voltage components without requiring a voltage converter. First enable the VDDIO option which allows PA4 to be used as the 3.3V supply input for the different voltage level lines. Then separately select PA5, PA6, PA7, PE0 in the configuration options to be either VDDIO or VDD. If selected to be VDDIO, the selected lines will have 3.3V voltage levels.


Points to Note


Question 1

What is the internal equivalent circuit of the 12-bit A/D? What value of source resistance is required to match the internal capacitance?

Answer

The equivalent circuit of the ADC input is illustrated as follows.

ADC analog signal sampling should wait until the internal capacitor is fully charged so as to ensure the accuracy of the sampled input. .
RC time constant = TRC = (Rs+Rswitch) * Csample (ignoring any pin capacitances)
To obtain 12 bit conversion, a time of 8~9 TRC is necessary. As the sampling time of the Holtek ADC is 3.5 TADCLK, therefore TRC *8 = (Rs+1.5K)*47pF*8 < 3.5* TADCLK
When TADCLK =500ns Rs < 3.15K
If the user application is unable to meet the above criteria, then it is first buffer the ADC input signal or lower the conversion speed.


Question 2

Can the HT56R6x, HT56R6xx and HT56R2x series MCUs use the same ICE?

Answer

The HT56R678/668 uses the same ICE and e-writer.
The HT56R666/656 uses the same ICE and e-writer.
The HT56R654/644 uses the same ICE and e-writer.
The HT56R67/66 uses the same ICE and e-writer.
However the remaining TinyPower devices use another ICE and e-writer.


Question 3

If the device is using the HIRC and the pin-shared OSC1 pin is used as an AC Zero Crossing detector pin, will this have an influence on the HIRC accuracy? If so which devices will be affected and what can be done to prevent this problem?

Answer

If the device is using the HIRC and the pin-shared OSC1 pin is used as an AC Zero Crossing detector pin, the HIRC accuracy will be influenced. This will take place on all MCU devices whose OSC1 pin is pin-shared with an I/O pin (including the enhanced OTP type and Flash type MCUs.
To overcome this problem;
1. Avoid using the pin-shared OSC1 pin as an AC Zero Crossing detector pin.
2. If it is inevitable, add an external circuit to restrict the voltage input on the OSC1 pin to between VDD and VSS.