• Monolithic integrated circuit’s in baudrate converter application

        In some complex systems, the system and the subsystem, the subsystem and the equipment between and so on have the data the transmission question, often uses the correspondence the way to solve. Because the subsystem, has not prepared and so on correspondence baudrate differences, specially some special baudrate equipment’s existence, causes in the system mutual correspondence between equipment’s not to be easy to realize. For example, in a system, the superior machine receive some equipment’s data, as shown in Figure 1, what equipment l and the equipment 2 use is 172.8 kbps baudrates, but the superior machine programs with VB, its correspondence baudrate is 115.2 kbps, 128 kbps or 256 kbps, and so on, between such equipment cannot correspond mutually, brings the difficulty to the design. In order to solve the above problem, uses the double monolithic integrated circuit electric circuit, has designed the baudrate converter, will receive the baudrate will be 172.8 kbps data, transforms the baudrate is 115.2 kbps outputs, thus causes between the different baudrate equipment’s correspondence possibly to become.

    1 baudrate transfer network
        Baudrate transfer network as shown in Figure 2. The electric circuit uses 2 piece of monolithic integrated circuit 89C5l to take electric circuit’s core, uses monolithic integrated circuit’s UART serial port and the related equipment correspondence. Monolithic integrated circuit u1_L. (meets baudrate low equipment) with the baudrate is 115.2 kbps equipment correspondences, monolithic integrated circuit U2_H (meets baudrate high equipment) and the baudrate is 172.8 kbps equipment correspondences. Ul_I, selects the parallel mouth method with the U2_H correspondence, speeds up Ul_I. With U2_H between data transfer speed. U1_L and the U2_H correspondence may use interrupts the inquiry the way, may also use the handshake inquiry the way to carry on the data transfer.

        The electric circuit uses 2 piece of 75176 connection actuation chip to compose a RS-422 correspondence connection. U3 and the U4 composition’s correspondence connection is connected with 115.2 kbps equipment, U5 and the U6 composition’s correspondence connection is connected with 172.8 kbps equipment, the correspondence connection uses interrupts the technology. The baudrate converter principle of work is as follows: U1_I. Receives equipment’s data after the serial port, from the Pl mouth output data, and informs the U2_H fetching, U2_H to take the data backward equipment to send out the data, simultaneously informs Ul_I. to take the data, is U1 L next output data prepares. When U2_H receives equipment’s data after the serial port, inquires U1_I, whether to permit the receive data, if the permission receive data, U2_H from the P1 mouth output data, and informs the Ul_L fetching, Ul_L takes the data backward equipment to send out the data, simultaneously informs U2_H to take the data, is the U2_H next output data prepares; If Ul_L does not permit the receive data, then U2_H postpones to deliver the number.

    2 baudrate converter’s application
        The baudrate converter in the application, may divide into the unidirectional transmission and the bidirectional transmission according to the service condition. Between two monolithic integrated circuit’s data transfers may use the interrupt mode. May also select the inquiry method. If selects the inquiry method, when programming uses the P2 mouth several achievement inquiry signal, realizes unidirectional or the bidirectional transmission.

    2.1 unidirectional transmissions
        The unidirectional transmission is passes the data stream unguardedly only to a direction, namely receives from Ul_L to data, transmits from U2_H, or receives from U2_H to data, transmits from Ul_L. Carries on the software programming with this way to be quite simple. Presently only receives the external instrumentation data by U1_L, U2_H only to the external instrumentation transmission data, selects the inquiry method is the example, between two monolithic integrated circuits data transfer’s flow chart as shown in Figure 3. And Ul_L P2.2 takes to U2_H transmits the recent data the inquiry signal (U2_H P2.5), P2.2= “0″ the expression has the recent data, P2.2= “1″ the expression not recent data; The U2_H P2.2 achievement receives the U1_L data the inquiry signal (U1_L P2.5), P2.2= “O” the expression may receive the recent data, P2.2= “1″ the expression cannot receive the recent data. If uses the interrupt mode, two monolithic integrated circuit’s inquiry signals are simpler, so long as Ul_L inquires U2_H whether can receive the data the signal to be possible, U2_H does not need to inquire the U1_L inquiry signal.

    2.2 bidirectional transmissions
        The bidirectional transmission is passes may the simultaneous reception data and the transmission data, the data stream be unguardedly bidirectional, Ul_L and U2_H already receive the data also to transmit the data. This way software programming is quite complex, specially the bidirectional transmission data selects when the inquiry method. Between monolithic integrated circuit’s inquiry signal was more complex. Presently take the bidirectional inquiry way as the example, between two monolithic integrated circuits data transfer’s flow chart as shown in Figure 4, the U2_H flow and U1_L are the same. And U1_L is the same to the U2_H transmission data’s time inquiry signal and the unidirectional transmission’s definition, U2_H P2.3 takes to U1_L transmits the recent data the inquiry signal (U1_L P2.4), P2.3= “0″ the expression has the recent data, P2.3= “l” the expression not recent data; The Ul_L P2.3 achievement receives the U2_H data the inquiry signal (U2_H P2.4), P2.3= “O” the expression may receive the recent data, P2.3= “1″ the expression cannot receive the recent data. If uses the interrupt mode, inquires the signal to be possible to reduce, the programming may simplify.

    time 2.3 application matters needing attention
        Between if two monolithic integrated circuit’s handshake ways use the interrupt, because U2_H receives the exterior data to the exterior transmission data U1_L to be quicker than, when Ul_L to U2_H transmission data, does not need to consider U2_H the condition, but U2_H to U1_L transmission data time, because U2_H receives the exterior data to be quicker than U1_L to the exterior transmission data, U2_H must inquire the Ul_L condition, namely U1_L whether to be at receives the U2_H data the condition, otherwise, U2_H cannot to the Ul_L transmission data.

        If as the RS_485 correspondence connection use, only need the electric circuit make the modification slightly to Figure 2, increases to 75176 chip read-write controls, simultaneously in two monolithic integrated circuits takes the main engine with the main communication facility connected monolithic integrated circuit, is coordinated two monolithic integrated circuits through P2 mouth’s is receives the data or transmits the data.

        It is noteworthy that this baudrate converter will receive certain limit in the different application, when use must pay attention to the following several points:①When the baudrate is very high, must consider whether the monolithic integrated circuit serial port does realize;②When from baudrate high to baudrate low transformation, must consider whether the baudrate low monolithic integrated circuit does realize does not lose the data the transmission;③When bidirectional transformation, must consider the above situation, but also has the consideration procedure size, as well as does the execution time to the bidirectional transmission data’s influence, whether calculate two monolithic integrated circuits to realize does not lose the data the transformation, must leave leeway the remainder in the time;④When inquiry, must pay attention to the handshake signal the relations, do not have the redundant read to the identical data, data redundancy;⑤When the baudrate is different, the monolithic integrated circuit may select the different crystal oscillator frequency.

    2.4 examples and source program

        In actual use, if bumps into the situation which as shown in Figure 1, needs the baudrate converter to lead the slope is especially the 172.8kbps correspondence data conversion baudrate is 115.2kbps, again to superior machine transmission. Actual use’s electric circuit as shown in Figure 2. In this example, to prevent the partial time receive data compared to transmit the quick obliterated data, in the U2_H monolithic integrated circuit’s procedure, joined 8 data areas to take the receive data depositing buffer again.

     

    3   Conclusion

        Through the long time’s correspondence experiment and the practical application, the design baudrate converter plan is feasible, the correspondence is reliable, has not presented the data missing the situation. In some systems, because the correspondence baudrate is special, corresponds when the equipment the existence baudrate does not match, through the baudrate converter, may realize between the different baudrate equipment’s correspondence. Through changes monolithic integrated circuit’s crystal frequency inspiring rate, may satisfy each kind of baudrate (in monolithic integrated circuit permission scope) transformation.

    Share/Save/Bookmark

    Thursday, September 18th, 2008 at 14:27
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