Application of the latest multi bus in embedded sy

  • Detail

The application of new multi bus in embedded system design

UART was produced in the 1970s, and it is the first large-scale integrated circuit. IBM PC launched in 1981 adopts 8250 UART to communicate with peripherals. Until the end of last century, UART has been the most important serial communication interface in PC. With the emergence of high-speed serial bus USB, USB has replaced UART with many advantages and become the most widely used serial interface in personal computers

in the embedded field, because UART has the advantages of simple operation, reliable operation, strong anti-interference and long transmission distance (it can transmit more than 1200 meters by forming 485 network), designers generally believe that UART is the best way to transmit data from CPU or microcontroller to other parts of the system, so they are widely used in embedded fields such as industry, communication and home appliance control. Usually, mcu/cpu comes with a UART serial port, but in practical applications, a serial port is often insufficient, and UART serial port expansion is required

figure 1

up to now, there are more than 40 kinds of UART devices available worldwide. Most UART devices are based on the application of computer bus conversion UART, and their versatility, pins, and registers are rarely changed from 20 years ago. For embedded applications, the current UART devices generally have weaknesses such as complex operation, many pins, high price and so on, which can not meet and adapt to the needs of embedded systems

vk series UART devices

Viking company has designed and launched vk32xx series new multi bus interface UART devices for the development trend of UART in embedded systems. Its characteristics are:

1 Support 8-bit parallel bus, SPI bus, UART and other host bus interfaces. Among them, 8-bit parallel bus interface products can replace the widely used 16c55x series UART for UART serial port expansion for 8-bit, 16 bit and 32-bit MCU. Vk32 series 8-bit parallel bus interface UART products adopt simplified control register design, and reduce chip pins through pin reuse. Simplified software design and PCB design are more suitable for embedded system requirements

spi interface bus series products are DSP and MCU with SPI interface to realize the bridge and expansion from synchronous SPI serial port to asynchronous UART serial port, especially for the DSP system widely used at present, most DSPs only have synchronous serial port, which can only be used to communicate with peripherals with synchronous communication interface. Vk32 series SPI bus interface products can bridge/expand one SPI synchronous serial interface into 1~4 universal asynchronous serial ports, which is convenient to realize asynchronous serial communication between DSP and peripherals

uart interface products innovatively realize the expansion of a standard 3-wire UART into 2~4 enhanced UART. The built-in UART extension protocol processing logic of the chip can realize the expansion of multiple independently configured full duplex serial ports without other address signals and control signal lines, providing a most concise solution for embedded systems that need to expand serial ports

Figure 2 Application of vk32 series products in the design of embedded tax control POS platform

2 Support high-speed transmission. Each sub baud rate can be set independently, and the maximum communication speed of sub serial port can reach 920kbps (5V working voltage). The maximum transmission rate of SPI bus supported by the host is 4Mbps, and the maximum transmission rate of 8-bit parallel bus of the host is 10Mbps

3. Wide working voltage and low power consumption design. Considering that the working voltage of new dsp/fpga in embedded field is mostly 2.5V, and a large number of MCU in industrial control field still need to work at 5V, the working voltage range of vk32 series UART design is 2.5v~5.5v. At the same time, this series of chips can work in automatic sleep and wake-up mode, effectively reducing power consumption

4. Perfect FIFO function. Each channel has an independent 16 level receive and send FIFO, and each FIFO has 4 programmable trigger points. The perfect FIFO function can buffer the data sent/received, reduce the operation of dsp/cpu on data transmission, and improve the efficiency of cpu/dsp and the reliability of data transmission

5. The sub serial port channel has software or hardware automatic flow control to meet the needs of flow control in high-speed data transmission

6. The sub serial port has programmable hardware RS-485 automatic control function and automatic 9-bit network address recognition function, which greatly reduces the burden of the processor, especially suitable for industrial RS-485 groups

7. Each channel has independent and controllable data broadcast receiving function, which can be applied to embedded systems that need data broadcast transmission and control

8. All UARTS (including UART main interface and subchannel UART) support IrDA infrared communication

principle and block diagram of VK series UART devices

vk3200 is the most versatile model in vk32 series. Based on the schematic diagram of vk3200, this paper introduces the principle of vk32 series UART chip. The internal structure of vk3200 includes host interface, subchannel part, modem control logic and interrupt control logic. The host interface is the interface between vk3200 and cpu/dsp. Select the signal line through M1 and Mo mode, and you can select 8-bit parallel bus, SPI bus and UART to connect with the host respectively; Modem control logic is used to monitor and control the status signal line when connected with modem; Interrupt control logic is used to generate and control various internal interrupts

the clock generator provides the clock for the chip, and the clksel lead can be used to select whether to obtain the clock from the crystal oscillator or the external clock source. The subchannel logic part handles the data reception and transmission of each. The processing process of data transmission is as follows: the host interface processes the data sent from the main interface bus and transmits it to the corresponding subchannel FIFO. After the data in FIFO passes through the flow control logic, under the action of the baud rate generator, it sends the data to the TX string in sequence by sending the shift register, as if it has been successfully on the desired line output signal line, and the received data is just the opposite. In the subchannel processing module, the control register is used to set each subchannel, the IR codec is used to encode and decode the infrared signal, and the subchannel flow controller is used for automatic flow control when the subchannel transmits data

