|
Basic Information
Question 1
What are the contents of the HT49 LCD type MCUs?
Answer
Together there are a total of 9 devices in the Holtek LCD type MCU series. Made up from different memory sizes of 2K, 4K and 8K and supplied in both OTP and Mask versions. They are known by name as the HT49R30A-1/HT49C30-1/HT49C30L, HT49R50A-1/HT49C50-1/HT49C50L, HT49R70A-1/HT49C70-1/HT49C70L. The specifications and description of each device can be found in its relevant data sheet.
Question 2
What are the different resources in the HT49 series of devices?
Answer
Please check on the table below for the differences. For more detailed information consult the data sheet.
Question 3
What package types are supplied for the HT49 LCD type MCUs?
Answer
HT49R10A-1/HT49C10-1:44QFP
HT49R30A-1/HT49C30-1/HT49C30L: 48 SSOP
HT49R50A-1/HT49C50-1/HT49C50L : 48 SSOP (with pin function compatible HT49R30A-1 allowing for convenient MCU upgrade)
HT49R50A-1 : 100 QFP
HT49R70A-1/HT49C70-1/HT49C70L : 100 QFP (with pin function compatible HT49R50A-1 allowing for convenient MCU upgrade)
HT49RU80/HT49CU80 : 100 QFP
Question 4
What are the special features and characteristics of the HT49 LCD type MCUs? Answer
Operating Voltage range of 2.2V ~ 5.5V; HT49CXXL 1.2V ~ 2.2V
Industrial standard temperature range of -40oC ~ +85oC
Low Voltage Reset function
Fully compatible OTP and Mask Types
For further details consult the relevant Holtek data sheet
Question 5
What is the operating frequency of the HT49 LCD type MCUs?
Answer
For 5V/3.3V or 3-cell battery applications, the maximum operating frequency is 8MHz (3.3V). For 3V or 2-cell battery applications the maximum operating frequency is 4MHz (2.2V).
Question 6
What are the ESD and Latch up features of the HT49 LCD type MCUs?
Answer
As the HT49 LCD type series of MCUs possess exceptional ESD and Latch up protection they are suitable for industrial use. In the area of ESD protection the devices conform to the US military spec MIL-STD-883E 3015.7 and each I/O can withstand in excess of 5KV of body static. Regarding latch-up, the devices conform to the JEDEC-NO.17 specification, when tested in current mode, each I/O can withstand in excess of 100mA.
Question 7
What is the duration of the Power On Reset?
Answer
For the HT49 LCD type MCU at 3V operating voltage, the Power On Reset time range is 45ms~180ms; at 5V, the Power On Reset time range is 35ms~140ms.
Question 8
What is the system frequency tolerance if an RC oscillator is used as the system clock?
Answer
If the RC oscillator is selected, due to tolerances in the device processing, a nominal
±20% frequency tolerance from lot to lot is expected. Assuming that the external resistor has a
±5% tolerance, then the overall frequency tolerance would be ±25%.
The above specified tolerance is provided as a reference only and is not guaranteed. For applications where a more precise frequency source is required it is recommended that either a resonator or crystal frequency source is used.
Question 9
For the HT49R50A-1/HT49C50-1 48PIN SSOP package type devices, what is the correspondence of each SEG lines to the LCD RAM?
Answer
For the HT49R50A-1/HT49C50-1 48PIN SSOP package types, there are 19 SEG lines, namely SEG10~SEG27 and SEG32.
The SEG line and LCD RAM correspondence is as follows:
SEG10 ~SEG27 : 4AH~5BH, SEG32 :60H.
Question 10
Does the HT49R50A-1 device contain a 32768HZ oscillator circuit?
Answer
The HT49 has two integrated oscillator circuits, one of which is a 32768 Hz circuit. The other is an oscillator circuit with a range of 400KHZ~8MHZ. These two circuits require an external crystal to be connected for their operation. In addition an additional WDT oscillator is contained within the devices, which is an RC type oscillator, which is completely self contained and does not require any external components.
Question 11
In the HT49 series, how is the LVD used and what is its voltage?
Answer
In the RTCC register it is only necessary to set bit 3 to "1" to activate the LVD function. In the HT49 series of devices the LVD voltage is set to be between the range 3.0V to 3.6V. When the battery voltage falls below this range, bit 5 of the RTCC register will be set to "1" which indicates a low battery condition. However it should be noted that this function cannot be emulated in the MCU tools.
Functional Description
- Question 1
The HT49 LCD MCUs have two memory pointers, what is the difference between them?
- Question 2
How are the table read instructions used and are there any special points to note?
- Question 3
Why, when PA is low the device cannot wake up?
- Question 4
Why, when a low going edge is presented on the external interrupt pin the MCU does not wake-up?
- Question 5
What are the clock sources of RTC,WDT and Time Base available for the HT49 LCD type
MCUs?
- Question 6
If the RTC OSC is selected as the system clock, why the clock source for
RTC, WDT and Time Base is fixed to RTC OSC?
- Question 7
If the WDT oscillator clock is selected how is the WDT timing calculated?
- Question 8
What is the difference between choosing the WDT oscillator or the fSYS/4 clock as the WDT clock source?
- Question 9
What is the purpose of 2 CLR WDT instructions?
- Question 10
How is the 8-bit timer setup?
- Question 11
How is the 16-bit timer setup?
- Question 12
What is the access sequence of the 16-bit Timer/Counter?
- Question 13
How is 8-bit Timer/Counter setup in the Timer Mode?
- Question 14
How is the Timer/Counter setup in the Event Counter Mode?
- Question 15
How is the Timer/Counter setup in the Pulse Width Mode?
- Question 16
How is the HT49 LCD type MCU Timer/Counter 0 clock source setup?
- Question 17
How is the HT49 LCD type MCU Timer/Counter 1 clock source setup?
- Question 18
How is the HT49 LCD type MCU RTC setup?
- Question 19
How is the HT49 LCD type MCU Buzzer setup?
- Question 20
How is the HT49 LCD type MCU PFD setup?
- Question 21
How is the HT49 LCD type MCU Timer Base setup?
- Question 22
How is the HT49 LCD type MCU LCD frequency setup?
- Question 23
What is the difference in selecting R or C type as LCD Bias?
- Question 24
What are the system clock sources available for the HT49 LCD type
MCUs?
- Question 25
What is the constraints on VDD during Power On?
- Question 26
In the HALT mode, is there any power consumption associated with the Low Voltage Reset
(LVR) circuitry?
- Question 27
For Holtek's MCUs, is there any way to reset the stack pointer other than by a chip RESET?
- Question 28
When the HT49R70A-1 is in the HALT mode, what kind of interrupt will wake the device up?
- Question 29
What is the function of the WDT?
- Question 30
Before entering a HALT condition, if all of the interrupts are turned off and if the watchdog timer is also turned off, why is the MCU still woken up?
- Question 31
Many of the Holtek MCUs have a Low Voltage Reset function. When this operates what is the condition of the I/O, OSC pins etc?
- Question 32
What is the difference between the activation of an LVR function and pulling the RES pin low?
- Question 33
When using the HT49R50A-1, how can the two 8-bit timers be combined to form a 16-bit timer?
- Question 34
What are the required conditions to generate a UART interrupt in the HT49RU80?
- Question 35
What are the special features of the UART in the HT49RU80?
Question 1
The HT49 LCD MCUs have two memory pointers, what is the difference between them?
Answer
MP0/IAR0 and MP1/IAR1 are pairs of registers that need to be used together. MP0/IAR0 can only be used by RAM BANK 0 while MP1/IAR1 can be used by any RAM BANK.
Question 2
How are the table read instructions used and are there any special points to note?
Answer
There are two kinds of table read instructions, the first is the TABRDC instruction which is used to read data from the present program memory page. The second is the TABRDL statement which can read data from the last page of program memory. When reading data from tables it is first necessary to place the low byte of the program memory address where the data is stored, into the table pointer register TBLP. The table read instruction can then be executed which will place the low byte of the table data into the register indicated by the table read instruction. The high byte of the table data will be placed into the TBLH register. Note that the highest unimplemented bits in the data high byte will read as "0".
Question 3
Why, when PA is low the device cannot wake up?
Answer
The PA port pins can all be configured to
wake up the device but are activated only on a low going edge. If
the corresponding PA pin was low when the HALT instruction was
executed then the low logic state of this pin will have no wake up
effect as no low going transition exists.
Question 4
Why, when a low going edge is presented on the external interrupt pin the MCU does not wake-up?
Answer
Although the MCU can be woken up by an external interrupt, the actual wake process takes place only when the Interrupt Request Flag EIF0/EIF1 changes from "0" to "1". If when the MCU enters a HALT condition the EIF0/EIF1 flag is already set to "1", then a further interrupt will have no effect on the status of the EIF0/EIF1 flag, which will remain in its present "1" condition. As a transition a wake-up will not occur.
Question 5
What are the clock sources of RTC,WDT and Time Base available for the HT49 LCD type MCUs?
Answer
For the HT49 LCD type MCU, the RTC, WDT and Time Base use the same clock source. The clock source is chosen in the configuration options.
If RTC OSC is chosen as the system clock, the RTC, WDT and Time Base use the RTC OSC as clock source; (Since RTC OSC is the clock source not affected by the HALT function, the WDT OSC is no longer needed as the clock source, therefore under the power saving consideration, the clock source of WDT and Time base is fixed to RTC
OSC.)
If RTC OSC is not chosen as the system clock, the RTC, WDT and Time Base, there are three clock resources available, namely:
-
fSYS/4
-
RTC OSC
-
WDT OSC
Question 6
If the RTC OSC is selected as the system clock, why the clock source for RTC, WDT and Time Base is fixed to RTC OSC?
Answer
The RTC OSC is an independent clock source which keeps on oscillating even in the HALT mode. If the RTC is selected as the system clock, there is no need to have another WDT OSC. Under the power saving consideration, WDT clock source is therefore fixed to RTC OSC.
Question 7
If the WDT oscillator clock is selected how is the WDT timing calculated?
Answer
The WDT oscillator at an operating voltage of 5V has a typical
period of 65µs (range of 32µs~130µs). The watchdog time will range from
65µs x 215=2.13 Sec. to 65µs x 216=4.26 Sec.
Question 8
What is the difference between choosing the WDT oscillator or the fSYS/4 clock as the WDT clock source?
Answer
If the WDT oscillator clock is chosen as the clock source then if the system enters a HALT condition the WDT timer will continue to function. When the WDT time-outs the system will be woken up from its HALT state. If the fSYS/4 clock is chosen as the WDT clock source then the WDT will cease to function and system will not be woken up when a HALT state is entered. The cost in choosing the WDT oscillator is that some power will be consumed by its clock. For systems that operate with HALT feature and need not to be woken up from HALT by WDT overflow, in this case the fSYS/4 clock source should be selected.
Question 9
What is the purpose of 2 CLR WDT instructions?
Answer
Two CLR WDT instructions feature increases the system reliability. If the program contains two loops in the main program a CLR WDT1 instruction can be placed in one loop and a CLR WDT2 instruction in the other loop. If a malfunction occurs, perhaps due to noise, and the program enters an infinite loop none of the CLR instructions in the other loop will be executed, therefore the WDT will overflow and generate a reset signal to reset the MCU.
Question 10
How is the 8-bit timer setup?
Answer
The 8-bit timer/counter is a count up timer which upon reaching a count of 255 (0FFH) will reset itself to 00H and generate an internal interrupt signal. To obtain different timer counts, say N, of less than 256, the timer should be first preset with a fixed value of 256-N. After setting up this preset value the timer should be activated which will enable it to count from this preset value to 255. The value that the timer is to count N, is therefore given by the formula 256-(256-N)=N.
Question 11
How is the 16-bit timer setup?
Answer
The 16-bit timer/counter is a count up counter, which upon reaching a value of 65535 (0FFFFH) will reset itself to 0000H and generate an internal interrupt signal. To obtain different timer counts, say N, of less than 65536, the timer should be first preset with a fixed value of 65536-N. After setting up this preset value the timer should be activated which will enable it to count from this preset value to 65535. The value that the timer is to count N, is therefore given by the formula 65536-(65536-N)=N.
Question 12
What is the access sequence of the 16-bit Timer/Counter?
Answer
For the HT49 LCD type MCU, the internal data bus is 8-bit wide, therefore for the 16-bit Timer/Counter, the user has to write the Low Byte data first and then write the high byte data. To read the Timer/Counter contents, the user has to first read the High Byte data first and then the Low Byte data.
Question 13
How is 8-bit Timer/Counter setup in the Timer Mode?
Answer
There are three modes available for the 8-bit Timer/Counter, i.e. Timer Mode, Event Counter Mode and Pulse Width Mode. To setup in the Timer Mode, the following process should be followed:
-
Choose clock source in configuration option
-
Choose clock source in TS bit
-
Set to Timer Mode by writing 10H to TM1, TM0
-
Set the initial timer TMR value
-
Enable the corresponding interrupt by setting the ETI and EMI bit
-
Start the Timer by setting the TON bit of the TMRC
Once the Timer is enabled, it will count up and will be stopped when the TON bit in the TMRC register is cleared. If the Timer is enabled once again, the counter will start counting from the value where it was stopped. If the Timer overflows, an internal interrupt request will be issued and the TMR will be reloaded with the initial value.
Question 14
How is the Timer/Counter setup in the Event Counter Mode?
Answer
There are three modes available for the Timer/Counter, i.e. Timer Mode, Event Counter Mode and Pulse Width Mode. To set in the
Event Counter Mode, the following process should be followed:
-
Set to Event Counter Mode by writing 01H to TM1, TM0
-
Select TE=1 to count on the falling edge and TE=0 to count on the rising edge
-
Set the Timer initial value into TMR
-
Enable the corresponding interrupt by setting the ETI and EMI bits
-
Start the Timer by setting the TON bit in the TMRC register
Question 15
How is the Timer/Counter setup in the Pulse Width Mode?
Answer
There are three modes available for the Timer/Counter, i.e. Timer Mode, Event Counter Mode and Pulse Width Mode. To set in the
Pulse Width Mode, the following process should be followed:
-
Choose clock source in configuration option
-
Choose clock source in TS bit
-
Set to Pulse Width Mode by writing 11H to TM1, TM0
-
Select TE=1 to measure a High Pulse Width and TE=0 to measure a Low Pulse Width
-
Set the Timer initial value, TMR, usually set to 0H for Pulse Width Measurements
-
Enable the corresponding interrupt by setting the ETI and EMI bits
-
Start the Timer by setting the TON bit in the TMRC
After the Timer/Counter is enabled, the user can poll the TON bit, if one pulse measurement is complete, the TON bit will be cleared to 0.
Question 16
How is the HT49 LCD type MCU Timer/Counter 0 clock source setup?
Answer
To set the clock source, the following process should be followed:
-
Select fSYS or fSYS/4 in the configuration options
-
Select the clock mentioned above or RTC output as Timer/Counter 0 clock source by TS bit
Question 17
How is the HT49 LCD type MCU Timer/Counter 1 clock source setup?
Answer
To set the clock source, the following process should be followed:
-
Select fSYS, TMR0 OV or Time Base Out in the configuration options
-
Select the clock mentioned above or fSYS/4 as Timer/Counter 1 clock source by TS bit
Question 18
How is the HT49 LCD type MCU RTC setup?
Answer
RTC setup is quite similar to Time Base setup, the key difference is that frequency can be selected in software. To utilize the RTC, the following process should be followed:
-
Select clock source (same as RTC, WDT and Time Base) in the configuration options
-
Select RTC frequency from the formula fRTC=fS/28~215
(fS is the clock source mentioned above) by writing to the control register bits.
-
Enable the corresponding interrupt by setting the ERTI bit
After these steps are taken, if the RTC
overflows, an internal interrupt request will be issued by setting
RTF.
Question 19
How is the HT49 LCD type MCU Buzzer setup? Answer
To utilize the Buzzer Mode, the following process should be followed:
-
Choose PA0 and PA1 as CMOS output in the configuration options
-
Select Buzzer Mode in the configuration options
-
Select clock source (same as RTC, WDT and Time Base) in the configuration options
-
Select Buzzer frequency from the formula fBUZZER=fS/22~29
(fS is the clock source mentioned above)
After these steps are taken, set PA0 and PA1 to control the Buzzer output. When PA0=0 and PA1=0, both BZ and
BZ pins output; When PA0=0 and PA1=1, BZ pin outputs only; When PA0=1, both BZ and
BZ pins no buzzer output.
Question 20
How is the HT49 LCD type MCU PFD setup?
Answer
To utilize the PFD Mode, the following process should be followed:
-
Select PFD Mode in the configuration options
-
Select PFD output from which timer/counter
-
Select PFD frequency from the formula
8 Bit: FPFD=fINT/(2 x (256-N))
16 Bit: FPFD=fINT/(2 x (65536-N))
(fINT is the timer clock source)
-
Start the Timer by setting the TON bit in the TMRC
After these steps are taken, set PA3=0 to enable PFD output.
Question 21
How is the HT49 LCD type MCU Time Base setup?
Answer
To utilize the Time Base Mode, the following process should be followed:
-
Select clock source (same as RTC, WDT and Time Base) in the configuration options
-
Select Time Base frequency from the formula
fTIME BASE=fS/212~215
(fS is the clock source mentioned above)
-
Enable the corresponding interrupt by setting the ETBI bit
If the Time Base overflows, an internal interrupt request will be issued.
Question 22
How is the HT49 LCD type MCU LCD frequency setup?
Answer
To set the LCD frequency, the following process should be followed:
-
Select clock source (same as RTC, WDT and Time Base) in the configuration options
-
Select the division ratio in the configuration options to set the LCD frequency to be around 4kHz from the formula
fLCD=fS/22~28 (fS is the clock source mentioned above)
Question 23
What is the difference in selecting R or C type as LCD Bias?
Answer
If the C type bias is selected, an external
capacitor is needed, yet it is much power saving. If the R type
bias is selected, no external capacitor is needed, but more power
consuming. If power consumption is not a key issue, user may
choose the R type bias which can save 3 capacitors. Please note
when choose C type and 1/3 bias, the LCD voltage is 3/2 VLCD.
Question 24
What are the system clock sources available for the HT49 LCD type MCUs?
Answer
For the HT49 LCD type MCU, there are three system clock resources available, namely:
-
External RC Oscillator
-
External Crystal Oscillator
-
External RTC Oscillator
Question 25
What is the constraints on VDD during Power On? Answer
To ensure the Power On Reset operates successfully, the VDD rising voltage is recommended to be completed within 20ms. For battery applications, the internal resistance will increase due to the low battery condition and will slow the rising edge of the power supply increasing the possibility of Power On Reset failures.
Question 26
In the HALT mode, is there any power consumption associated with the Low Voltage Reset (LVR) circuitry?
Answer
In the HALT mode, the Low Voltage Reset function has no effect, therefore, there is no power consumption considerations when in the HALT mode.
Question 27
For Holtek's MCUs, is there any way to reset the stack pointer
other than by a chip RESET?
Answer
The stack pointer is affected by the execution of interrupts as
well as by any subroutine calls which occur in the application
program. In addition, any return instructions will also affect the
stack pointer. However, it is not possible for the user to
directly reset the stack pointer by any means other than the chip
RESET.
Question 28
When the HT49R70A-1 is in the HALT mode, what kind of interrupt
will wake the device up?
Answer
The HT49R70A-1 has 6 kinds of interrupts, External Interrupt 0, External Interrupt 1, Timer 0 Interrupt, Timer 1 Interrupt, Time Base Interrupt and an RTC Interrupt. If the device is in the HALT mode, and if an interrupt occurs which changes the state of any interrupt request flag, namely EIF0/EIF1/T0F/T1F/TBF/RT0F from a 0 to a 1, the device will be woken up from the HALT condition.
Question 29
What is the function of the WDT?
Answer
The WDT is designed to monitor the MCU software and hardware operations. Users should employ the CLEAR WDT (CLR WDT or CLR WDT1 and CLR WDT2 ) instructions should any abnormal operation or malfunction happens when a WDT overflow would occur which will then reset the MCU to resume normal operation. The WDT monitoring effects mainly depend on the software program design.
Question 30
Before entering a HALT condition, if all of the interrupts are turned off and if the watchdog timer is also turned off, why is the MCU still woken up?
Answer
The HALT condition is woken up by the occurrence of an interrupt request flag. When the interrupt request flag changes state from a "0" to "1", the MCU will be woken up. Therefore even if the interrupt is disabled, when the conditions for an interrupt are satisfied, the corresponding interrupt request flag will change state at which point the MCU will be woken up from its HALT condition. If after entering a HALT condition, it is desired that an interrupt should not wake up the MCU, the related interrupt request flag should first be set to "1"
Question 31
Many of the Holtek MCUs have a Low Voltage Reset function. When
this operates what is the condition of the I/O, OSC pins etc?
Answer
When the power supply voltage falls below the specified LVR voltage, the LVR function will be activated. When this happens the I/O pins will revert to an input condition, and the oscillator will start up. The LVR voltage will vary according to the process, for details consult the DC characteristics section of the datasheet.
Question 32
What is the difference between the activation of an LVR function
and pulling the RES pin low?
Answer
The difference is that in the case of the LVR, if the operating voltage falls below the LVR voltage but remains higher than the lowest operating voltage, the oscillator will continue running. However if the RES pin is pulled low the oscillator will be always be stopped.
Question 33
When using the HT49R50A-1, how can the two 8-bit timers be combined to form a 16-bit timer?
Answer
- Setup both timers to be in the timer mode - TM1=1,TM0=0
- Setup the Timer 0 clock source bit T0S=1, and in the configuration options ensure that the Timer/Event Counter 0 clock source is chosen to be the system clock.
- Setup the Timer 1 clock source bit T1S=0, and in the configuration options ensure that the Timer/Event Counter 1 clock source is the TMR0 overflow.
By implementing the above procedure to allow Timer 0 to be the clock source for Timer 1, both timers can be combined to form a 16-bit timer.
Question 34
What are the required conditions to generate a UART interrupt in the HT49RU80?
Answer
The UART satisfy one of the following conditions for an interrupt to occur:
Transmission completed
1. Transmit register empty
2. Data reception completed
3. Overrun error
4. Address match
5. RX pin wake-up. After this a delay of 1024 clock pulses is required before the system wakes-up. Also requires that the stack is not full and that the EMI and EURI bits are set if a UART interrupt is to be generated.
Question 35
What are the special features of the UART in the HT49RU80?
Answer
The UART is a full duplex asynchronous unit that can choose either 8 or 9 character lengths, odd, even or no parity and one or two stop bits. It contains a baud rate generator with an 8-bit prescaler, parity, framing, noise and overrun error detection, as well as supporting interrupts and address detect. The device has independent transmit and receive enables, a two level FIFO receive buffer and transmit and receive registers.
Application Description
- Question 1
How to use the indirect memory addressing mode?
- Question 2
In the HT49X30 series of devices when a "0" is written to bit 7 of the memory pointer MP, when it is read out, why does it give a value of "1"?
- Question 3
As there are no Push and POP instructions, when an interrupt occurs how is the data backed-up?
- Question 4
Can the Call instruction be used within an interrupt routine?
- Question 5
When an interrupt is being serviced will other occurring identical interrupts be effective?
- Question 6
How should unused I/O pins be managed?
- Question 7
When in HALT mode why does the device continue to consume power?
- Question 8
Is it possible to disable the wake-up function of the external interrupt?
- Question 9
Why, for HT49 LCD type MCU an input could be unexpectedly changed as an output after executing SET or CLR instructions?
- Question 10
Under what situations the users should turn the Quick Start-up Oscillating
(QOSC) off?
- Question 11
For 2-cell battery applications (2.2V~3.8V), is the Low Voltage Reset
(LVR) still available?
- Question 12
Are the Reset circuits provided in the data sheets suitable for all applications?
- Question 13
If the RC oscillator is selected as the system clock, what are the purposes of the external resistor and capacitor? Can the capacitor be omitted?
- Question 14
Can a voltage higher than VDD be supplied to the VLCD pin of the HT49 LCD type
MCUs?
- Question 15
How can I choose between COM3/SEG32?
- Question 16
On the HT49 series of MCUs, when using R type biasing to supply power to the LCD, then pulses appear on the
VLCD. Will this influence the running of the MCU, if so how can it be rectified?
- Question 17
In the HT49 series devices why is it not recommended to use an RTCC range between
28-211?
- Question 18
If a 32K crystal is connected to OSC3 and OSC4 on the HT49 series devices what values of resistors and capacitors should be added? Also if an RC oscillator is used as the 32K oscillator, what value of resistor should be connected to OSC1?
- Question 19
What should be done to minimize power consumption in the HT49 series devices?
- Question 20
When an RC type clock is chosen as the system clock, how can the actual frequency obtained from this RC clock be measured?
- Question 21
How to use the timer auto-reload function of
Holtek MCUs?
- Question 22
What should I do to use an external crystal during my program development?
- Question 23
When in the low power mode, how should any
unused inputs be managed? Also, what is meant by a no load
condition?
- Question 24
In the HT49 series how can extended times be
internally setup?
- Question 25
How can the PFD output in the HT49 series of devices be used to generate a 38 KHz carrier signal?
- Question 26
In the HT49 series of MCUs what is the correct way to change the contents of BANK 1?
- Question 27
When using the BZ/BZB function in the HT46/HT47/HT48/HT49 series devices, the sound emitted is not loud enough, what can I do about this?
- Question 28
If I want to use the timer to wake up the system when in the HALT mode, I encounter the following problem. The Holtek datasheet says that after the HALT instruction is executed the system clock will be stopped, if this happens how can the timer be used to wake up the system?
- Question 29
When using a Holtek MCU in a voice application, within the software I wish to use look up table data as follows:
| TABLE1: |
DC 0FFE1H,0FE32H,0FA34H,0FC78H |
|
|
DC 0FECDH,0FEDCH,0FE57H,0FD87H |
; 16bit table values |
Is it possible for Look up table data definitions of 16-bits to accept the format of data given in TABLE1?
- Question 30
How can I use C language to place data into the LCD ram. Please give an example using the HT49R70A-1 as a sample device.
- Question 31
How do I distinguish use of the Memory Pointers MP0 and MP1 in the HT49CU80/HT49RU80?
Question 1
How to use the indirect memory addressing mode?
Answer
First the address to be read or written must be placed in the relevant memory pointer, known as MP. After this any instruction that refers to the Indirect Register, known as IAR, (e.g. MOV a, IAR) will result in action taking place on data pointed to by the memory pointer (MP). Indirect memory addressing is particularly useful for operations on data arrays by first placing the first array address in the memory pointer. Data can then be read or written from different places in the array by manipulating the data pointer.
Question 2
In the HT49X30 series of devices when a "0" is written to bit 7 of the memory pointer MP, when it is read out, why does it give a value of "1"?
Answer
The HT49X30 Data RAM address is located at the address range 20H~7FH. Because the data RAM capacity does not exceed 80H, a 7-bit memory pointer (Bit0~Bit6) is adequate. Reading bit 7 of MP will always give a value of "1" irrespective of what value has been written into it. If the value "70H" is written to MP it will be read back as "F0H" but in fact the actual address pointed to is "70H" which is correct for the indirect addressing operations.
Question 3
As there are no Push and POP instructions, when an interrupt occurs how is the data backed-up?
Answer
Although there are no PUSH or POP instructions, the programmer can still assign memory space. (Example db: ACCStack for ACC Storage) to store the interrupt backup data. To do this first store the ACC data in an area of memory, after which the status register and other data to be stored can be stored in similar dedicated memory locations. Before returning to the main program the data should be retrieved similarly but in a reverse order i.e. ACC is the last to be retrieved. When this is completed a RETI instruction should be executed to return to the main program.
Question 4
Can the Call instruction be used within an interrupt routine?
Answer
Because of the limitations in size of the
MCU Stack, programmers must be exceptionally careful if using a
call instruction inside an interrupt routine. If the program is in
an interrupt routine and the stack is full, then executing a call
instruction will result in a stack-over situation preventing the
program from returning properly from the interrupt routine.
Therefore if it is necessary to execute call instruction from
within interrupt routines it is imperative that the worst case
condition regarding stack requirements are considered. Before
entering interrupt routines it is essential to verify that enough
stack levels are available.
Question 5
When an interrupt is being serviced will other occurring identical interrupts be effective?
Answer
In normal operation when the MCU enters an
interrupt routine the EMI flag will be cleared (EMI=0), which will
prevent any corresponding interrupts from being serviced. However
if the program is used to actively set the EMI flag (EMI=1) when
an interrupt is being serviced then if the stack is not full, all
other interrupts (including identical interrupts) will be
effective. If multiple interrupts are necessary the programmer
must take great care to ensure that the backed up data from the
present interrupt is not corrupted by any following interrupts.
Unless in cases of absolute necessity it is strongly recommended
that multiple interrupts are not permitted.
Question 6
How should unused I/O pins be managed?
Answer
Any unused I/O pins should be managed
properly so as to prevent from power consuming. The best method to
prevent this is to set any unused pins as outputs however if set
as inputs they should be selected to have a pull up option. If a
pull-high option is not used then the pin should be tied to
ground.
Question 7
When in HALT mode why does the device continue to consume power?
Answer
When the MCU enters the HALT mode the
oscillator is stopped. However if the WDT oscillator (if WDT is
enabled in the options) or if the RTC oscillator is still running
then some power will be consumed. In addition, the I/Os will
maintain the condition they were in when the HALT instruction was
executed. It is important to check if the I/Os inputs are floating
or outputs remain loaded in the HALT mode that they might consume
power.
Question 8
Is it possible to disable the wake-up function of the external interrupt?
Answer
If before entering a HALT condition the EMI is first cleared and then if the EIF0/EIF1 bit is set to "1" the external interrupt will have no wake-up function.
Question 9
Why, for HT49 LCD type MCU an input could be unexpectedly changed as an output after executing SET or CLR instructions?
Answer
Usually this could happen when input and output lines are assigned in the same I/O port and the SET or CLR bit manipulation instructions are employed for output control. The SET and CLR bit manipulation instructions employ Read-Modify-Write operations, when used on I/O port, it will first read the entire port execute the defined bit operations and then write to I/O port. If the input line happens to be low externally on the line during Read phase, this input line will therefore to be read as 0 and write back to low and function as an output line. To avoid this situation, users are recommended to operate on the I/O Port RAM Buffer and then write the Buffer contents to I/O port.
Question 10
Under what situations the users should turn the Quick Start-up Oscillating (QOSC) off?
Answer
During power on, the Quick Start-up Oscillating is activated to shorten the start-up time. However, if power consumption is a key issue, 2 seconds later after power on, users may turn the Quick Start-up Oscillating scheme off by setting QOSC =1. Usually, this will save power consumption around
1~2µA in 3V applications and 3~4µA in 5V applications.
Question 11
For 2-cell battery applications (2.2V~3.8V), is the Low Voltage Reset (LVR) still available?
Answer
For the HT48 I/O type MCU, the Low Voltage
Reset (LVR) function operates in the range of 2.7V ~3.3V,
therefore the LVR feature is not applicable. If a 2.2V voltage
detection function needed in applications, an external Voltage
Detector (HT70XX) is recommended.
Question 12
Are the Reset circuits provided in the data sheets suitable for all applications?
Answer
Usually, the Reset circuits provided in the
data sheets are applicable for most applications. Under some
circumstances, a noisy environment for example, the Reset circuit
might need to be modified for special user considerations.
Question 13
If the RC oscillator is selected as the system clock, what are the purposes of the external resistor and capacitor? Can the capacitor be omitted?
Answer
The external resistor on the OSC1 pin is used to generate bias to control the internal RC charge and discharge. The frequency of the RC oscillator is determined by the value of this external resistor. The recommended 470pF external capacitor, which is connected to the OSC1 pin, is added to avoid cross-talk to the OSC2 line. The OSC2 pin is provided to supply an output frequency of 1/4 system frequency. However, if this 1/4 system frequency output, OSC2, is not utilized, the external capacitor on OSC1 pin can be omitted.
Question 14
Can a voltage higher than VDD be supplied to the VLCD pin of the HT49 LCD type MCUs?
Answer
A higher than VDD voltage supplied to VLCD pin of HT49 LCD type MCUs is permitted. However, the value chosen for VLCD should ensure that the highest LCD signal voltage is within the normal operating voltage range of 2.2V to 5.5V. Therefore for devices with R-type bias and C-type 1/2 bias, the VLCD supply voltage should be within 2.2V to 5.5V, while for devices with C-type 1/3 bias, the highest LCD signal voltage is 1.5 times that of the VLCD supplied voltage due to the internal charge pump, the VLCD supply voltage should be within 1.5V to 3.6V. Note that for low voltage Mask type MCUs, the V2 pin will be fixed to VDD as the LCD supply voltage. The highest LCD signal voltage will be 2 times of V2 voltage.
Question 15
How can I choose between COM3/SEG32?
Answer
When setting up the configuration options, if the LCD duty is 1/4 duty, then the COM3 option should be selected, otherwise the SEG32 should be selected.
Question 16
On the HT49 series of MCUs, when using R type biasing to supply
power to the LCD, then pulses appear on the VLCD. Will this
influence the running of the MCU, if so how can it be rectified?
Answer
An electrolytic capacitor can be placed on the VLCD pin to rectify the problem, if the VDD and VLCD voltages are the same, then a resistor can be placed between these two pins.
Question 17
In the HT49 series devices why is it not recommended to use an
RTCC range between 28-211?
Answer
If the 32678Hz RTC clock is selected by configuration options to be the system clock, then after waking up from a HALT condition special care must be taken in the RTC interrupt application software if the RTC
28 , 29 or 210 division ratios are chosen. When these ratios are chosen, because the system requires 1024 internal cycles before normal operation is resumed, any following RTC interrupts may be ignored.
Question 18
If a 32K crystal is connected to OSC3 and OSC4 on the HT49 series
devices what values of resistors and capacitors should be added?
Also if an RC oscillator is used as the 32K oscillator, what value
of resistor should be connected to OSC1?
Answer
If OSC3/OSC4 are connected with a 32768 crystal, it is not necessary to add additional resistors or capacitors. However it must be noted that the lines connected to OSC3 and OSC4 pins must be kept short and kept close to the MCU, or the 32768 crystal may experience difficulties in starting up. If the 32768 oscillator is to be used for accurate timing purposes, then capacitors can be added. If the times are found to be fast then the value of the capacitors should be increased, if the times are found to be slow then the values of capacitors should be reduced. The values of the capacitors should not exceed 10~30pF.
If an RC oscillator is used as the system oscillator it is not necessary to add a 32K crystal as the RC oscillator can provide a range of system frequencies between 400K and 4000KHz. It is not recommended that users exceed the parameters specified in the datasheet.
Question 19
What should be done to minimize power consumption in the HT49
series devices?
Answer
In order to minimize the power consumption, the following points should be taken into consideration:
-
Setup any unused I/O pins as outputs or as inputs with pull -high resistors.
-
Set the RTCC (QOSC) bit to 1
-
Ensure that the Halt mode is entered whenever possible.
-
Select C type LCD bias
Question 20
When an RC type clock is chosen as the system clock, how can the
actual frequency obtained from this RC clock be measured?
Answer
When the RC clock is chosen as the system oscillator, pin OSC2 will be configured as a frequency measurement output pin, which can be used to measure the actual frequency that is generated by the RC oscillator. This pin is designed to provide a signal that is equal to the system oscillator frequency divided by four. However it should be noted that because the OSC2 output is an open drain NMOS output structure, it is necessary to connect a resistor between this line and VDD.
Question 21
How to use the timer auto-reload function of Holtek MCUs?
Answer
If you wish to assign the timer a start counting value that will
be automatically reloaded after each timer overflow, the following
steps may be taken;
If you wish to change the start counting value, you may simply
save the new value to TMR, which will be loaded after the next
timer overflow.
Question 22
What should I do to use an external crystal during my program
development?
Answer
Firstly, in selecting the Options for SYSFREQ, keep the “Internal”
not checked which will let you use external clock source.
Secondly, insert the crystal into Y1 position on the Interface
Card, meanwhile make sure that the jumper JP1 is set to crystal.
Now you can use the external crystal during your program
development.
Question 23
When in the low power mode, how should any unused inputs be managed? Also, what is meant by a no load condition?
Answer
Any unused I/O lines could be setup as inputs, but a pull-high resistor must be connected to these inputs, otherwise these floating inputs may consume power. Another method would be to setup any unused I/O lines as outputs and set these lines to
a "0" level. A no load condition means that no connection is made to the I/Os. In this situation the only connections to the MCU are VDD, VS OSC1/OSC2 and RESB.
Question 24
In the HT49 series how can extended times be internally setup?
Answer
The RTC or the Time Base should be considered for use as the timer clock source. In both of these two cases, longer times can be implemented by the timer. As times are longer, corresponding errors may also increase. If the HT49R50A-1/HT49R70A-1 is used, both Timer 0 and Timer 1 can be used together to create a 16-bit timer in the case of the HT49R50A-1 or a 24 bit timer in the case of the HT49R70A-1. The datasheet should be consulted for operational details.
Question 25
How can the PFD output in the HT49 series of devices be used to
generate a 38 KHz carrier signal?
Answer
First the PFD function must be enabled in the in the configuration options. Then either Timer 0 or Timer 1 must be chosen as the clock source for the PFD output. By controlling the contents of the timer preset registers given here by n, the PFD frequency can be controlled. For a frequency of 38 KHz, the following formula can be used to calculate this n value:
fint/[2*(256-n)] = 38k Hz
To activate the PFD output the PA3 output data bit should be cleared to "0", to turn off the PFD output the PA3 output data bit should be set to "1".
Question 26
In the HT49 series of MCUs what is the correct way to change the
contents of BANK 1?
Answer
This can be done by using the MP1/IAR1 register pair to access the contents of BANK1. The Bank Pointer BP, must first be set to the value BP = 01H before MP1/IAR1 is used to access BANK1. It must be noted that within the HT49 series of devices, there are two memory pointers MP0 and MP1, which have corresponding Indirect Addressing Registers IAR0 and IAR1, which are used together as pairs: MP0/IAR0 (00H) and MP1/IAR1 (02H).
Question 27
When using the BZ/BZB function in the HT46/HT47/HT48/HT49 series
devices, the sound emitted is not loud enough, what can I do about
this?
Answer
The frequency generated on the BZ/BZB outputs should match the center frequency of the piezo-buzzer connected to these pins. Each different type of piezo-buzzer has its own center frequency. The MCU generated frequency must be as close to this as possible to achieve maximum volume from the buzzer.
Question 28
If I want to use the timer to wake up the system when in the HALT mode, I encounter the following problem. The Holtek datasheet says that after the HALT instruction is executed the system clock will be stopped, if this happens how can the timer be used to wake up the system?
Answer
When in the HALT condition, the system clock is stopped, so if the timer source clock originates from the system clock, the timer will also cease its counting function when the system enters the HALT mode. However if the timer clock source originates from another clock source such as the RTC, the timer will continue to function even when in the HALT mode. In this case when a counter overflow occurs, the system will be woken up if it is in the HALT mode.
Question 29
When using a Holtek MCU in a voice application, within the software I wish to use look up table data as follows:
| TABLE1: |
DC 0FFE1H,0FE32H,0FA34H,0FC78H |
|
|
DC 0FECDH,0FEDCH,0FE57H,0FD87H |
; 16bit table values |
Is it possible for Look up table data definitions of 16-bits to accept the format of data given in TABLE1?
Answer
The Holtek MCU range each contain different Program Memory widths, ranging from 14 bits to 16 bits. MCUs that contain 16 bit Program Memory widths can accept data as shown in TABLE1 above, however other MCUs can only define data tables that are either 14 or 15-bits wide.
Question 30
How can I use C language to place data into the LCD ram. Please give an example using the HT49R70A-1 as a sample device.
Answer
It is only necessary to use the int LCD_RAM[41] @0x140 statement.
This will define LCD_RAM to be at location 0x140 in Bank1 with 41 data locations. Then a C array method can be used to read and write. For more details consult the attached example program.
attached example:HT49R70A_1-LCDRAM.c
Question 31
How do I distinguish use of the Memory Pointers MP0 and MP1 in the HT49CU80/HT49RU80?
Answer
The indirect Memory Pointers within the HT49CU80/HT49RU80 are 8-bits wide and are used to interrogate the addresses they point to in the Data Memory. Memory Pointer MP0 can only used with Bank0 while Memory Pointer MP1 can be used with Bank0, Bank2 and Bank3 in addition to the LCD Display Memory, which is located in Bank1.
Points to Note
- Question 1
Are the HT49 LCD type MCUs available in Dice form?
- Question 2
In the HT-IDE3000, when using the HT49R50A-1 device, after choosing the configuration options, there is a message that says "Note: Be sure to choose the correct package". Why does this message appear?
- Question 3
What are the OTP dice programming steps for COB form?
- Question 4
I want to produce my products with an OTP dice form on board, how do I program those OTP dice devices?
- Question 5
What could be the reasons for low yield programming of OTP DICE devices?
- Question 6
When I use the HT-Writer to program the OTP Dice, an
"MCU: Cannot identify" message will pop up. Is this a bonding problem or an OTP defect?
- Question 7
What precautions should I take in designing the MCU Reset and Oscillator circuit?
- Question 8
When using a 3-pin resonator/crystal in my MCU application can the capacitor be connected to VDD instead of
VSS?
- Question 9
When using the MACRO assembly directive can I save Program Memory space? Also does it affect the MCU execution speed?
- Question 10
When writing my program, if I want to create a Table in Program Memory, how do I start my table at a specific address? If the ORG statement is not suitable are their other methods of implementation?
- Question 11
How can I use C language to read the serial number written into an OTP by the OTP writer?
- Question 12
When using the two counters in the HT49R50A-1/HT49C50-1 to measure pulse widths, if the T0ON flag changes from 1 to 0 during a TMR0 overflow, that is when TMR0 = 00H, then the value in TMR1 will have a value which is reduced by 1. How can this be rectified?
- Question 13
Can a single low frequency of 32768Hz be used as the sole frequency in the HT49 series of
MCUs?
- Question 14
For applications where the I/O pin connection to
the application circuitry is rather long, what external
protection measures should be taken?
- Question 15
How can I manage unused areas of program memory?
- Question 16
After compiling, how can I determine the amount of program memory area used by my program?
- Question 17
When using the R-type of biasing for the HT49 LCD type MCUs what is the value of the internal resistors that provide the divider function? (the value is not mentioned in the datasheet). In addition which type of biasing, R or C type uses the least power?
- Question 18
In the HT49XX-1 series of LCD MCUs, when the configuration options have selected 1/2 bias, can you explain is the VB voltage the same for C-type or R-type biasing? Also what are the differences between these two types of biasing?
- Question 19
When using the ICE, on the interface card at Y1, if I use a 32768 Hz crystal, it does not run. Why does this happen?
- Question 20
When connecting an LCD panel in my application, the LCD display does not function correctly and appears to flash. What is the reason for this?
- Question 21
Why does the interface card for the HT49RU80 not have an int pin?
- Question 22
What problems could occur if the VDD rise time is too long?
- Question 23
When combining the two Timer/Event Counter in the HT49R50A-1/HT49R70A-1 to form a 16-bit/24-bit counter, are there any special points to note?
- Question 24
In the HT49RU80, why is it, when using the JMP and CALL instruction, the instruction emulation has errors?
- Question 25
When using the ICE to emulate the HT49R10A-1, why after executing a SET BP instruction and using MP1 to write data to the LCD memory, there are errors?
Question 1
Are the HT49 LCD type MCUs available in Dice form?
Answer
Holtek provides a service to supply customers with high volume requirements for Dice Form MCUs. Available for the full range of devices it is important that customers take note of the special requirements of dice form devices for bonding and OTP programming.
Question 2
In the HT-IDE3000, when using the HT49R50A-1 device, after
choosing the configuration options, there is a message that says
"Note: Be sure to choose the correct package". Why does
this message appear?
Answer
This is to remind the user that there are different packages for the same device and that the correct package has to be chosen. This is because different package types have different numbers of I/Os and different numbers of LCD pins, therefore the appearance of this message is perfectly normal.
Question 3
What are the OTP dice programming steps for COB form?
Answer
-
Bond the dice to the COB
-
Program the dice on the COB
-
Conduct a COB functional test
-
Encapsulate the COB and afterwards solder the other devices
Question 4
I want to produce my products with an OTP dice form on board, how
do I program those OTP dice devices?
Answer
To program OTP devices, 11 pins are required and they should be reserved on the PCB. Please check your local agent for detailed information of those pins. Users should prepare the connecting cable from those 11 pins to the 40-pin TEXTOOL on the programmer and then follow the standard programming procedure to burn the device on the PCB. Note that the tracks of those 11 pins on the PCB should be as short as possible and among them the PA0~PA6 should avoid connections to the outputs of other devices. If this situation cannot be avoided, a 1K ohm resistor in series with each line is recommended. In addition, the cable from the PCB to the programmer should be less than 15cm.
Question 5
What could be the reasons for low yield programming of OTP DICE
devices?
Answer
Firstly, you should exclude bonding failure possibilities, as these are the major reasons for poor programming yield. If you are not sure whether there is a bonding issue, you may get assistance from our technical support personnel by sending us the decapsulated samples.
Question 6
When I use the HT-Writer to program the OTP Dice, an "MCU:
Cannot identify" message will pop up. Is this a bonding
problem or an OTP defect?
Answer
For the package form of OTP devices, its product ID will be burnt into the device which can be used to display the device information in the message window, however, if the product ID code is missing, a warning message will pop up. This is usually the case for dice form OTP devices which have no product ID. To disable this warning function, deselect the Check ID option under the Options menu. If the HT-Writer is to be used in stand-alone mode, set the switch DIP1, which is located on the back of the HT-Writer to the OFF position.
Question 7
What precautions should I take in designing the MCU Reset and
Oscillator circuit?
Answer
Please refer to the "HA0075E"
in the Application
Notes section of our company web site.
Question 8
When using a 3-pin resonator/crystal in my MCU application can the
capacitor be connected to VDD instead of VSS?
Answer
When using 3-pin resonator/crystals, for reasons of layout
convenience, the capacitor can be connected to VDD instead of VSS.
Question 9
When using the MACRO assembly directive can I save Program Memory
space? Also does it affect the MCU execution speed?
Answer
After the assembly process, all of the instructions belonging
to the MACRO will be written into Program Memory area, therefore
there is no influence on either the Program Memory space or on the
speed of execution. However as the code has been simplified
program maintenance will be easier.
Question 10
When writing my program, if I want to create a Table in Program
Memory, how do I start my table at a specific address? If the ORG
statement is not suitable are their other methods of
implementation?
Answer
When using the ORG expression, this can only be used to
indicate the offset from the start address of the present section.
To overcome this problem the SECTION directive can be used to
establish a table at any specific address, for example:
table .section at 300 'code'
This statement can be used to indicate the specific address
where the table should begin.
Question 11
How can I use C language to read the serial number written into an
OTP by the OTP writer?
Answer
When using the C language you must use inline assembly to read the IC serial number, which is written by the OTP writer. An example program is shown below:
First declare a variable to indicate a ram address.
unsigned long serial_num @0x80;
Then read out the serial number to this variable.
|
#asm
|
|
|
tblp equ [07h]
|
; define table address
|
|
mov a,20h
|
|
|
mov tblp,a
|
; set table pointer to 20h (series number at 20h of last page)
|
|
tabrdl [80h]
|
; load first byte of series number to series_num (0x80h);
|
|
inc tblp
|
|
|
tabrdl [81h]
|
; second byte of series number
|
|
inc tblp
|
|
|
tabrdl [82h]
|
; third byte of series number
|
|
inc tblp
|
|
|
tabrdl [83h]
|
; fourth byte of series number
|
|
#endasm
|
|
Question 12
When using the two counters in the HT49R50A-1/HT49C50-1 to measure
pulse widths, if the T0ON flag changes from 1 to 0 during a TMR0
overflow, that is when TMR0 = 00H, then the value |