Basic Information Functional Description Application Description Points to Note Others

Basic Information

 

Question 1

What are the contents of the HT48XA Remote type MCUs?

Answer

Together there are a total of 10 devices in the Holtek Remote MCU series. Made up from different memory sizes of 1K, 8K, 24K and 40K, operating voltage range of 2.0V~3.6V and supplied in both OTP and Mask versions. They are known by name as the HT48RA0-2/ HT48RA0-1/ HT48RA1/ HT48RA3/ HT48RA5 and OTP type HT48CA0-2/ HT48CA0-1/ HT48CA1/ HT48CA3/ HT48CA5. The specifications and description of each device can be found in its relevant data sheet.


Question 2

What are the differences between the various devices in the HT48XA Remote Type MCUs?

Answer

Please check on the table below for the differences. For more detailed information consult the data sheet.
Part No. VDD System
Clock
Program
Memory
Data
Memory
I/O Timer Interrupt

IR
Carrier

LVR PFD Stack Package
8-bit 16-bit Ext. Int.
HT48RA0-2
HT48CA0-2
2.0V~
3.6V
400kHz~
4MHz
1Kx14 32x8 15 -- -- -- -- v v -- 1 20SOP,
20SSOP
HT48RA0-1
HT48CA0-1
2.0V~
3.6V
400kHz~
4MHz
1Kx14 32x8 17 -- -- -- -- v v -- 1 24SOP,
24SSOP
HT48RA1
HT48CA1
2.0V~
5.5V
400kHz~
8MHz
8Kx16 224x8 23 1 1 1 2 -- v v 8

28SOP,
28SSOP

HT48RA3
HT48CA3
2.0V~
5.5V
400kHz~
8MHz
24Kx16 224x8 23 1 1 1 2 -- v v 8

28SOP,
28SSOP

HT48RA5
HT48CA5
2.0V~
5.5V
400kHz~
8MHz
40Kx16 224x8 23 1 1 1 2 -- v v 8

28SOP,
28SSOP


Question 3

What is the operating frequency of the HT48XA Remote type MCUs?

Answer

For 2-cell battery applications the maximum operating frequency is 4MHz (2.2V).


Question 4

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.


Functional Description

 


Question 1

What are the special features and characteristics of the HT48XA Remote type MCUs?

Answer

Operating Voltage range of 2.0V ~ 3.6V with LVR (Typ. 1.9V)
Industrial standard temperature range of -40oC ~ +85oC
Support OTP and Mask Types
For further details consult the relevant Holtek data sheet.


Question 2

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 3

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 4

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 5

How is the 8-bit timer of the HT48XA3 MCUs 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 6

How is the 16-bit timer of the HT48XA3 MCUs 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 7

What is the access sequence of the 16-bit Timer/Counter of the HT48XA3 MCUs?

Answer

For the HT48XA3 Remote 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 8

When the 8-bit Timer/Counter clock is sourced from the Prescaler of the HT48XA3 MCUs, can the Prescaler be reset?

Answer

The Prescaler will start to count after a Power On Reset, so there is no means for the user to reset the Prescaler contents.


Question 9

How is 8-bit Timer/Counter of the HT48XA3 MCUs 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:

  1. Set to Timer Mode by writing 10H to TM1, TM0

  2. According to the user timer period requirements set the Prescaler by writing the appropriate values to the bits PSC2~PSC0

  3. Set the initial timer TMR value

  4. Enable the corresponding interrupt by setting the ETI and EMI bit

  5. Start the Timer by setting the TON bit of the TMR0C

Once the Timer is enabled, it will count up and will be stopped when the TON bit in the TMR0C 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 10

How is 16-bit Timer/Counter of the HT48XA3 MCUs setup in the Timer Mode?

Answer

There are three modes available for the 16-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:

  1. Set to Timer Mode by writing 10H to TM1, TM0

  2. Set the initial timer TMR value

  3. Enable the corresponding interrupt by setting the ETI and EMI bit

  4. Start the Timer by setting the TON bit of the TMR1C

Once the Timer is enabled, it will count up and will be stopped when the TON bit in the TMR1C 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 11

