Implementation of USB Bus and ISA Bus Transfer Based on CH375 Chip

Publisher:转眼人老Latest update time:2015-10-15 Source: 21icKeywords:CH375 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
ISA bus was first used as a system bus, mainly in IBM-PC and IBM-PC/XT series computers, and later became an industrial bus standard, which had a profound impact. Due to the continuous development of technology, the transmission rate of ISA bus could not keep up with the speed of processor, so it was replaced by other buses.

However, it is precisely because of the low speed of the ISA bus that it matches the current peripheral speed very well, and is suitable as a peripheral device bus for expanding device interfaces. In addition, the ISA bus has a large number of address lines, which can connect a large number of devices. Combining these two reasons, the ISA bus still has a place in the field of industrial control, and the application of the ISA bus in the industrial field will continue for a long time.

After the popularization of USB peripherals, the various complicated connection cables behind the PC case will become simpler. Most of the old interfaces will be eliminated, such as ISA interface, PS/2 interface, serial and parallel interface, etc., and replaced by various USB interface peripherals. However, there are some interfaces that cannot be replaced by USB, such as display interface, SCSI interface and IEEE1394 interface. However, this still cannot stop the development of USB interface.

In fact, except for graphics cards with extremely high data transmission volume and some control devices with particularly high real-time requirements, almost all PC peripherals can be transplanted to USB, so USB PC peripherals have unlimited development space. It is for this reason that this paper proposes a design scheme to achieve the transfer between the two through the CH375 chip.

1 Overall solution design

In this solution, the CH375 chip is used to realize the conversion from ISA bus to USB bus. CH375 is a universal interface chip for USB bus, supporting USB-HOST host mode and USB-DEVICE/SLAVE device mode. On the local side, CH375 has an 8-bit data bus and read, write, chip select control lines and interrupt output, which can be easily connected to the system bus of microcontrollers, DSPs, MCUs, MPUs and other controllers. It has built-in underlying protocols in USB communication and shields complex underlying drivers; it provides device-level interfaces through Windows drivers and API application layer interfaces through DLLs. The figure below is the overall module diagram of the adapter board. The board is connected to the host computer through a USB connector and plugged into the ISA slot of the lower computer through an ISA interface.

Implementation of USB Bus and ISA Bus Transfer Based on CH375 Chip

1.1 Design of CH375 module

The connection circuit between CH375 chip and peripheral chips is shown in Figure 2.

Implementation of USB Bus and ISA Bus Transfer Based on CH375 Chip

The UD+ and UD- pins are connected to the D+ and D- data lines of the USB bus respectively.

ACT# is the device status output terminal of CH375. When CH375 is configured as a USB device, this pin outputs a low level, which can be used to indicate the status of CH375.

The INT# pin is the interrupt request output, which is connected to the interrupt 0 pin of the microcontroller.

CS# chip select control input pin, connect it to the P2.7 pin of the microcontroller.

A0 is the selection pin of CH375 data port and command port, and A0 is connected to P2.6 pin of microcontroller.

RD# and WR# are connected to the read and write signal pins of the microcontroller respectively.

D0~D7 are the data buses, which are connected to P0.0~P0.7 of the microcontroller respectively.

1.2 Design of ISA module

Two 74HC245s are used in this design to introduce data signals, address signals and read/write control signals into the lower computer. The 74LS573 chip is used as a latch. 1) The enable terminal 0E# pin of the 74LS573 is grounded to make it always valid. 2) LE is the latch enable input terminal. When it changes from high level to low level, it latches the input data (that is, latches the data of port P0). Since the microcontroller sends a stable address signal at the falling edge of ALE, the LE pin of the chip can be directly connected to the ALE of the microcontroller. 3) Other corresponding connections can be made.

The address bus and data bus of the ISA bus are separate, and the control line is relatively simple, so it is very convenient to interface with the microcontroller and can be directly connected to the ISA bus.

2 Software Design

The software programming to be completed in this design mainly includes: upper computer user interface application program and lower microcontroller program.

The data of the host computer is sent to CH375 by the USB host through the USB bus. CH375 puts the received data into the endpoint buffer. After receiving, it informs the MCU through an interrupt that the data reception is completed. Then the MCU responds to the interrupt and does something in the interrupt.

