January 09, 2025

Using a PC to test the port expansion function of the MAX7300 / MAX7301

Abstract: This application note introduces a free downloadable PC program for evaluating the functions of the MAX7300 and MAX7301 GPIO (extension port).

The MAX7300 and MAX7301 are general-purpose 28-port, general-purpose input / output (GPIO) processor peripherals. Control via high-speed SPI ™ serial interface (MAX7301) or I²C serial interface (MAX7300). This application note introduces a utility program that a PC can use to control the MAX7301 or MAX7300 driver. Engineers can also use it to become familiar with the registers and functions of the drive. In addition, before the software of the device is completed, it can be used to directly control the registers of the MAX7301 or MAX7300 to "verify" the prototype of the experimental board. System requirements: A PC running Windows® 95, 98, 98SE, ME, NT, 2000 or XP; a parallel printing port configured as LPT1 or LPT2. It shows that the software is a Visual Basic 5 application program and the file name is MAX7300.EXE. To ensure normal operation, the standard Visual Basic runtime environment library file MSVBVM50.DLL is required. This program uses DriverLINX ™ parallel port driver free software DLPorTIO.DLL to provide hardware I / O functions of Win32 DLL, which is not provided by standard Visual Basic. Windows NT and 2000 users also require DLPorTIO.SYS kernel mode driver. The copyright of these driver software belongs to ScienTIfic Software Tools, Inc. (). DriverLINX is a registered trademark of ScienTIfic Software Tools, Inc. When installing on Windows 95, 98, 98SE and ME platforms, download the MAX7300-01.EXE file (812kB), which is a WinZIP automatic decompression file, which includes ReadMe.txt, ReadMeSST.txt, MAX7301.EXE, DLPortIO .DLL and MSVBVM50.DLL. The default download directory is C: \ MAX7300. If your computer has registered library files, you can delete MSVBVM50.DLL.

When installing on Windows NT, 2000 or XP platform, download the MAX7300-NT.EXE file (2.3MB), which is also a WinZIP automatic decompression file, which includes ReadMe.txt, ReadMeSST.txt, MAX7300.EXE, PORT95NT.EXE and MSVBVM50.DLL. The default download directory is C: \ MAX7300. PORT95NT.EXE is the installation program of DriverLINX driver, through which you can install and register DLPortIO.DLL library and DLPortIO.SYS driver. PORT95NT.EXE can be deleted after installation. Windows 95, 98, 98SE and ME users can also use this installer if needed. The connection between MAX7300 or MAX7301 and the parallel port. This program uses three of the eight parallel port printout lines to simulate the SPI serial interface. The other two output lines are used to simulate the I²C serial bus. The parallel control input line is used to read SPI data, Isup2; C data and interrupt status. Multiple MAX7301 (up to 16 with daisy chain connection) and / or multiple MAX7300 (up to 16, configured with different Isup2; C addresses) can be operated simultaneously. The software can choose LPT1 or LPT2 port. The port can be standard, ECP or EPP. The parallel port connection is shown in Figure 1.

Figure 1. Connection of MAX7300 and MAX7301 to parallel port
Figure 1. Connection of MAX7300 and MAX7301 to parallel port

When the program starts, three windows are opened, which are the main control window, the I / O control window and the port control window. During startup, the register settings map to the power-up state of the MAX7300 and MAX7301.

The main control window is shown in Figure 2 below. Use the 'Driver type' radio button to select the software transfer target: MAX7301 (using SPI connection) or MAX7300 (using Isup2; C connection).

Figure 2. Program display at startup
Figure 2. Program display at startup

