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.
1.1 Design of CH375 module
The connection circuit between CH375 chip and peripheral chips is shown in Figure 2.
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.
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:
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.
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.
The simulator can be used to check whether the data has arrived successfully. The debug records are shown in Table 1.
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.
Previous article:Scanning control and data acquisition of microwave imaging using MSP430
Next article:MSP430 failed to initialize using BSL program
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- CGD and Qorvo to jointly revolutionize motor control solutions
- CGD and Qorvo to jointly revolutionize motor control solutions
- Keysight Technologies FieldFox handheld analyzer with VDI spread spectrum module to achieve millimeter wave analysis function
- Infineon's PASCO2V15 XENSIV PAS CO2 5V Sensor Now Available at Mouser for Accurate CO2 Level Measurement
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- A new chapter in Great Wall Motors R&D: solid-state battery technology leads the future
- Naxin Micro provides full-scenario GaN driver IC solutions
- Interpreting Huawei’s new solid-state battery patent, will it challenge CATL in 2030?
- Are pure electric/plug-in hybrid vehicles going crazy? A Chinese company has launched the world's first -40℃ dischargeable hybrid battery that is not afraid of cold
- I don't know much about the commonly used domestic device manufacturers.
- Cadence Allegro beginners must read
- [Atria Development Board AT32F421 Review] 1. Unboxing and lighting
- EEWORLD University ---- Introduction to CC2650MODAPluetooth? Low-energy RF module
- After the microcontroller is powered on, it runs a display program and encounters a very strange problem.
- A brief discussion on LTE technology and practical application solutions
- What is the drilling process in the Siliton ceramic substrate PCB?
- SD/TF card usage issues
- Download address of Arteli technical resources
- MSP430F249 external interrupt P1.3 port