application in embedded systems

the application fields of VK series UART devices in embedded products include: multi serial server/multi serial card, industrial/automated field RS-485 control, wireless data transmission using cdma/gprs modem, on-board information platform/on-board GPS positioning system, remote automatic meter reading (AMR) system, financial machines and tools such as tax control pos/bank terminal, DSP data acquisition and transmission system, etc. Its application examples are as follows:

1 Application in tax controlled POS

tax controlled POS is a control intensive embedded system, which needs to control a large number of peripherals. The serial port printer, modem, RS-485 network interface and tax control IC card (asynchronous card) required by its basic configuration all work in the serial communication mode based on UART. At the same time, a large number of peripherals such as password keyboard, bar code scanner, bar code scale, contact IC card/non-contact IC card reader, magnetic card reader, serial port display screen and other devices are connected to POS through RS-232 serial port

using vk32xx series UART devices, spi/8-bit parallel bus/uart can be selected for flexible UART serial port expansion according to the interface characteristics of mcu/cpu. Compared with the current scheme of using GPIO to simulate serial port, this scheme occupies little CPU i/o and resources, and even ordinary 8-bit MCU can be competent. At the same time, the extended sub serial ports are standard hardware UART, which makes the data transmission more reliable

2. The application in the remote automatic meter reading system is shown in Figure 3. The remote automatic meter reading system is composed of remote meter, centralized meter reader and modem

Figure 3 application of vk32 series products in the design of remote automatic meter reading system

in remote meter transmission, VK3212 dual serial port expansion IC is used to expand one UART of single chip microcomputer into two UARTS, and the expanded two serial ports uart1 and UART2 are connected to rs-485/m-bus interface and infrared interface respectively. Uart1 of VK3212 is set to RS-485 automatic transceiver and RS-485 network mode, which can automatically complete rs-485/m-bus data automatic transceiver and automatic network address identification without MCU control. UART2 of VK3212 is set to infrared mode, which is used to connect the infrared setting window of the remote meter

in the centralized meter reading device, four sub serial ports UART are expanded with a 4-channel UART device vk3234 with SPI interface, and MCU is connected with vk3234 through SPI bus. The sub serial port UART of vk3234 is set to RS-485 automatic transceiver mode, and the rs-485/mbus transceiver controlled by each sub channel UART is connected to up to 250 remote meters through rs-485/m-bus bus bus. A centralized meter reading device based on vk3234 can read data from up to 1000 remote meters

because it is a serial port extended through SPI interface, the serial port of the centralized meter reader single chip microcomputer can be connected to pstn/gsm modem to transmit the centralized meter reading data to the remote server

3. Application in embedded vehicle information platform

vk3233 main interface has SPI and UART interfaces to choose from. The dsp/cpu in the embedded platform is connected with vk3233 through spi/uart interface. The three sub serial ports expanded from vk3233 are connected with GPS module, reverse radar module and gsm/cdma module respectively, and the modem control line is connected with gsm/cdma modem. The whole embedded system shares a display device, which effectively saves the limited space in the car

Figure 4 Application of vk3233 in the design of embedded vehicle information platform

4 Application in serial port server

in industrial control and other fields, the external communication interface of many devices is still Low-speed serial port. The serial port server stores and converts the data of multiple serial port devices, and then transmits it through IP

Figure 5 shows the circuit schematic diagram of an 8-port serial server (4 RS-232 serial ports and 4 RS485 serial ports). The parallel bit data line of dsp/cpu in the embedded system connects 2 pieces of vk3266 to realize the expansion of 8 serial ports, and the CS of 2 pieces of vk3266 is controlled by the address decoder to realize chip selection control. In the above figure, vk3266 A is connected with four RS-232 transceivers, and four RS with hardware flow control signals are expanded. When the intelligent control system of the pressure tester has problems -232 serial port; Vk3266b is connected with four RS-485 transceivers. Set vk3266 in rs-458 automatic transceiver control mode, and control the data transmission enabling de and data reading enabling Rd signals of RS-485 transceivers through RTS signals, so as to realize the automatic transceiver control of RS-485

Figure 5 Application of vk3266 in the design of serial port server

model selection reference and design suggestions

1 Model selection reference

vk32 series UART includes five product series. The characteristics of each product series are as follows:

vk321x series is the product with UART as the main interface, which is connected to the host only through Rx, TX and GND signal lines. Through the processing protocol inside the chip, a serial port is expanded into 2~4 full trailer up and down duplex serial ports that can work at the same time by means of time division multiplexing. In this mode, MCU operates UART device in query mode. In the design, it should be noted that in order to ensure that all sub channels can communicate in full duplex at the same time under time division multiplexing, the baud rate of the main interface needs to be set to be greater than the sum of baud rates of all sub serial ports. Vk321x products are suitable for embedded products that do not require high communication speed and require reliable and simple design

the main interface of vk322x series products is SPI synchronous transmission bus, and the maximum transmission speed is 4Mbps. It is suitable for mcu/dsp extended asynchronous serial port with SPI interface. Most DSPs only have synchronous serial port, and the bridging and expansion of asynchronous serial port through SPI interface can simplify the hardware scale of parallel bus expansion serial port and simulate the software overhead of asynchronous serial port

vk323x series

Copyright © 2011 JIN SHI