|
Basic Information
Question 1
What are the different functions in the HT46R7xD-1 series?
Answer
HOLTEK DATA SHEET
Functional Description
Question 1
Under what circumstances is it required to use the Charge Pump in the HT46R7XD?
Answer
In addition to having a Charge Pump circuit, the HT46R7XD also includes an internal regulator. The regulator will supply a constant output voltage of 3.3V, which will provide a supply voltage for the A/D converter external sensors, or it can also be used by other external related circuits. In order to ensure that the regulator output voltage can reach its regulated value of 3.3V, it is necessary for the Charge Pump circuit to supply it with a voltage greater than 3.6V. When the device power supply voltage is greater than 3.6V, then it is not required to use the Charge Pump. Only when the device supply voltage is less than 3.6V, then if the Charge Pump is not activated, the regulator output cannot be guaranteed to have a 3.3V output. If the Charge Pump is activated, then it will supply the internal regulator with an input voltage double that of VDD, which will certainly be higher than the minimum required input voltage of 3.6V.
Question 2
How is the Charge Pump within the HT46R7XD MCU used?
Answer
The Charge Pump circuit within the HT46R7XD MCU device is used to supply the internal voltage regulator with an input voltage equal to double that of the VDD voltage.
Question 3
What is the internal comparator in the Dual Slope A/D device used for?
Answer
The comparator output signal is used to indicate the Dual Slope A/D working condition. The comparator has two inputs, one is connected to the 1/6 VDSO and the other to the DSCC pin. When Vdscc>1/6VDSO, the comparator output will be high (ADCMPO=1), which indicates that the charging process can begin. When the comparator output is low (ADCMPO-0) this indicates that the charging process has completed.
Question 4
What is the actual voltage for the configuration option LVD voltage in the HT46R74D-1?
Answer
After the LVD function option has been selected, the LVD voltage is selected via a configuration option. When the selected value is chosen to be LVR + 0.3V, the actual LVD voltage is determined by the LVR. The voltage actually being monitored is the VDD voltage. When the LVD is selected to be Regulator + 0.2V, the actual LVD voltage is determined by VLVD3 (consult the DC characteristics). The voltage actually being monitored is the regulator input voltage.
Question 5
What is the relationship between VA, Ti and Tc for the integrator in the HT46R74D-1?
Answer

Question 6
For the HT46R74D-1, in the dual slope A/D, what are the special characteristics of the capacitor charge and discharge process?
Answer
The basic characteristics of the charging process are:
1. during charging: the charge time has a fixed value
2. during discharging, the discharge slope is the same
The following diagram shows the dual slope A/D operation, and depict the charge and discharge curves. The diagrams show clearly the basic operation characteristics:
Ti is the charge time and Tc is the discharge process.

Application Description
- Question 1
Is the amplification of the Dual Slope A/D input signal determined by hardware or software?
- Question 2
When using the Dual Slope A/D, can the charging time Ti be arbitrarily setup?
- Question 3
What is the correct method of reading and writing data to and from TIMER1?
- Question 4
What is the correct connection for the Vmax pin on the HT46R74D-1?
- Question 5
The HT46R74D-1 device includes a charge pump and regulator, how are these two functions switched on and off?
- Question 6
How is the LCD data memory utilised?
- Question 7
Under what conditions should the 32K oscillator quick start function be switched off?
- Question 8
What is the program flow for a one time charge discharge cycle for the HT46R74D-1?
- Question 9
When using the emulator to simulate a charge/discharge process, why does the DSCC output triangular waveform show a low baseline?
- Question 10
In the HT46R71D-1 device, why is it, when changing the LCD RAM value, there is no change in the LCD display?
- Question 11
Even with no external loading, why is it when the device enters the power down mode, the current consumption is still rather large?
- Question 12
In the HT46R74D-1, what is the method for determining when to start charging and discharging and to determine the charge and discharge time?
- Question 13
In the HT46R71D-1, what is the purpose of CHPC1 and CHPC2?
- Question 14
Why does the WDT not overflow when the HT46R74D-1 enters the Power-down mode?
- Question 15
How is the A/D channel switched in the HT46RU75D-1?
- Question 16
How is the A/D in the HT46RU75D-1 used for automatic charging/discharging mode?
- Question 17
How is the Baud Rate setup in the UART of the HT46RU75D-1?
- Question 18
For the HT46R74D-1 device, in the dual-slope ADC, what are the principles for setting up the values for the three parameters, Rds, Cds and Ti?
Question 1
Is the amplification of the Dual Slope A/D input signal determined by hardware or software?
Answer
The input signal amplification is determined by hardware. The circuit to do this is shown in the accompanying diagram. The gain value is determined by resistor R1 and the effective resistance of the sensor. The gain is equal to R1/R sensor.