How is 8-bit Timer/Counter of the HT48XA3 MCUs 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:

  1. Set to Event Counter Mode by writing 01H to TM1, TM0

  2. Select TE=1 to count on the falling edge and TE=0 to count on the rising edge

  3. Set the Timer initial value into TMR

  4. Enable the corresponding interrupt by setting the ETI and EMI bits

  5. Start the Timer by setting the TON bit in the TMRC register


Question 12

How is the 8-bit Timer/Counter of the HT48XA3 MCUs 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:

  1. Set to Pulse Width Mode by writing 11H to TM1, TM0

  2. Select TE=1 to measure a High Pulse Width and TE=0 to measure a Low Pulse Width

  3. According to the Pulse Measurement width requirements set the Prescaler value  (PSC2~PSC0=n)

  4. Set the Timer initial value, TMR, usually set to 0H for Pulse Width Measurements

  5. Enable the corresponding interrupt by setting the ETI and EMI bits

  6. Start the Timer by setting the TON bit in the TMR0C

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 and the count value multiplied by 2 n+1 is the measured pulse width.


Question 13

How is the 16-bit Timer/Counter of the HT48XA3 MCUs 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:

  1. Set to Pulse Width Mode by writing 11H to TM1, TM0

  2. Select TE=1 to measure a High Pulse Width and TE=0 to measure a Low Pulse Width

  3. Set the Timer initial value, TMR, usually set to 0H for Pulse Width Measurements

  4. Enable the corresponding interrupt by setting the ETI and EMI bits

  5. Start the Timer by setting the TON bit in the TMR1C

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 and the value in the counter will be the pulse width measured.


Question 14

How is the Carrier Output Mode of the HT48XA0-2 and HT48XA0-1 setup?

Answer

To utilize the Carrier Output Mode, the following process should be followed:

  1. Set the PC0 as Carrier Output by configuration option.

  2. Set the Carrier Output Frequency by configuration option from the formula fCARRY = (fSYS / 4) / (mx2n), where m=2 or 3 and n=0~3.

  3. Set the Carrier Duty Cycle by confiruation option, if m=2, the duty cycle is 1/2, if m=3, the duty cycle can be 1/2 or 1/3.

After these steps are taken, set PC0=0 which will enable the Carrier Output. If set the PC0=1 will disable the Carrier Output at low level output.


Question 15

How is the PFD Mode of the HT48XA3 MCUs setup?

Answer

To utilize the PFD Mode, the following process should be followed:

  1. To implement the PFD function, the corresponding configuration option should be chosen

  2. Set the Prescaler (PSC2~PSC0=n) value and TMR0 initial value from the formula fPFD = (fSYS / (2n+1x(256-TMR0)x2))

  3. Start the Timer by setting the TON bit in the TMR0C

  4. Set PB.0 to be in Output Mode, i.e. PBC.0=0

After these steps are taken, set PB.0=1 which will turn on the PFD. If set the PB.0=0 will turn the PFD OFF.


Question 16

What are the system clock sources available for the HT48XA Remote type MCUs?

Answer

For the HT48XA Remote type MCU, there are two system clock resources available, namely:

  1. External RC Oscillator

  2. External Crystal Oscillator


Question 17

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 18

What is the difference between the HT48RA0A, HT48RA0-1 and HT48RA0-2devices?

Answer

The HT48RA0-1 and the HT48RA0-2 are new versions of the HT48RA0A device. The differences between them are described below:

  1. The working voltage of the HT48RA0-1 and HT48RA0-2 devices is 2.0~3.6V
    The working voltage of the HT48RA0A device is 2.2~3.6V

  2. The HT48RA0-1 and HT48RA0-2 devices have an LVR function
    The HT48RA0A does not contain an LVR function

  3. The HT48RA0-1 and HT48RA0A devices have 16 I/O pins
    The HT48RA0-2 has 14 I/O pins


Question 19

The HT48XA0-1/HT48XA0-2 have 62 instructions, but other MCUs in the Holtek range have 63 instructions. Why is there one less instruction for these devices?

Answer

The RETI instruction is not valid for these devices, because these MCUs have no interrupt function.


Question 20

When PC0 is used as a carrier output how is it controlled?

Answer

PC0 can be used as either a carrier output (REM) or as a normal I/O pin. If the REM function is selected, then when PC0 is set high the carrier output will be enabled. If PC0 is cleared to zero then the carrier output will be switched off.


