Basic Information Functional Description Application Description Points to Note Others

Basic Information

 

Question 1

What's are the differences between the HT1380 and the HT1381 devices?

Answer

The two devices are functionally identical, only the package is different. The HT1380 is an 8-pin DIP package while the HT1381 is an 8-pin SOP package.


Question 2

What is the difference between the HT1380/HT1381 and the HT1382?

Answer

The differences between the HT1380, HT1381 and HT1382 are shown in the table below:

 

HT1380/HT1381 HT1382

Interface

3-Wire

I²C/3-Wire

Automatic Supply Switchover

No Yes

Clock Compensation

No Yes

Alarm and Interrupt

No Yes

Frequency Output

No Yes

User Data

No 4 Bytes EEPROM

Operating Temperature

0°C ~ 70°C -40°C ~ 85°C

Battery Supply Current

1.2µA (max.) @5V 1.2µA (max.) @3V

Package

HT1380:8 DIP I²C:8 DIP/SOP/MSOP
HT1381:8 SOP 3-Wire:10 MSOP

Functional Description

 


Question 1

When using the 12 or 24-hour mode data what points should be considered?

Answer

The main difference between the 12 or 24-hour mode is the way in which the hour register is controlled. The 24-hour mode is more simple as the data read out can be directly displayed. However using the 12-hour mode, after the data has been read out from the hour register, it must be processed. There are two status bits, bit 7 which describes the 12 or 24 hour mode and bit 5 which gives the AM or PM indicator for the 12-hour mode, which must also be processed. 


Question 2

Can the HT1380/HT1381/HT1382 operate independently without connection to an MCU? Can its oscillator run by itself?

Answer

No, the HT1380/HT1381/HT1382 must be used with an external MCU and accept commands from the MCU to enable the oscillator in the HT1380/HT1381/HT1382.


Application Description

 


Question 1

How can the timing errors within the HT1380/1381 be resolved?

Answer

The timing errors can be adjusted by examining the crystal error range and adding an external compensation capacitor. The following table gives some information but for the details the relevant datasheet should be consulted.

Crystal Error Capacity Value
+/- 10ppm 5pF
+/- 10~20ppm 8pF

If the mean error of the Crystal is +/- 10ppm, adding an external 5pF compensation capacitor will reduce the timing error to a minimum. However, due to variations in circuit layout, a slightly different value may be required. Therefore precise fine-tuning depends on the value of the compensation capacitor.


Question 2

In the HT1380, can the CLK and I/O lines be commonly used by other external devices?

Answer

In the HT1380, the REST line is used to select the device. When the RES pin is high, both read and write operations can be implemented to the device. When the REST line is low all operations to the device will be suspended. When this happens the CLK and I/O lines will be in a high impedance state and can therefore be used by other external devices.


Question 3

How can I implement the write control in the HT1380/1381?

Answer

There are two methods of doing this. For the Burst Mode, it is not necessary to point to an actual address, it is only necessary to issue the command word 10Basic Information0)after which you can directly specify the 0~8 register which can save time. For the Single Mode you can only specify a single register. For more details consult the datasheet.


Question 4

When the HT1380 device is running, why am I unable to see the oscillating waveform on a scope?

Answer

First you must ensure that you are scoping the correct pins to look for the waveform. The X1 pin on the HT1380 is the oscillator input pin, while X2 is the output pin. Therefore when using an oscilloscope to look for the waveform, the scope probe must be placed on X2. If the probe is placed on X1, not only will no waveform be seen, but also the oscillator may stop running. Additionally, because the 32KHz oscillating frequency is susceptible to outside influences, if the crystal is of a low quality or the scope probe is not ideal, then even when the X2 pin is probed, the waveform may not be visible, or in extreme cases the waveform may even stop. 


Question 5