Question 2
When using the Dual Slope A/D, can the charging time Ti be arbitrarily setup?
Answer
Ti is not able to be arbitrarily setup. It must be setup according to the value of Rds and Cds that have been chosen to allow Vc (Vdscc) to be between the values of 5/6VDSO and 1/6VDSO. (Example: VFULL cannot be greater than 5/6VDSO and VZERO cannot be less than 1/6VDSO)
Question 3
What is the correct method of reading and writing data to and from TIMER1?
Answer
To correctly write an initial value into the TMR1L and TMR1H registers, first write data into the low byte register which in fact only places the data into the low byte buffer. After this, data should be written to the high byte register TMR1H. This high byte write action, will also have the effect of transferring the low byte buffer data into the TMR1L preload register. The main point to remember when writing data is to first write the low byte and then write the high byte.
For read operations, first read the high byte register, which will have the effect of transferring the low byte register contents into the low byte buffer. Reading the low byte register, actually only reads the low byte buffer. The main point to remember when reading is to first read the high byte and then read the low byte.
Question 4
What is the correct connection for the Vmax pin on the HT46R74D-1?
Answer
Vmax is the largest voltage on the device and can be connected to VDD or VLCD. The connection method is shown in the following diagram.
LCD bias type |
R-type |
C-type |
LCD bias value |
1/2 bias |
1/3 bias |
1/2 bias |
1/3 bias |
Vmax |
If Vdd > Vlcd then connect Vmax to Vdd, otherwise connect Vmax to Vlcd |
If Vdd > 3/2Vlcd then connect Vmax to Vdd, otherwise connect Vmax to V1 |
|
|
|
|
|
Question 5
The HT46R74D-1 device includes a charge pump and regulator, how are these two functions switched on and off?
Answer
The charge pump and regulator are switched on and off by software using the REGCEN and CHPEN bits in the CHPRC register. If REGCEN is equal to 1, then the regulator will be on, if equal to zero then the regulator and charge pump will be off.
If REGCEN and CHPEN are both 1, then the charge pump will be on, if REGCEN is 1 and CHPEN is zero, then the charge pump will remain off.
Question 6
How is the LCD data memory utilised?
Answer
The LCD data memory has a start address of 40H in Bank 1. To write data to the LCD memory, first set the Bank Pointer, BP, to 1. Then use the indirect addressing to read from or write to the LCD data memory. Note that only indirect addressing using Memory Pointer MP1 can be used with the LCD data memory as direct addressing is not possible.
Question 7
Under what conditions should the 32K oscillator quick start function be switched off?
Answer
After power is applied to the MCU, the 32K oscillator will start up quickly. However if power considerations are important, then after 2 seconds the quick start function can be turned off. If the operating voltage is 3V then a current value of 1~2μa can be saved and if the operating voltage is 5V a current value of 3~4μa can be saved.
Question 8
What is the program flow for a one time charge discharge cycle for the HT46R74D-1?
Answer
The HT46R74D-1 uses the charging and discharging of a capacitor to complete its conversion process. The actual process is to use a timer to setup a charging time, then after the charging is complete, the same timer is used to measure the discharge time. After the discharge has completed, the timer will stop counting. Timer 0 is used for the charging time and Timer 1 is used for the discharging timer, the program flow is as follows:
1. Provide TMR0 with an initial value – verify the charging time.
2. Setup the ADCR register to place the AD into the charging mode (ADDISCH1:0=01) to automatically start charging.
3. Determine if the comparator output ADCMPO is high, if so then this means hat VDSCC>=1/6VDSO, therefore charging can be started.
4. After checking if ADCMPO is high, Timer 0 will start to count
5. Check the TMR0 overflow flag TOF to see if the charge time has elapsed.
6. Clear TOF and setup the ADCR register for the discharging mode (ADISCH:0=10), to automatically start discharging.
7. TMR1 will start to count the discharge time.
8. Once the ADCMP0 output has change from high to low, immediately stop TMR1 counting, and the ADC will also stop counting.
One charge and discharge cycle has now been completed.
Question 9
When using the emulator to simulate a charge/discharge process, why does the DSCC output triangular waveform show a low baseline?
Answer
This is possibly a program error. The baseline shows that the charge process has not yet started. The program should therefore by carefully checked. Additionally it is important to note if the Timer/Event counter has stopped when its value is read to eliminate errors. If stopped then this may lead to errors therefore it is important that the program takes this into account. It is recommended that the data is first written into the TMR0 and TMR1 registers, then start the related Timer/Event counter.
Question 10
In the HT46R71D-1 device, why is it, when changing the LCD RAM value, there is no change in the LCD display?
Answer
For the HT46R71D-1, because the clock source for the LCD is the internal RCOSC, perhaps the clock source is not enabled. It is recommended that the WDTOSC bits 0~1 in the WDTC register are written with 10, to enable the WDTOSC. If the WDTOSC is disabled then the internal RCOSC will also be turned off.
Question 11
Even with no external loading, why is it when the device enters the power down mode, the current consumption is still rather large?
Answer
This may be because before entering the power-down mode, there may some functions that that have not been turned off. For example switching off the charge pump/regulator circuits etc. Also because the WDTC register controls the WDTOSC enable and disable, the program can disable this to reduce current consumption in the power down mode.
Question 12
In the HT46R74D-1, what is the method for determining when to start charging and discharging and to determine the charge and discharge time?
Answer
When to begin charging and discharging is extremely important, and directly influences the A/D converter result accuracy. This is determined by the condition of the ADCMPO pin to determine if the charge/discharge start and end point. When Vdscc > 1/6VDSO, ADCMPO is high indicating that charging has started;
When the setup charge time is up, the MUX should be switched to VDSO and discharge will begin.
When Vdscc < 1/6VDSO, ADCMPO is low and the discharge will stop.
To determine the charge/discharge time generally there are three methods:
1. Using a look-up table. The condition of the ADCMPO pin can be used to determine the charge/discharge start point, after which the timer can start counting to obtain the charge and discharge time.
2. Use an interrupt method, using the ADCR register set ADINTM1:0 to set the interrupt mode: 00 - no interrupt generation, 01 - high going edge trigger, 10 - low going edge trigger, 11 - both high and low going edge trigger.
3. Automatic method. Automatic charge/discharge method using the EADCR register. In this register the CHGTS and DISTS bits are used to select the charge and discharge timers. ASTEN is the automatic mode start flag and ADISEN is the automatic discharge enable bit. AENDEN is the automatic mode end control bit.
Question 13
In the HT46R71D-1, what is the purpose of CHPC1 and CHPC2?
Answer
CHPC1 is the charge pump capacitor positive terminal. CHPC2 is the charge pump capacitor negative terminal. These two are actually used for charging. When VDD is less than 3.6V, the program will set bit 0 and bit 1 of the CHPRC register to 1. Here, the charge pump output pin, VOCHP, will be double the VDD voltage. The CHPC2 output waveform low level is 0 and the high level is VDD. The CHPC1 output waveform low level is VDD and the high level is double VDD.
Question 14
Why does the WDT not overflow when the HT46R74D-1 enters the Power-down mode?
Answer
First check the program for errors. Check that all the relevant registers and configuration options have been correctly setup. The following points should be especially noted:
1. The WDT clock source has three configuration option selections. These are the WDTOSC, the RTCOSC and the T1 (system clock/4) clock. If the WDT clock source is selected to be T1, then when the system enters the Power-down mode the WDT will stop counting. For this reason, if the WDT is still required to operated when in the Power-down mode then other clock sources should be selected.
2. Take note also of the WDT power supply. When the power supply source is setup to come from the regulator, take care to ensure that the CHPRC register does not switch off the power to the regulator, which will in turn prevent the WDT from overflowing.
Question 15
How is the A/D channel switched in the HT46RU75D-1?
Answer
The HT46RU75D-1 has four AD channels which are selected using the ADCH register. Bits ADCH1~0 in the ADCH register are used to define the ADIP and ADIN input group. Bits PCR2~0 in the ADCH register are used to define the number of A/D inputs. The setup is shown in the following table:
Question 16
How is the A/D in the HT46RU75D-1 used for automatic charging/discharging mode?
Answer
For the HT46RU75D-1 A/D converter to implement an automatic charge/discharge mode it must first properly setup the EADCR register, the charge/discharge timer counter, enable the dual slope mode automatic start flag, the automatic discharge enable bit and the automatic mode end control bit. When the discharge has ended, then the ADCMPO pin condition can be used to generate an interrupt. Read the value of the discharge register to complete the automatic charge/discharge mode A/D conversion.
Question 17
How is the Baud Rate setup in the UART of the HT46RU75D-1?
Answer
The UART Baud Rate in the HT46RU75D-1 is controlled using the UCR2 and BRG registers. The BRGH bit in the UCR2 register selects the high or low speed mode. If BRGH=1 then the high speed mode is selected, if BRGH=0 then the low speed mode is selected. The BRG register value is determined according to the selected system frequency, with the required baud rate being determined according to the equation in the following table. The value calculated for N in the equation is the value that is placed into the BRG register.