Question 21

What is required to use PA as an input?

Answer

When PA is used as an input, before reading data on the input pin, the pin must be set to a “1” level. This is executed using the SET PA.i (i=0~7) instruction to inhibit the related NMOS output from outputting data. After this instruction has been executed, the MOV A, PA instruction can be used to read the data on the pin.

 


Application Description

 


Question 1

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 2

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 3

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 4

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 5

Why, when a wake up pin is low the device cannot wake up?

Answer

The wake up function is activated only the wake up pins on a low going edge. If the corresponding wake up 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 6

Why, when a low going edge is presented on the external interrupt pin the HT48XA3 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 EIF changes from "0" to "1". If when the MCU enters a HALT condition the EIF flag is already set to "1", then a further interrupt will have no effect on the status of the EIF flag, which will remain in its present "1" condition. As a transition a wake-up will not occur.


Question 7

Is it possible to disable the wake-up function of the external interrupt of the HT48XA3 MCUs?

Answer

If before entering a HALT condition the EMI is first cleared and then if the EIF bit is set to "1" the external interrupt will have no wake-up function.


Question 8

If the WDT oscillator clock of the HT48XA3 is selected how is the WDT timing calculated?

Answer

The WDT oscillator at an operating voltage of 3V has a typical period of 23ms. (Range of 11.5ms~46ms). The watchdog time is calculated from the formula: WDT period x 2(WS2~WS0)

For example if WS2~WS0 = 7H then the watchdog time will range from 11.5 ms x 27=1.47 sec to 46 ms x 27=5.9 sec.


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 Real Time Clock (RTC) function implemented?

Answer

First, the Internal RC Oscillator + RTC mode must be chosen, and an external 32768Hz Crystal connected to OSC1 and OSC2. Internally, the Timer/Counter should be selected to be in the Timer Mode with its clock sourced from the RTC OSC. This ensures that the timer keeps operating and generates a wake-up signal through an internal interrupt when in the HALT mode.


Question 11

For 2-cell battery applications (2.2V~3.8V), is the Low Voltage Reset (LVR) still available?

Answer

Yes, the LVR function can still be used. For the Holtek HT48XAX series of devices, there is a 2.0V LVR option, which can be used for applications such as remote controllers which use 2 batteries as their power source. This function can prevent errors from occurring in applications where the power can suddenly be cut off or drop to very low levels and then be suddenly reapplied. Such conditions may cause erroneous Power On Reset or latch up conditions to occur, which can be prevented by the LVR function.


Question 12

If the HT48XA Remote Type MCU is unable to meet the needs of my application, what other type of MCUs in the Holtek range would be suitable for Remote Controller applications?

Answer

Basically, any MCU that contains a PFD output would be suitable for Remote Control applications as its PFD output frequency could be setup to generate the carrier frequency that is required for remote control applications. The PFD features are available in many other Holtek MCU series, such as: the HT48X05/HT48X06, HT48X10/HT48X30/HT48X50/HT48X70, HT49X30/HT49X50/HT49X70, HT46X47/HT46X22/HT46X23/HT46X24 and HT47X20.


Question 13

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 14

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 15

As the HT48XA0-2 and HT48XA0-1 devices have no internal timer or internal timer interrupt how can specific times be determined for the transmitted signal?

Answer

The only way is to use instructions to provide delays. For applications that require very precise times it is recommended that higher crystal frequencies are selected.


Question 16

If the transmission range is too short what can be done to increase it?

Answer

The transmission range is too short because the carrier signal power level is too low. This can be remedied by reducing the value of the resistor between VDD and the transmitter IR LED. The value of resistor is normally between 1 and 2 ohms.


Question 17

What are the differences when using the I/Os on the HT48XA0-2, HT48XA0-1 and HT48XA1, HT48XA3, HT48XA5 devices?

Answer

The PA port on the HT48XA0-2 and HT48XA0-1 devices is the most simple port and is an NMOS type output or Schmitt Trigger input. When used as an input it is important to note that before reading the port the output should be set to a "1". To do this use the SET [m].i"(PA: 0~7) instruction to disable the NMOS output and then use the MOV A [m] instruction to get the input data.