Does the HT1380 timekeeper chip, when in the 12-hour mode, have its AM and PM crossover point at 12 o'clock? At the time of 11:59:59, if I enter 1001 0001b into the hour register (11 o'clock am), then after a few seconds when reading data from the hour register, the value of 1011 0010 (12 o'clock pm), is received and the time is 12:00:02 pm?

Answer

When the HT1380 is in the 12-hour mode, then 12 o'clock is the AM and PM crossover point. The A/P bit, which is bit 5, at 12 o'clock will change its state from 0 to 1 or from 1 to 0. 


Question 6

When clearing the CH and WP bits in the HT1380 device, and then writing in data, when data is read out, a value of 0FFH is always obtained. Why is this?

Answer

This condition means that the oscillator is not running and that the HT1380 is not operating. As well as checking the oscillator for correct operation the following point regarding the software should be noted. After the CH and WP lines are cleared, it is important to wait for a short period of time to allow the oscillator to start up and settle down. The actual time required depends on the PCB and on the crystal characteristics, but should not exceed about 3 seconds. 


Question 7

How can I manage the oscillation frequency discrepancies?

Answer

Read the time of the RTC register or measure the FOUT output frequency using the MCU to calculate the frequency difference and then compensate the value by programming the DTR according to the difference value.


Question 8

What are the frequency adjustment range and the accuracy of the HT1382?

Answer

The DTR (Digital Trimming register) configuration can decide the trimming method. The coarse trimming range is -192.276ppm to +192.276ppm with an accuracy of ± 3.052ppm while the fine trimming range is -64.071ppm to +64.071ppm with an accuracy of ± 1.017ppm.


Question 9

What are the methods for write operations using the HT1382?

Answer

There are two methods, a successive writing and single unit byte writing. The address of up to 0FH will then go back to 00H when using the successive writing method.


Question 10

What is the internal 4 bytes of EEPROM used for in the HT1382?

Answer

The internal 4 bytes of EEPROM provides flexible usage for the user with the advantage of data retention without a power supply. For example, to save the related oscillator characteristic data, such as the temperature coefficient (Qcoef), tuning temperature (TO), tuning point offset (XtalOffset) and so on. The MCU can read the temperature (T) detected by the system and calculate the frequency compensation value (COMP_val) according to the following formula, and then program the DTR register so as to compensate the frequency difference for the temperature variation of the crystal. (Please refer to the HT1382 Electric Clock- Calendar application.)
COMP_val=Qcoef×(T-To)²-XtalOffset


Question 11

Is it necessary to use external crystal load capacitors for the HT1382?

Answer

The HT1382 includes an internal crystal load capacitor, so there is no need to use external capacitors. As for the crystal, it is recommended to select a CL with a 12.5pF standard crystal for better oscillator frequency.


Points to Note

 


Question 1

How is possible to ensure that the oscillator will actually run?

Answer

It is important to ensure that the lines on OSC1 and OSC2 do not exceed 1cm in length, the shorter the better. It is also important not to touch the MCU during oscillator startup.


Question 2

When using a Holtek MCU with a 5V power supply together with a HT1380/1381 timekeeping device with a 3V power supply, what points should be noted?

Answer

The HT1380/1381 timekeeping device uses 3 lines to communicate with the MCU, which are CLK, DATA and RES. If the voltage levels of the two devices are not the same, then excessive currents will flow from the device with the higher supply voltage to the device with the lower supply voltage. For this reason if the I/O of an MCU operating at 5V, is directly connected to the to the lower voltage lines of the HT1380/1381, in the long term the HT1380/1381 may be damaged. For this reason, the outputs of the MCU should be connected to a voltage divider before being connected to the HT1380/1381.


Question 3

Is it possible to use a separate battery as the power source for the HT1380 instead of the system power?

Answer

Because the HT1380 I/O voltage levels must not exceed VCC by more than 0.3V, if the external lines interfacing to the HT1380 exceed the device supply voltage by more than 0.3V, the device may be damaged. Another problem is that as the battery voltage decays with use, the correct voltage levels may not be sensed resulting in erroneous behavior For these reasons it is recommended that a battery supply should only be used as a backup power supply and the system power supply used as the main device supply.


Question 4

What points should be noted for PCB layout using the HT1382?

Answer

The crystal should be as close as possible to the HT1382. Place a non-closed ground line around the crystal and connect it to the ground pin of the HT1382. Do not locate any ground lines behind the crystal or the HT1382 location to minimise any capacitance effects on the frequency accuracy.


Others

 

 


Question 1

How should I choose the required crystal oscillator tolerance?

Answer

The crystal oscillator's tolerance will determine the accuracy of the HT1380/1381. For example, if a 24 hour timer is required to have accuracy to within 1 sec, then as 24 hours is equal to 24*60*60=86400 seconds, this amounts to 1/86400=11.6ppm. In this case the crystal oscillator chosen must have a tolerance that is better than 11.6ppm. If the crystal tolerance cannot match these requirements, then another way to achieve this accuracy is to adjust the value of the externally connected crystal oscillator capacitors to compensate for any inaccuracies.