• Monolithic integrated circuit control real-time clock X1226 application design

    Introduction
        X1226 has the clock and the calendar function, the clock relies on, divides, a second register to track, the calendar dependence date, the week, the month and the year register tracks, the calendar may through 2099, have the automatic leap year revision correctly.
        Has the formidable double warning function, can establish to any clock/calendar value, the precision may arrive at ls. The available software establishes in 1 Hz,4096 Hz or 32768Hz the random frequency output.
        This component provides a backup battery input foot VBACK1 permission component supplies power with the battery or the large capacity electric capacity backup. Many battery types can use to make Xicor Corporation real-time clock component X1226 the backup battery, 3.OV or the 3.6V lithium ion battery are more suitable, the life is 10 years. Other one usage may choose a large capacity electric capacity, from the backup time sustainable several days to two weeks, the time length relies on the electric capacity capacity size. Connects Vcc and the charge electric capacity’s both sides with simple silicon or the Short base diode, charges the electric capacity to connect the Vback pin, pays attention cannot use the diode to charge to the battery (is specially lithium ion battery). Cuts the battery power supply the condition is Vcc=Vback-O.1V, normal operation period, power line voltage Vcc must be higher than the battery voltage, otherwise the battery capacity will exhaust gradually.

        The oscillator needs the crystal, uses external connection 32.768kHz the crystal. Produces the vibration error might through the software to the digital trimming register, the simulation trimming register’s value carry on the adjustment to revise, has avoided the external connection resistance and the electric capacity leaves the divergence to the precision the influence.
        The component may provide 4Kb the EEPROM,8 block to lock the control. May serve as the memory which the massive user data saves, has the security, the secrecy. This memory’s data when the main power source and the emergency power supply all expire not affected.

    1 electric circuit composition and principle of work
        Real-time clock component X1226 may with each type micro controller or the microprocessor connection, the connection way be the serial I2C connection. And data bus SDA is a bidirectional pin, uses in inputting or the output data. It is a drain electrode opening output, needs to increase in the use process on pulls the resistance, the resistance number approximately in 4.7Ω~10kΩ between. This article introduces the 89C5l monolithic integrated circuit and the X1226 connection method, because the 89C51 monolithic integrated circuit does not have the standard I2C connection, only then carries on the simulation with the software. 
        To see intuitively the time change, uses eight LED nixietubes to demonstrate year, month, date either, divides, a second transformation, the LED nixietube actuation uses this company innate product PS7219A, the nixietube chooses the 1.27cm common cathode red or the green LED nixietube. Because the PS7219A component contains the IMP810 monolithic integrated circuit monitoring component, the replacement outputs the high level to be effective, therefore when uses 51 systems, does not need to increase the monitoring component, uses PS7219The replacement output to reposition for 51 monolithic integrated circuits then, monitoring voltage 4.63V. Hardware design schematic diagram as shown in Figure 1. 

        In the hardware circular telegram debugging process, please do not use the hand to touch real-time clock X1226 the crystal, will like this possibly cause the blocking of oscillator. Those who restore the oscillator starting of oscillation the method is closes the power source (including backup battery) on the electricity seperately to need to explain again, when surveys the oscillator, please do not use oscilloscope’s probe head to survey X2 the oscillator output, the correct method is surveys PHz/IRQ with the probe head the oscillator output, by determined whether starting of oscillation and oscilation frequency to be whether accurate. When survey suggested that in this foot adds 5.lk OMEGA on to pull the resistance.
        Attention: When the printed circuit designs, the xl226 wiring please refer to the X1226 data book the factory recommendation method.

    2 software designs
        X1226 by real-time clock register (RTC), condition register (SR), control register (CONTROL), the warning register (Alarm0, Alarml) and the customer data-carrier storage is composed. Because real-time clock register (RTC) and condition register (SR) needs to carry on frequently writes the operation, therefore its memory structure for the volatility SRAM structure, this structure to writes the operation the number of times not to limit. Other register structure is the non-volatility EEPROM structure, this structure to writes the operation to have the number of times limit, usually above 100,000 times. X1226 initialization routine flow as shown in Figure 2.

    Start condition subroutine:
        SETB     SDA
        LCALL    YS4
        SETB     SCL
        LCALL    YS4
        CLR      SDA
        LCALL    YS4
        CLR      SCL
        LCALL    YS4
        RET
    Stop condition subroutine:
        CLR      SDA
        LCALL    YS4
        SETB     SCL
        LCALL    YS4
        SETB     SDA
        RET
        Note: The subroutine YS4 function is the time delay 4μs.
    2.1 write the operation
        After X1226 initialization operation, the monolithic integrated circuit carries on to X1226 starts the condition establishment, before writing CCR or EEPROM, the main engine must write 02H first to the condition register, confirms the answering signal, confirmed, reads in 06H, then confirms the answering signal. After the confirmation, started has written the operation. First transmits the high address, then transmits the low address. After Xl226 receives an address byte every time, will produce an answering signal. After two address bytes receive, X1226 waits for 8 bit data. After receiving 8 bit data, X1226 has a reply again. Then the monolithic integrated circuit through has a stop condition to terminate the transmission.
        Xl226 has reads in the function continuously, X1226 after receiving each byte, responds a reply, its interior adds the address one. When the counter achieves this page end, it automatic “returns” to this page first address. This means that the monolithic integrated circuit may start from some page of any position to the memory array to read in 64 bytes or reads in 8 bytes continuously to CCR continuously.
        Reads in the Xl226 data subroutine:

           MOV        R5,#8

    SENDI:MOV        A, DATASE
           RLC        A
           MOV        DATASE, A
           MOV        SDA, C
           SEB        SCL
           LCALL      YS4
           CLR        SCL
           LCALL      YS4
           DJNZ       R5, SENDl
           RET
    2.2 read the operation
        When on electricity, 16 bit address’s default value is 0000H. After X1226 initialization operation, the monolithic integrated circuit carries on to X1226 starts the condition establishment, before writing CCR or EEPROM, the main engine must write 02H first to the condition register, confirms the answering signal, confirmed, reads in 06H, then confirms the answering signal. After the confirmation, started has written the operation. First transmits the high address, then transmits the low address. After Xl226 receives an address byte every time, will produce an answering signal. The monolithic integrated circuit transmits another to start the condition, the R/W position establishment is l, then receives 8 bit data. When the monolithic integrated circuit termination reads the operation, does not need to wait for that X1226 the answering signal, the monolithic integrated circuit then establishes the stop condition.
        Reads out the X1226 data subroutine:

           MOV       R5,#8
           MOV       DATARE,#0
           SETR      SDA
           CLR       C
    READl:SETB      SCL
           LCALL     YS4

        MOV C, SDA
        CLR SCL
        MOV A, DATARE
        RLC A
        MOV DATARE, A
        LCALL YS4
        DJNZ R5, READl
        RET
    2.2 X1 226 unique oscillator frequency online compensation adjustment function
        Xicor Corporation integrated the oscillator compensating circuit on the X1226 chip, this causes the user through the software, but online carries on the trimming to the oscillator frequency, this kind the trimming which carries on to the oscillator frequency usually aims at two kind of situations. One kind of situation is under 25℃ the normal temperature, because the component initial precision brings to the frequency departure which the oscillator carries on the compensation; , because the second kind of situation is causes carries on the compensation to the drift of frequency which the temperature. The X1226 interior is equipped with digital trimming register (DTR) and simulation trimming register (ATR), two registers are the non-volatility register. Digital trimming register (DTR) has three digital trimming position, regulation band 130 ppm~ 30ppm. Simulation trimming register (ATR) has six simulation trimming position, regulation band 116ppm~-37ppm.

        For can cause to the external environment temperature change floats warm carries on the compensation, requests in the system to design a temperature sensor, and lets it approach real-time clock component X1226 as far as possible, like this may reflect really oscillator’s temperature, schematic diagram as shown in Figure 3. The monolithic integrated circuit first through the system temperature sensor gain ambient temperature, and gains the corresponding compensation value in the compensation parameter list, then the offset data will fill to the corresponding trimming register, can realize floats warm the compensation goal.

    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