The PA port on the HT48XA1, HT48XA3 and HT48XA5 is a more complicated CMOS type output or Schmitt Trigger input. Whether the port is used as an output or input is determined by the PAC special port control register. As an example if PAC.0 is equal to "1" then bit 0 of PA will be setup as an input, if PAC.0 is equal to "0" then bit 0 of PA will be setup as an output.


Question 18

Can the HT48 series of MCUs be used to implement an LCD driver?

Answer

Yes they can, but the implementation will be limited to 1/2 bias with pull-high and pull low resistors connected to the I/O pin. Three different voltage levels can then be obtained by setting up the pin as an output and setting it high, setting up the pin as an input, and setting up the pin as an output and setting it low.


Question 19

For household appliance applications, under what circumstances should the LVR function be used? Also under what circumstances should the LVR not be used?

Answer

The HT48XA series of MCU devices all contain a 2.0V LVR option. Under most operating conditions it is recommended that this option is selected. If selected this will prevent the device, under unstable power conditions, from appearing to be improperly reset.


Question 20

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;

  • Disable the TMRC.4 bit

  • Set the start counting value to TMR

  • Enable the TMRC.4 bit

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 21

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 22

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 23

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 24

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 25

How can I/Os be used to measure temperature?

Answer

The I/Os can be used in a charge/discharge circuit to measure temperature, however 3 I/Os are required, 2 outputs and one input. One of the outputs is connected to a reference fixed value resistor R1 while the other output is connected to a temperature dependent resistor R2. The other sides of these two resistors are connected together and also connected to a capacitor C1. The other end of the capacitor is connected to ground. The threshold voltage of the input is used to check the charge and discharge times of the capacitor. R1 is used as a reference to make corrections to the measured value of temperature made by R2. The measurement principle is: ΔT1=R1C1 ΔT2=R2C1 --> R2=ΔT2R1/ΔT1


Question 26

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 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

For applications where the I/O pin connection to the application circuitry is rather long, what external protection measures should be taken?

Answer

The I/O pins have Schmitt trigger inputs, also the inputs have protection diodes between the pin and VDD and VSS. As a result the noise rejection capabilities of the devices is high, however to reduce the possibility of noise interference yet further, it is recommended that a resistor is placed in series with the I/O pin.


Question 29

How is the value setup for the 9-bit timer in the HT48RA0-3?

Answer

The HT48RA0-3 9-bit timer is a count down timer. When the timer registers, TSR0 and TSR1 bits t0-t8, count down to zero, the timer will stop counting and bit TOEF will be cleared to zero.
Because the clock source for the timer is fSYS/64 the timer setup time = (timer initial value +1) x 64/fSYS.


Question 30

How is the carrier wave setup on the HT48RA0-3?

Answer

The carrier wave frequency and duty cycle in the HT48RA0-3 MCU is setup via two pairs of registers CARL0/CARL1 and CARH0/CARH1. The register pair CARL0/CARL1 are used to setup the width of the low level while CARH0/CARH1 are used to setup the width of the high level.
The following equation can be used to calculate the CARL0,CARL1,CARH0 and CARH1 values:
CARL = ( fSYS x (1 D)x T) 1
CARH = ( fSYS x D x T) 1
D: Carrier Wave Duty Cycle (0 < D < 1)
fSYS: System Clock in MHz
T: Carrier Wave Period in us


Question 31

When receiving the remote signal codes what method can be generally used?

Answer

There are many methods of receiving remote control codes. One common way is to use an I/O port examination method or to use the INT pin detection method. The differences between the two methods is that the I/O port examination method uses more MCU operational time resources as it requires continuous examination of the I/O port levels, in order so as not to miss any effective codes. By setting up a suitable timer interrupt to examine the I/O can reduce required resources and improve efficiency. The INT receive method will use less resources, and not does need constant monitoring. However the INT pin receive method will only be generated on a high or low going edge and cannot distinguish same period but different space ration waveform characteristics. Therefore only when the code carries a logic 1 or logic 0, can the INT pin generated interrupt, accompanied by the software or the timer interrupt, be used to determine the received codes.


Points to Note

 


Question 1

In the HT48XA0-2 and HT48XA0-1 series of devices when "0" is written to bit 7~6 of the memory pointer MP, when it is read out, why does it give a value of "1"?

Answer

