• Based on IRIG-A code output subminiature GPS clock design - 51RD Chinese electronic net

    The abstract IRIG code is one kind of general international standard transmission code, widely applies between the common time-base signal equipment’s time correspondence. This clock design uses the micro controller, carries on the frequency measurement based on the GPS clock signal to the local crystal oscillator, and controls the IRIG time code according to the measurement result real-time time unit’s match counting value the output; Simultaneously the micro controller interior establishes a real-time temperature frequency meter, supplies in the GPS out-of-step situation to use. This system has the volume slightly, the auto-adapted handling ability strong characteristic.
    Key word IRIG-A code GPS LPC2132 frequency measurement

    Introduction

      In recent years, GPS (global positioning system) obtained the widespread application. GPS not only supplies the localization information, simultaneously also provides the high accuracy the time signal. In the earthquake observation system, the data acquisition installment has the extremely high request to the time, what at present uses generally is the GPS synchronization time service and the local clock is punctual unifies the means gain time information. Each equipment has own GPS receiver to use in the synchronized time service. This means that even if in a several hundred meter scope region, because each equipment locates the position different as well as various receivers performance is impossible completely consistently, between each other’s time information also still had certain error. If in the small area coverage, several data acquisitions simultaneously uses a GPS receiver synchronization time service, then may eliminate the above error, the time unified and the reliable performance has further enhancement. The IRIG code is the international general one kind of standard time transmission code. It not only contains the second mark information, moreover contains the absolute time information, already widely applied in the common time-base signal installment with the user receiving device between interface standard, enhanced has sent and received the end time the uniformity, the reliability.

    1 IRIG code form standard

      IRIG (Inter Range Instrumentation Group) the code, is called “the American target range instrument group code”, the receive GPS time encoding, transmits for distributes in the different place equipment, realizes between various equipment’s clock synchronization. This yard widely applies in common time-base signal equipment and so on missile, astronautics, telemetering, the implementation precision is high, stable.

      The IRIG code contains 100 elements, each element also has 3 kind of code patterns: Binary system 0, 1 and position identifier. Divides into 3 field codes: The 1st field for year (day, divides, second), the 2nd field for the control function function field, the 3rd field to use binary system second symbolic representation directly the day. Every 24 hours circulate 1 time.

      The IRIG serial code mainly has A, B, D, E, G, the H six kind of time formats, the main difference is the time encoding precision, the element speed and the binary time information figure is different. What actual is commonly used is A and B yard. A yard when frame period is when 0.1 s, B code the frame period is 1 s.

      Has used the IRIGA serial time code code in this design. The IRIG code divides into the cocurrent (DC) the code and the exchange (AC) the code. The DC code and the AC code element cycle is 1 ms. The DC code expresses the element with the pulse width, the pulse width 0.2 ms expression binary system 0, the pulse width 0.5 ms expression binary system 1, pulse width 0.8 ms expresses the position identifier or the reference element. The AC code is 0.1 ms Gao Fu and the low sine wave integer expresses the element with the cycle, the reference element or the position indication symbol with 8 Gao Fu and 2 low expressions, the binary system 1 uses 5 Gao Fu and 5 low expressions, the binary system 0 uses 2 Gao Fu and 8 low expressed.

    2 IRIGA code design

      The LPC2132 micro controller has 1 8 group 10 A/D switch and 1 10 D/A switch, 2 32 timer/counter (has 4 groups capture and 4 group comparison channels), the PWM unit (6 groups outputs) and the watch-dog, 9 borders or the level triggering external interrupt pin. The internal crystal oscillating circuit support frequency is 1~30 MHz. May realize high through internal PLL is 60 MHz micro controller operating frequencies. The PLL settling time is 100 μs.

      Uses LPC2132 and LEA4H in this design the GPS receiver composes a common time-base signal equipment’s transmitting end. The GPS receiver through the UART mouth, each second transmits 1 time to the micro controller the data, the 1PPS signal impulse turns on micro controller’s external interrupt EINT0. Periphery temperature sensor TCN75 gathering ambient temperature, and through the I2C main line temperature data transfer for micro controller. The second-order low-pass filtering electric circuit the profile which outputs to the D/A switch carries on the reshaping. The micro controller maintains a local clock counting, has the millisecond, the second, divides, day time, simultaneously time information according to IRIGA code form code. GPS clock circuit diagram as shown in Figure 1.


    Figure 1 GPS clock circuit diagram

      The micro controller examines the local crystal oscillator unceasingly according to the 1PPS signal the frequency, matches register’s match value according to the test result control. Micro controller internal 32 fixed time counter T0 to the local crystal oscillator frequency counting, has caught register CR0 to take off costume into the current counting value in 1PPS signal triggering; Match register MR0 uses in establishing IRIG the DC code profile the jump along with IRIG the AC code sampling point time, matches register MR1 to use in establishing the time cell signal. Software code design diagram as shown in Figure 2.

    2.1 crystal oscillator frequency measurement

      32 counter T0 has counted continuously. When 1PPS signal arrival, has the interrupt, catches register CR0 to load T0 current counting value CT1 and preserves; When immediately a 1PPS signal arrival, CR0 loads T0 counting value CT2, local crystal oscillator frequency for (CT2-CT1) or (CT1 232-CT2). Time T0 counting overflow situation.

    2.2 time information production

      The micro controller uses to the local clock’s counting has the millisecond, the second, divides, the day time information separately, and has established the millisecond, the second, divides, the day software counter. Match register MR1 basis crystal oscillator current frequency value establishment millisecond time match value. When matches, the millisecond software counter value adds 1. A millisecond counter counts 0~1000 ms the time, and in second time reset; The second, divides, the day counter mainly completes the second, divides, the day time. Because GPS receiver 1 s sends 1 data message, therefore to the local clock’s synchronized precision is 1 s, because below the second will possibly have the error, therefore the micro controller must carry on the clock difference survey, will carry on the comparison the local clock time information and the GPS time information. Both the difference is bigger than 1 s, direct revision local time information. If local times quickly, adjusts the millisecond counter counting metre the slow spot, namely the MR1 millisecond time’s match value establishment is big; Otherwise, adjusts the metre the quick spot, until erroneous minimum.
           
                    Figure 2 software code design diagram

    2.3 DC code code output

      Match register MR0 controls the DC code profile the turn over. Because has known 32 counter T0 and the 1PPS relations, therefore may act according to the output element the pulse width determination jump along the time counting value. In fact, so long as the time information which withdraws transforms into IRIGA the form, may (1) determines 1 element pulse width according to the type the jump along the counting value. In order to cause the output the element to be prompt, to be accurate, may to match the register reads in the next jump along the counting value ahead of time, namely when CTX value match initializes the CTY value, as shown in Figure 3. TX time correspondence counting value CTX:

     In the formula TX unit is μs.
                 

    Figure 3 the IRIGA code produces schematic drawing

    2.4 AC code code output

      The AC code’s each sine wave sampling 16 spots, between various consecutive points’ sampling time gap is equal, the 1st spot and the 17th spot sampling time gap is 1 ms. The AC code (Gao Fu and low sine wave sampling time is the same with the height sine wave integer expression, corresponding time peak-to-peak value is the former for the latter’s 3 times), and saves the sine wave sampling point the table. Table 1 stores the high sine wave data, Table 2 stores the low sine wave data. In the internal memory, Table 1 and Table 2 entry point addresses are different, the local address is completely same, when addressing, so long as jumps to the corresponding entry point address, the following table look-up way completely is consistent. Table look-up time by match register control, when table look-up sends in the D/A switch the data, as shown in Figure 4. In the D/A switch out-port, meets separates the straight electric capacity and the low pass filter reshaping output, simultaneously matches the frequency continual readjustment which register’s match value still needs to act according to measured.


    Figure 4 IRIG-The AC code has the schematic drawing

      Software design flow like chart 5 and shown in Figure 6.
                         

    Figure 5 the reference time has the flow


    Figure 6 the IRIG-A cocurrent and the exchange code have the procedure flow

      If GPS out-of-step, then the 1PPS signal will not be able to use in the crystal oscillator frequency the survey. The crystal the temperature frequency characteristic and the aging and so on each kind of factor’s influence, will occur the short-term or the long-term drift of frequency. In order to enable the output the IRIGA code still to have the high accuracy, solution was establishes a temperature frequency meter in the interior, through real-time table look-up determination current crystal oscillator frequency. When the GPS synchronization, the micro controller uses 1PPS signal continual readjustment counting value CT1, CT2, simultaneously using temperature sensor gathering current operating temperature T, may according to 0.5° a temperature step difference arranges in order one [T; CT2CT1] temperature frequency meter. So long as the GPS synchronization, this temperature frequency meter unceasingly is renewing, guaranteed that this table is real-time available; Once the GPS out-of-step, the micro controller table look-up, may look up current frequency value f, according to the type (1) determined that TX the time correspondence counting value CTX and determined the AC code the table look-up time, guarantees the IRIGA code output the continuity and the high accuracy.

    Conclusion

      This design has realized IRIGA the DC code and the AC code code output, two kind of codes may according to the actual need choice use. The DC code and the AC code mainly complete by the software. In the programming process, the micro controller examines the local crystal oscillator unceasingly the frequency. When GPS synchronization, calculates the frequency value with the 1PPS signal, the obtained frequency value is very accurate, simultaneously presses the temperature address to save the table; When GPS out-of-step, the micro controller looks up the temperature frequency meter, similarly can also obtain has certain accuracy frequency value. According to the local crystal oscillator frequency may the accuracy control IRIG code output. This design’s actual electric circuit volume is small, the power loss is low, when the GPS synchronization has the very high output precision, may reach μs the magnitude, but when the GPS out-of-step outputs also has the high precision; Simultaneously may choose nimbly uses the DC code and the AC code output, has the high application value.

    Reference
    the [1] week renders meritorious service, opens China, and so on. Explains the profound in simple language ARM7 LPC213x/214x. Beijing: Beijing University of Aeronautics and Astronautics Publishing house, 2005.
    [2] Li Hongtao, and so on .GPS application programmings. Beijing: Scientific Publishing house, 2000.
    [3] Ma Hongjia, Hu Yonghui. GPS&IRIGB code time system analysis. Electronic technology, 2005.
    [4] thanks from US. The electronic circuit designs g to test the g test. The 2nd edition. Wuhan: Huazhong University of Science and Technology publishing house, 2000

    Share/Save/Bookmark

No comments yet.

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

TOP
Copyright © 51 Research and Design, Electronic Engineers website - Embedded Systems, MCU, DSP, EDA, Test and Measurement, Components, Communications, Power, Microelectronics, Semiconductors
Powered by WordPress | Theme by mg12 | Valid XHTML 1.1 and CSS 3