abstract: this application note describes a pc program, downloadable for free, to assist in the evaluation of the max7219 and max7221 led display drivers.
the max7219 and max7221 are 8-digit, 7-segment, common-cathode, multiplexed, led display drivers which drive up to 40ma peak segment current, while operating from a 4v to 5.5v supply. control is accomplished through a 4-wire (max7219) or spi (max7221) serial interface.
this application note describes a utility program which allows up to 16 max7219 or max7221 drivers to be controlled from a pc. the utility can be used standalone to help an engineer become familiar with the registers and functions of the drivers or to test an application board prototype by directly controlling the max7219 or max7221 registers before the equipment's software is designed.
requirementsa pc running windows 95, 98, 98se, me, nt, 2000, or xp with a parallel printer port configured for either lpt1 or lpt2.
descriptionthe utility is a visual basic 5 program called max7221.exe which requires the standard visual basic run time library msvbvm50.dll. the program uses the driverlinx™ freeware parallel port driver dlportio.dll which provides win32 dll hardware i/o functions that are not a standard part of visual basic. windows nt and 2000 users also require the dlportio.sys kernel mode driver. both of these drivers are copyright scientific software tools, inc. (www.driverlinx.com). driverlinx™ is a registered trademark of scientific software tools, inc.
installationto install under windows 95, 98, 98se, or me, download the max7219-21.exe file (800kb). this is a winzip self-extracting archive that contains readme.txt, readmesst.txt, max7221.exe, dlportio.dll, and msvbvm50.dll. the default download directory is c:\max7221. msvbvm50.dll may be deleted if the library is already registered on the computer.
to install on a windows nt, 2000, or xp platform, download the max7219-nt.exe file (2.3mb). this is a winzip self-extracting archive that contains readme.txt, readmesst.txt, max7221.exe, port95nt.exe, and msvbvm50.dll. the default download directory is c:\max7221. port95nt.exe is the install program for the driverlinx drivers which installs and registers the dlportio.dll library and dlportio.sys driver. port95nt.exe can be deleted after installation. windows 95, 98, 98se, me users can also use this installation procedure if they wish.
connecting a max7219 or max7221 to the parallel portthe utility uses 3 of the 8 parallel port printer output lines to drive the led drivers. a parallel port control input line is used for serial interface read back, and is only needed if registers are to be examined (see the description for the 'utility' button). you can control up to 16, daisy-chained max7221s and/or max7219s at once. either the lpt1 or lpt2 port may be selected from the software. the port can be a standard, ecp, or epp type. the port connections are shown in figure 1.
figure 1. the max7219 and max7221 connections to the parallel port.
the program brings up 4 windows: main control, intensity control, i/o control, and segment control. the register settings mirror the register power-up conditions of the max7219 and max7221.
the main control is shown in figure 2 below. the 'driver type' radio buttons select whether the software is intended to drive max7221s (using a spi connection) or max7219s (using a 4-wire connection).
figure 2. program display on startup.
the software controls up to 16 max7219 or max7221 drivers. the drivers are presumed to be cascaded, (i.e., the dout pin of the first max7219 or max7221 connects to the din pin of the second max7219 or max7221, whose dout pin connects to the din pin of the third max7219 or max7221, and so on). the total number of max7219 or max7221 devices is set by the 'number of drivers' slider. when this is set to more than 1, the 'enable global driver write' and 'enable auto-increment' check boxes are available. when 'enable global driver write' is clear, only the max7221 driver selected by the 'current driver' slider is written to when a write command is selected - the others receive the no-op instruction. when 'enable global driver write' is checked, all the max7219 or max7221 drivers are written to with the same data. when 'enable auto-increment' is checked, the current driver number is automatically incremented after each write action. this allows the user to quickly send the same data for a series of max7219 or max7221 drivers.
the serial interface connection to the parallel port can be tested with the 'test stream' facility which can be found under 'port connections and help...' when the program is running. the 'test stream' facility transmits the no-op instruction continuously to the max7219(s) or max7221 (s) (as set by the 'number of drivers' slider) allowing the interface connections to be verified without affecting register contents.
the 'fast serial interface' check box sets the serial interface speed. when checked, serial interface runs at machine-dependent full speed up to 1 mbits/sec; unchecked, the speed is limited to 500 bits/sec maximum. the slow speed may be useful when connecting over very long cables. the program will normally only communicate with the target driver (or drivers) when a 'write' or 'read' button is pressed.
the 'utility' button calls up a simple utility which allows the user to send a byte from any register or read a byte from any register. the rules for cascading, auto-incrementing, interface speed etc that have been already set up are followed.
the exit button, or pressing the esc key, closes the program. before closing, the program stores the last settings for device configuration in a file called max7221.ini in the same directory that the program was executed from. nothing is written to the windows registry. the settings include the position of the main window, and the interface settings on the main window. if the max7221.ini doesn't exist then it is created; otherwise it is overwritten. to restore program default settings, or if the max7221.ini is corrupted, simply delete the max7221.ini file.
FLIR E85红外热像仪的性能特点及应用
小米6亮点不是835而是MIUI9类似live系统
什么是行输出变压器_行输出变压器检测方法
hanlp中的N最短路径分词
华为p10被荣耀9碾压,这次大幅度降价,却是热门选择?
使用电脑进行实验的MAX7219和MAX7221LED显示驱
比特币矿业的发展历程是怎样的
远程医疗市场增加,智能医疗产业进行时
一种防泄漏键盘设计方案
治理大气环境污染,扬尘在线监测系统在行动!
LED显示屏故障的应对之策
下一代Tegra SoC芯片仍定2012年发布
昂达VK30彩屏阅读器基本介绍
华为如何利用中国集成电路构建未来5G与工业互联网的重点结合方向?
移动卫星运营商Thuraya推出一项新的海上宽带服务
工业能耗管理系统方案
新基建风口下 智能制造为信息产业发展赋能
2022半导体产业国内外格局生变
星敏感器星图识别算法
物联网安全的重要性