• UART multi-serial port expander SP2338DP and application

      Abstract: SP2338DP is one kind of novel serial port expander, may a high baudrate UART expansion be 3, has solved the ordinary monolithic integrated circuit UART serial port too few problems. In the article gives this component’s principal characteristic, the pin to explain and the application explained that and gives the multi-serial port expansion application electric circuit and the corresponding software take at89C52 monolithic integrated circuit as the example.

        Key word: UART serial port expansion monolithic integrated circuit

    1 outline

    Presently, emerges unceasingly take the monolithic integrated circuit as the core constitution’s intellectualized observation system and the electronic products, to satisfy the digitization and the intellectualized request, many peripheral circuit functional module, the part, the component and the sensor have also had the UART serial port correspondence function. But present stage 8, 16, 32 monolithic integrated circuits actually majority of only provide a UART serial port, is very like this difficult to satisfy in the system, on the one hand must with have the UART function serial port part correspondence, on the other hand must with the superior machine correspondence request. Using the SP2338DP multi-serial port expander, may solve this problem well.

    2 operational factors

    SP2338DP is uses low power loss CMOS the technological design the UART multi-serial port expansion chip. This component may a high baudrate UART serial port expansion be 3 high baudrate UART serial ports, thus needs time many serial ports for the system has provided the very good solution. This component’s principal characteristic is as follows:

    * may 1 UART serial port expansion be 3 UART serial ports.

    * full-duplex asynchronous work: 4 UART serial ports for full-duplex asynchronous working pattern.

    * the senior engineer makes the speed: 1200~9600b/s (may establish willfully non-standard baudrate by crystal oscillator frequency).

    * the baudrate establishment is simple: Does not need the software establishment, only need change the input clock frequency then.

    * the baudrate error is small: Each serial port’s data output baudrate error is smaller than 0.25%.

    * the receive baudrate scope is wide: Requests each serial port data baudrate is smaller than 2.5% then.

    * the data transmission error rate is extremely low: Is smaller than 10 -9 (receive data baudrate error is smaller than time 2%).

    * has the electricity saving pattern: After entering the electricity saving pattern, typical quiescent current for 0.5μA.

    * may awaken automatically: The random serial port’s receiving end has the data to appear time awakens automatically.

    * wide work supply voltage: 2.4~5.5V.

    * low operating current: The model operating current is 4.4mA.

    3 seals and pin explanation

    This component has DIP, SOIC and the SSOP many kinds of seal forms. Below take the DIP seal form as an example, gives part’s seal and the pin arrangement, as shown in Figure 1. The pin function and showing see Table 1.

    Table 1 SP2338 DIP pin function

    Name  Serial number  Type 

    Tracing    Station

    ADRI0 18 I Serial port 3 receive data address wire 0
    ADRI1 17 I Serial port 3 receive data address wire 1
    ADRO0 1 O Serial port 3 transmission data address wire 0
    ADRO1 2 O Serial port 3 transmission data address wire 1
    RX0 8 I Serial port 0 data receives
    TX0 9 O Serial port 0 data transmissions
    RX1 11 I Serial port 1 data receive
    TX1 10 O Serial port 1 data transmission
    RX2 13 I Serial port 2 data receives
    TX2 12 O Serial port 2 data transmissions
    RX3 6 I Serial port 3 data receives
    TX3 7 O Serial port 3 data transmissions
    OSCI 16 I Clock input
    OSCO 15 O The clock outputs
    VCC 3,4,14 - Positive electricity source
    GND 5 -

    4 using explanation

    SP2338DP when use should follow the following principle:

    ①SP2338DP is suitable in the serial data is 8 application domains (for example data position 7 is a position, may select the SP2337DP component);

    ②The serial port 0~2 are the high baudrate serial port (sub-serial port).

    ③The serial port 3 for the high baudrate serial port (female serial port), its data transfer rate are sub-serial port 4 times. If input clock frequency foscin is 10MHz, then the serial port 3 baudrates are 19 200bps, the serial port 0~2 baudrates are 19 200bps/4=4800 bps; If needs on 0~2 to obtain baudrate K in the serial port, then must according to the below formula change clock rate then.

    K=4800×foscin/10(bps)

    And foscin≤20MHz

    ④ADRI1, ADR10 are the downward address wire, ADRI1, ADRI0=00, 01, 10:00, when separately corresponds sub-serial port 0, 1, 2, ADR1, ADR0=11, is the serial port 3 addresses; At the same time, it is also the SP2338DP order/data mouth address.

    ⑤ADRO1, ADRO0 are the upward data serial port address wire, ADRO1, ADRO0=00, 01, 10:00, corresponds the sub-serial port separately 0, 1, 2. when superior machine UART receives the data which 3 transmits by the serial port, reads address wire ADRO1 and the ADRO0 condition immediately. Then judge the data which serial port according to ADRO1 and does the ADRO0 condition is transmits by.

    ⑥The chip awakens the condition is: Reads in 1 byte data to the serial port 0~ serial port 3 random data receive port. Because SP2338DP awakens the time is about 25ms, will therefore use in the data which the chip will awaken not being able to receive correctly, therefore should use the following chip to awaken the flow; Transmits 1 byte data first, uses in awakens the chip, after time delay 25ms, transmitting the effective data again.

    ⑦To transmit the batch data reliably fast, may use the following method, realizes the data fast reliable receive, the transmission.

    If the superior machine only needs to a serial port transmission data, then may transmit 1 byte data after this serial port 11 (serial port 3 addresses) transmits 4 bytes continuously again to the address “0X00″. After that to needs to transmit the data the serial port to transmit 1 byte data, 3 transmits 4 bytes again to the serial port “0X00″, according to this way circulation transmission then.

    If this position with must transmit two block data separately to two serial ports, then may transmit 1 byte separately after two corresponding sub-serial ports the data 3 transmits 4 bytes again to the serial port “0X00″, then transmits separately two block data’s next byte to two sub-serial ports on.

    If the superior machine has 3 block data to need separately to 3 sub-serial port transmissions, then may transmit 1 byte separately first after 3 sub-serial ports the valid data 3 transmits 2 bytes again to the serial port “0X00″, then circulation to 3 sub-serial port transmission effective data.

    Attention: Reads in the serial port 3 to use in the time delay the data only being able to be “0X00″, reads in result which other data will produce may expect.

    ⑧The SP233DP data transmission work process is as follows: If the superior machine needs “0X28″ 2 to transmit the data by the serial port, then must set ADRI1 is first “1″, ADRI0 sets is “0″, then “0X28″ transmits the data through the superior machine UART mouth to the serial port 3 then.

    ⑨SP2338DP may carry out the order only has two kinds, namely the replacement and the sleep order. When the superior machine through the serial port 3 (address is “11″) the write data “0X35″ or “0XB5″, then the chip executive software repositions, the resetting time approximately is 21.75ms; When reads when the data is “0X55″ or “0XD5″, the chip will enter the sleep condition.

    Figure 2 3 serial port electric circuits which expands using SP2338DP

    5 model application electric circuit

    May only have using SP2338DP a UART serial port monolithic integrated circuit to expand to have 3 UART serial port monolithic integrated circuit. Below take the commonly used AT89C52 monolithic integrated circuit as an example, gives the corresponding serial port expander, as shown in Figure 2.

    Figure 2 AT89C52 full-duplex serial port and SP2338DP serial port 3 connected. The serial port 3 simultaneously also do for the order/data mouth. ADRI1 and ADRI0 and AT89C52 P3.3, the P3.2 mouth line is connected, uses in transmitting the data phase should the serial port 0~2 choices. ADRO1 and ADRO0 and AT89C52 P3.4, is the P3.5 mouth line connected, which one uses in judging the receive the data from serial port 0~2. The SP2338DP clock rate elects is 20MHz, this time the serial port 3 baudrates are 19 200bps, the serial port 0~2 baudrates are 9600bps. The network supplement version (http://www.dpj.com.cn), gives with the above electric circuit necessary signal procedure, the procedure uses the C51 establishment.

    Conclusion

    The SP2338 multi-serial port expander may widely apply in the industrial control, the data acquisition, the instruments and meters, the intelligent electrical appliances, the computer RS232 mouth expansion, wired and domains and so on wireless data transmission. The multi-serial port electric circuit which constitutes by this component has the hardware cost to be low, the performance-to-price ratio is high, the working speed is high, baudrate establishment simple and so on characteristics, thus chooses this component is the multi-serial port application system’s good solution.

    Share/Save/Bookmark

    Sunday, October 5th, 2008 at 00:54
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