Arduino Playground - Controlling a Led matrix or 7-segment displays with the MAX7219 or the MAX7221
http://playground.arduino.cc/Main/LEDMatrix
There are different solutions for driving this popular piece of hardware from the Arduino. If you are not familiar with the MAX7219 or MAX7221 you should start by reading the hardware related documents
The The MAX7219 and MAX7221 Led drivers article, with schematics and some additional information related to the Arduino.
Multiplexing the MAX72xx to drive a 2 Color Matrix - using an alternating shutdown method to control a 2 color matrix with 2 MAX72xx.
The software for driving these chips is covered on several pages:
The 8x8 Matrix controlled by a max7219 article provides code examples and a schematics for driving a 8x8 Led matrix. Supports multiple cascaded MAX7219.
The Matrix-library This is the original documentation for the Matrix-library that was shipped with the Arduino software pre Arduino 1.0. The library supports only a single MAX7219 and only works with Arduino 022 and below. To connect multiple MAX7219s together you wire the clk and data to the same lines but the load data line goes to a different pin, also you must define a new matrix and give it a different name.
The LedControl-library Supports the MAX7219 and the MAX7221. It can drive multiple devices and has a specific command-set for 7-segment displays (besides the common Led matrix functions).
The MAX7219-Library is another available library that supports cascaded MAX7219's and some basic matrix functions(e.g shiftleft, shiftright, flip, rotate, raise, lower).
The Max72xxPanel library implements Adafruit's GFX library for multiple 8x8 LED displays driven by MAX7219 or MAX7221, in arbitrary rectangular layout. Support for basic graphic primitives and text. Features double buffering to prevent flicker.
More specific problems with the MAX7219 or MAX7221 have been discussed several times on the Arduino Hardware Forums.
MAX7219 数码管显示控制模块 ¥19.80
MAX7219是一种集成化的串行输入/输出共阴极显示驱动器,它连接微处理器与8位数字的7段数字LED显示,也可以连接条线图显示器或者64个独立的LED。其上包括一个片上的B型BCD编码器、多路扫描回路,段字驱动器,而且还有一个8*8的静态RAM用来存储每一个数据。只有一个外部寄存器用来设置各个LED的段电流。
一个方便的四线串行接口可以联接所有通用的微处理器。每个数据可以寻址在更新时不需要改写所有的显示。MAX7219同样允许用户对每一个数据选择编码或者不编码。
整个设备包含一个150μA的低功耗关闭模式,模拟和数字亮度控制,一个扫描限制寄存器允许用户显示1-8位数据,还有一个让所有LED发光的检测模式。
只需要3个IO口即可驱动8位数码管!数码管显示时无闪烁!支持级联!显示效果如下图所示:
数码管与PCB板之间采用2.54mm间距圆孔排针连接,可以很方便地更换数码管!
PCB板四个角采用铜螺柱固定,可有效防止短路等意外情况发生!
数码管为0.36寸4位一体共阴极数码管
本模块兼容5V/3.3V单片机(51/AVR/STM32.......)
接线说明(以提供的程序为例,可以接任意IO口,在程序中修改端口定义即可):
VCC→5V
GND→GND
DIN →P00
CS →P01
CLK→P02
注意事项:
1.VCC与GND千万不要接反,以免烧坏芯片
2.51单片机P0口需要接上拉电阻,如果您的单片机没有接上拉电阻,可以将数据线接到其它端口
发货清单:
1. MAX7219数码管显示模块1个
2. MAX7219英文数据手册1份
3. MAX7219中文数据手册1份
4. PDF格式原理图1份
5. 51 单片机驱动程序1份(单个模块显示程序及级联模块显示程序)
.END
No comments:
Post a Comment