The corresponding processing is to convert and send the data to the ISA bus in the interrupt. Therefore, the main task of the microcontroller is to communicate with CH375, receive the data in the CH375 data buffer, and then convert the data into ISA bus signals after processing and send them to the ISA bus. Figure 3 is the flow chart of the main program.

Implementation of USB Bus and ISA Bus Transfer Based on CH375 Chip

Figure 4 is the CH375 initialization subroutine, which is mainly used to test whether the communication with the microcontroller is normal and set the working mode of CH375. In this paper, the working mode of CH375 is set to mode 2, that is, the built-in firmware mode.
 

Figure 5 is the MCU interrupt subroutine, which is the most important part of the lower MCU program. All data sent by the upper computer program are responded, received and processed by the interrupt subroutine.

The interrupt subroutine is as follows:

Implementation of USB Bus and ISA Bus Transfer Based on CH375 Chip

3 System Debugging

3.1 Debugging Methods

This article adopts a debugging method that starts with the parts and ends with the whole, which can save time and find problems as quickly as possible.

The whole debugging system is divided into two parts. The first part is the communication between the host computer program and the single-chip microcomputer; the second part is the communication between the single-chip microcomputer and the ISA bus. The two parts are debugged separately. After the debugging is successful, the two parts are combined into a whole, and finally the whole is debugged.

3.2 Debugging process and debugging records

1) Debugging of data transmission between host computer and MCU

The host computer is controlled by the program "Debug Program V1.0.EXE", which can input the address of the I/O output board and the data to be sent to the ISA bus. Its main interface is shown in Figure 6.

Implementation of USB Bus and ISA Bus Transfer Based on CH375 Chip

The MCU part consists of Keil C programming software, emulator and USB-ISA adapter card. Connect the emulator head to the MCU position of the USB-ISA adapter card, and the Keil C programming software and emulator work together to complete the simulation function. The programming and debugging interface of Keil C software is shown in Figure 7.

Implementation of USB Bus and ISA Bus Transfer Based on CH375 Chip

The simulator can be used to check whether the data has arrived successfully. The debug records are shown in Table 1.

Implementation of USB Bus and ISA Bus Transfer Based on CH375 Chip

2) Debugging of data transmission between MCU and ISA bus

The MCU part can be simulated by an emulator or directly by a MCU with a program programmed by a programmer, but it is more convenient to debug by simulation. This part of debugging mainly depends on whether the ISA bus data sent by the MCU can be received by the I/O output card. Whether the data is received can be indicated by the display board. The on and off status of the LED light on the display card can indicate whether the I/O output card is selected and whether the control signal of the MCU is received.

The program controls the sending of data to a certain address of the ISA bus. If the display board can display the data information sent in the program, it indicates that the microcontroller communicates successfully with the ISA bus.

3) Overall system debugging

After the above two parts are debugged successfully, the overall debugging of the system can be started. The successful debugging of the above two steps indicates that the hardware principle and hardware connection are correct, and the host computer debugging program is also OK. The next step is to debug the software program of the microcontroller for processing the received data. This part is also relatively simple. The microcontroller processes the ISA bus data in the same way as the extended memory; point to a certain address and then send data.

4 Conclusion

This article combines the characteristics of the two buses, USB and ISA, and designs and manufactures a USB-ISA adapter card, which is suitable for various industrial control systems. This adapter card can be used in basically any occasion where there is an ISA bus. The ISA bus is a bus suitable for medium and low-speed I/O devices. Due to its multiple address lines and slower transmission rate, the ISA bus is still widely used in the industrial field. The USB bus is a very convenient bus, which is loved by more and more users. The superior characteristics of USB will give it an irresistible development momentum. Therefore, the combination of the USB bus and the ISA bus will definitely have a far-reaching impact in the industrial field. It can be expected that the USB-ISA adapter card will have a very broad application prospect in the industrial field.

Keywords:CH375 Reference address:Implementation of USB Bus and ISA Bus Transfer Based on CH375 Chip

Previous article:Scanning control and data acquisition of microwave imaging using MSP430
Next article:MSP430 failed to initialize using BSL program

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号