In SPI mode, software can control up to 16 MAX7301 drivers. It is assumed that the drivers are cascaded (ie, the DOUT pin of the first MAX7301 is connected to the DIN pin of the second MAX7301, the DOUT pin of the second MAX7301 is connected to the DIN pin of the third MAX7301, and so on analogy). The total number of MAX7301 drivers is set by the 'Number of Drivers' slider. When the value is greater than 1, 'Enable global driver write' and 'Enable auto-increment' are optional. If the 'Enable global driver write' option is cleared, when the write command is executed, only the MAX7301 driver selected by the 'Current Driver' slider will be written, and the other drivers only receive the no-operation command; , Then all MAX7301 will receive the same data. If you select the 'Enable auto-increment' item, the current drive number is automatically incremented after each write operation. Allows users to quickly transfer data to a string of MAX7301 drivers.

When the program is running, you can test the connection between the SPI interface and the parallel port through the 'Test Stream' tool under 'Port Connections and Help ...' The 'Test Stream' program continuously sends null commands to the MAX7301 (the number is set by the 'Number of Drivers' slider), which can verify the interface connection without affecting the contents of each register.

Isup2; In C mode, the software can control up to 16 MAX7300 drivers. Assume that the first driver address is set to 1000000x, the remaining device addresses are incremented by 1, and the last address is 1001111x. For example, if you want to configure a drive with the address of 1001111x, you only need to set the 'Number of Drivers' slider to 16, and then select the value of the 'Current Driver' slider to 16, you can operate on the address of 1001111x. The main window of Isup2; C mode is shown in Figure 3.

Figure 3. Isup2; C program display
Figure 3. Isup2; C program display

When the program is running, you can test the connection between the Isup2; C interface and the parallel port through the 'Test Stream' tool under 'Port Connections and Help ...' The 'Test Stream' program continuously sends null commands to the MAX7300 (the number is set by the 'Number of Drivers' slider), and the connection interface can be verified without changing the contents of each register.

The 'Fast serial interface' option box can set the serial speed of SPI and Isup2; C interface. When this option is selected, the serial interface runs at full speed, and the speed depends on the machine characteristics, up to 1 Mbit / s; when this option is not selected, the speed can only reach 500 bits / sec. Low transmission rates are useful when connecting cables over long distances.

When you press the 'Write' or 'Read' button, the program will communicate with the selected drive. However, the program will automatically monitor the interrupt output connected to pin 13 of the parallel port. Its status is displayed in the main window as "High" or "Low".

When the item 'Automatic Update control' is selected, the program will continuously inquire the 28 port input registers and interrupt register bits. The speed of the read operation depends on the setting of 'Fast serial interface', which can be several times per second (high speed) or once every few seconds (low speed). Note: The low speed mode is very slow! The 'Reading driver x' slider allows the user to set the device to be read automatically without being affected by the reading operation of the driver controlled by the 'Current driver'.

You can exit the program from the main window. Pressing the Exit button or pressing the Esc key in the main window will close all three windows. Pressing the Esc key while the other two windows are active can return the user to the main window; therefore, pressing the Esc key twice can quickly close the program. Before closing, the program saves the last setting of the device configuration to the MAX7300.ini file, which is stored in the same directory as the running program. This operation has no effect on the Windows registry. The setting includes the position of the three windows and the interface setting of the main window. If the file MAX7300.ini does not exist, it will create a new one, otherwise, the file will be refreshed. If you need to restore the default settings of the program, or the file has been destroyed, just delete it.

Figures 4 and 5 are views of the other two windows.

Figure 4. I / O configuration window
Figure 4. I / O configuration window

Figure 5. Port register window
Figure 5. Port register window

Asterbar

Asterbar Disposable ecig have a completely enclosed design, reducing the need for charging and replacing cartridges. The no-charge design also reduces the occurrence of faults. It is understood that with rechargeable e-cigarettes, each cartridge needs to be charged at least once and the battery efficiency is extremely low, while the design of disposable ecig can solve this problem very well.

Disposable Asterbar E-Cigarette,Mini Asterbar E Cigarette,Asterbar Electronic Cigarette Customizing,RechargeableAsterbar E Cigarette

Shenzhen E-wisdom Network Technology Co., Ltd. , https://www.globale-wisdom.com