The HT48XA0-2, HT48XA0-1 Data RAM address are located at the address range 20H~3FH. Because the data RAM capacity does not exceed 40H, a 6-bit memory pointer (Bit0~Bit5) is adequate. Reading bit 7 or 6 of MP will always give a value of "1" irrespective of what value has been written into it. If the value "20H" is written to MP it will be read back as "E0H" but in fact the actual address pointed to is "20H" which is correct for the indirect addressing operations.


Question 2

When in HALT mode why does the HT48XA3 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 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

Can the OTP program for the HT48RA0A body be directly written to the HT48RA0-1/HT48RA0-2 devices?

Answer

This is not possible for the following 2 reasons:

  1. In the HT48RA0-2, when PB is read, PB.6 and PB.7 are both 0, this is not the same as the HT48RA0A.

  2. The addresses of the OPTIONS in the HT48RA0-1/HT48RA0-2 is different from the HT48RA0A.


Question 9

For the HT48XA0-1/2 MCU devices, are their any differences in operation between the Mask devices and OTP devices?

Answer

For the HT48RA0-1/2 OTP devices, if the PC0/REM pin is to be configured as a standard I/O then some care has to be exercised. For the OTP devices, irrespective of the configuration option selection, after power on the PC0 line will default to a REM output and will remain low for a period of 50~80ms, until the configuration option data is read. After the configuration options have been read the PC0 output will default to a high level. As a result a low pulse will be generated on the PC0 pin. For the HT48CA0-1/2 Mask devices, after power on, the PC0 line will go immediately high. This is because the Mask devices do not need to read the configuration option data and therefore do not have the delay after power on associated with the OTP devices.


Question 10

When writing code for the HT48RA3 device, why is it only possible to utilize 8K of the 24K ROM memory and why do I keep obtaining a ROM-space limit exceeded error message?

Answer

The Holtek 8-bit MCU has defined 8K of memory as a single bank. If the application in question has exceeded 8K of memory then an error message will be received. To overcome this problem it is necessary for the programmer to divide the 24K of memory into 3 banks and construct the program accordingly as shown in the application program below:

include "ht48ca3.inc"

banknum1 

EQU 20h

banknum2 

EQU 40h

bankmask 

EQU 01fh

main .section at 00 'code'

start :

nop

nop

; clr banknum

mov a,bankmask

andm a,bp

; switch rombank to bank 1

mov a,banknum1

orm a,bp

call bank1proc

; clr banknum

mov a,bankmask

andm a,bp

;switch rombank to bank2

mov a,banknum2

orm a,bp

call bank2proc

nop

nop

jmp start

rombank 1 bank1

bank1 .section at 00 'code'

bank1proc:

nop

nop

ret

rombank 2 bank2

bank2 .section at 00 'code'

bank2proc:

nop

nop

ret 


Question 11

How can I manage unused areas of program memory?

Answer

In order to preserve program reliability, and prevent erroneous operation due to false jumps, it is recommended that unused area of program memory are written with a "JMP 00H" instruction. This has a machine code of 2800H. If this is done, should the program jump to an unused area of program memory, the program will return to the start address, which should ensure the prevention of erroneous operation.


Question 12

After compiling, how can I determine the amount of program memory area used by my program?

Answer

The .map file can be opened to see the ROM conditions. The .map file and the .prj file are in the same folder. If the file cannot be found, then before program compilation, under the Option Menu Command, select Project and ensure that the "Generate Map File" option has been selected. When the next compilation is executed the .map file will be generated.


Question 13

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 14

When using the CICE48C00CCF ICE to simulate the HT48XA1/XA3 everything runs normally, however when simulating the HT48XA5 device, the ICE does not operate normally, why is this?

Answer

This is due to the fact that the HT48XA5 device has a 40K X 16 Program memory capacity. For proper emulation the CICE48E000004A should be used.


Others

 


Question 1

What are the ESD and Latch up features of the HT48XA Remote type MCUs?

Answer

As the HT48XA Remote 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 2

Are the HT48XA Remote 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 3

What is the duration of the Power On Reset?

Answer

For the HT48XA Remote type MCU at 3V operating voltage, the Power On Reset time range is 45ms~180ms.


Question 4

When using different writer tools to program the OTP devices why are different checksums obtained?

Answer

This is because different methods of checksum calculation are used by different writers.


Question 5

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.