|
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.
Functional Description
Question 1
Can the HT1380/1381 devices be used independently without connection to an MCU?
Answer
The HT1380/1381 are unable to be used independently. They must be used in conjunction with a suitable MCU. Only by controlling them via the instructions of an MCU, can the oscillator function of the HT1380/1381 be enabled.
Question 2
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 3
When the HT13R90 is in the POR state what are the output conditions of the pins LED0/1/2?
Answer
When the HT13R90 is in the POR state, LED 0/1/2 should be in a tri-state condition and therefore show no output, a situation that will remain until the POR state has ended.
Question 4
When the RESET pin on the HT13R90 is low, what are the conditions of the output pins and does the oscillator continue to run?
Answer
When the RESET pin is low, the output pins will be in an inactive state. For example, for pins LED0/1/2, if connected to LEDs, then they will not be illuminated. Also the oscillator will stop running to reduce power.
Question 5
When the HT13R90 selects the internal RC as its oscillator, can OSC1 and OSC2 be used as I/O pins?
Answer
The internal RC oscillator, if used, will not free up pins OSC1 and OSC2 for use as I/O pins. They will remain in a floating state.
Question 6
Can external switches be used to select the operating mode of the HT13R90?
Answer
This is not possible. The HT13R90 operating modes can only be selected via configuration options. In the OMOD item, Mode 0 is the continuous mode, Mode 1 is the single period mode and Mode 2 is the single pulse mode. Once the configuration option has been selected and the device programmed, then the selected mode will be fixed and cannot be changed.
Application Description
- Question 1
How can the timing errors within the HT1380/1381 be resolved?
- Question 2
In the HT1380, can the CLK and I/O lines be commonly used by other external devices?
- Question 3
How can I implement the write control in the HT1380/1381?
- Question 4
When the HT1380 device is running, why am I unable to see the oscillating waveform on a scope?
- 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?
- 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?
- Question 7
When the HT13R90’s oscillator enters the standby mode, is it possible to maintain the oscillator condition?
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
When the HT13R90’s oscillator enters the standby mode, is it possible to maintain the oscillator condition?
Answer
This is possible. For most applications, the oscillator will stop running to reduce power. However in order to reduce the time required for the oscillator resume running, there is a configuration option to allow the oscillator to continue running when in the standby mode. In the OSCON configuration option either OSC turn on or OSC turn off can be selected.
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.
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.
|