Question 18
For the HT46R74D-1 device, in the dual-slope ADC, what are the principles for setting up the values for the three parameters, Rds, Cds and Ti?
Answer
Rds, Cds and Ti are setup using the following method:
When Vi = Vfull then Vi is the largest signal value. Then during the charging time Ti, the value of Vc must be greater than 4/6 VDSO.
When Vi = Vzero then Vi is the smallest signal value. Then during the charging time Ti, the value of Vc must be greater than 1/6 VDSO.
Fig. 1 Normal charging process waveform
Otherwise:
When Vi = Vfull then Vi is the largest signal value. Then during the charging time Ti, then when the value of Vc is greater than 4/6 VDSO, then the integrating capacitor is fully charged, which will influence the integrator linearity (see Fig. 2).
Fig. 2 At T1 the capacitor is fully charged.
When Vi = Vzero then Vi is the smallest signal value. Then during the charging time Ti, when the value of Vc is less than 1/6 VDSO, then the integrating capacitor will not charge and an A/D conversion will not be possible (see Fig. 3)

Fig. 3 At T2 the capacitor charge voltage has not reached 1/6VDSO
Points to Note
Question 1
During an A/D conversion, the input signal is stable and fixed. Why therefore is the converted value not stable?
Answer
This condition may exist if the line from the sensor output terminal to the A/D input is excessively long. As over long lines may negatively affect the integrity of the sensor signal, the line from the sensor to the A/D input should be kept as short as possible.
Question 2
Why, after the HT46R74D01 has stopped charging/discharging, is the waveform a ladder waveform?
Answer
This is because the charging time cannot be set to an arbitrary amount. It is necessary to determine using RDS and CDS that Vc is between a value of 5/6 VDSO and 1/6 VDSO. When the correct charging time has been selected, the HT46R74D-1 charge and discharge waveform will be a triangle wave. However if the charge time is too long, after the Vc voltage reaches a value of 5/6VDSO it cannot go higher, therefore the charging waveform will become a ladder waveform.
Others
Question 1
How can sensors be used with the HT46R71D-1?
Answer
The HT46R71D-1 has a regulator and VOREG is the regulator output pin. The normal operating output voltage is 3.3V. Under normal operating conditions, this can be used as the sensor power supply. Actual sensors must be used in accordance with their specification. Using a pressure sensor as a simple example, the VOREG pin is connected to the sensor’s IN+. VSS is connected to the IN- for the sensor power supply. The sensor’s OUT+ and OUT- are connected to the IC converter pins DOPAP and DOPAN. In this way after the sensor has done its work, it can transmit its signal to the IC for processing.
|