Difference between revisions of "MAX7219X4"
Jump to navigation
Jump to search
Blwikiadmin (talk | contribs) |
Blwikiadmin (talk | contribs) (→Test) |
||
(33 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
<video type="youtube">KmEkTzbUHok</video> | <video type="youtube">KmEkTzbUHok</video> | ||
− | [[file: | + | [[file:MAX7219X4_P18550_720PX.jpg]] |
== Features == | == Features == | ||
Line 14: | Line 14: | ||
* Can display decimal, hex values, some text values | * Can display decimal, hex values, some text values | ||
* Each display has 8 of 7 segment LED displays | * Each display has 8 of 7 segment LED displays | ||
− | * "Blue" | + | * Uses "Blue" LED cards |
** [https://www.ebay.com/sch/i.html?_from=R40&_trksid=p2334524.m570.l1311&_nkw=max7219+8-digit+led+display+7+segment&_sacat=0&LH_TitleDesc=0&_odkw=MAX7219&_osacat=0 ebay search] | ** [https://www.ebay.com/sch/i.html?_from=R40&_trksid=p2334524.m570.l1311&_nkw=max7219+8-digit+led+display+7+segment&_sacat=0&LH_TitleDesc=0&_odkw=MAX7219&_osacat=0 ebay search] | ||
** Not compatible with [[MAX7219X4#.22Red.22_Modules|red modules]] | ** Not compatible with [[MAX7219X4#.22Red.22_Modules|red modules]] | ||
− | * 3.3V interface operation | + | * Rev 1 has 3.3V interface operation (J1) |
** 3.3V to 5V Level shifter | ** 3.3V to 5V Level shifter | ||
− | * Requires '''both''' 3.3V and 5V power supplies | + | ** Requires '''both''' 3.3V and 5V power supplies |
− | * 8 pin connector | + | ** 8 pin connector |
+ | * Rev 2 has 3.3V signal levels J1 (as above) or 5V signal levels (adds J2) | ||
+ | ** Only requires 5V for 5V operation | ||
+ | ** Level translator can still be installed but right connector must be used | ||
* 95x95mm ODAS form factor | * 95x95mm ODAS form factor | ||
* (4) 6-32 mounting holes | * (4) 6-32 mounting holes | ||
Line 26: | Line 29: | ||
[[file:MAX7912_8_Digs_001.jpg]] | [[file:MAX7912_8_Digs_001.jpg]] | ||
− | == J1 Connector == | + | == Connectors == |
+ | |||
+ | [[file:MAX7219X4_Rev2_CAD.PNG]] | ||
+ | |||
+ | * Only 1 of the 2 connectors J1 or J2 can be used at a time | ||
+ | |||
+ | === J1 Connector === | ||
* 3.3V signal level | * 3.3V signal level | ||
Line 38: | Line 47: | ||
# CS | # CS | ||
# DIN | # DIN | ||
− | # 3.3V | + | # +3.3V |
− | # 5V | + | # +5V |
+ | |||
+ | === J2 (Rev 2 and higher) === | ||
+ | |||
+ | |||
+ | # +5V | ||
+ | # DIN | ||
+ | # CS | ||
+ | # CLK | ||
+ | # DOUT | ||
+ | # GND | ||
== Programming == | == Programming == | ||
Line 59: | Line 78: | ||
===== LBMAX7219X4_ADDR ===== | ===== LBMAX7219X4_ADDR ===== | ||
+ | * Runs on [[ArduinoInABox|Arduino in a Box]] | ||
+ | ** 3.3V signals level | ||
+ | ** Also requires 5V for LEDs | ||
+ | ** 5V on Arduino in a Box] DC Power Jack | ||
+ | * 5V picked off VFILT jack | ||
* [https://github.com/land-boards/lb-Arduino-Code/tree/master/LBCards/MAX7219X4/LBMAX7219X4_ADDR LBMAX7219X4_ADDR] | * [https://github.com/land-boards/lb-Arduino-Code/tree/master/LBCards/MAX7219X4/LBMAX7219X4_ADDR LBMAX7219X4_ADDR] | ||
+ | ** void writeHexDigit(uint8_t rowVal, uint8_t colVal, uint8_t digitVal) - Write Hexadecimal digit to location | ||
+ | ** 8 columns, 4 rows | ||
+ | ** rowVal = 0 is top row in display | ||
+ | ** colVal = 0 = left character | ||
+ | |||
+ | ===== LBMAX7219X4_ADDR_5V ===== | ||
+ | |||
+ | * Same as LBMAX7219X4_ADDR | ||
+ | * Runs on 5V Arduino UNO | ||
+ | * [https://github.com/land-boards/lb-Arduino-Code/tree/master/LBCards/MAX7219X4/LBMAX7219X4_ADDR_5V LBMAX7219X4_ADDR_5V] | ||
** void writeHexDigit(uint8_t rowVal, uint8_t colVal, uint8_t digitVal) - Write Hexadecimal digit to location | ** void writeHexDigit(uint8_t rowVal, uint8_t colVal, uint8_t digitVal) - Write Hexadecimal digit to location | ||
** 8 columns, 4 rows | ** 8 columns, 4 rows | ||
Line 73: | Line 107: | ||
** "PRESENTS" (third line) | ** "PRESENTS" (third line) | ||
** "CARDS...", "AND CODE" (4th line) | ** "CARDS...", "AND CODE" (4th line) | ||
+ | |||
+ | === CircuitPython Programming === | ||
+ | |||
+ | * [https://docs.circuitpython.org/projects/max7219/en/latest/index.html CircuitPython driver for the MAX7219 LED matrix driver chip docs] | ||
+ | |||
+ | <pre> | ||
+ | class adafruit_max7219.bcddigits.BCDDigits(spi: SPI, cs: DigitalInOut, nDigits: int = 1)[source] | ||
+ | Basic support for display on a 7-Segment BCD display controlled by a Max7219 chip using SPI. | ||
+ | Parameters | ||
+ | spi (SPI) – an spi busio or spi bitbangio object | ||
+ | cs (DigitalInOut) – digital in/out to use as chip select signal | ||
+ | nDigits (int) – number of led 7-segment digits; default 1; max 8 | ||
+ | </pre> | ||
+ | |||
+ | * [https://github.com/land-boards/QT-Py/tree/main/CircuitPython/circuitpythonBundles/adafruit-circuitpython-bundle-7.x-mpy-20220611/lib/adafruit_max7219 bcddigits.mpy example Code] | ||
=== VHDL Code === | === VHDL Code === | ||
Line 99: | Line 148: | ||
* Test single 8-digit modules | * Test single 8-digit modules | ||
* Test MAX7219X4 card with (4) 8-digit modules | * Test MAX7219X4 card with (4) 8-digit modules | ||
+ | * Test 3.3V operation on J1 (Rev 1 or Rev 2 or higher) | ||
+ | * Test 5V operation on J2 (Rev 2 and higher) | ||
− | === Test Single Modules === | + | === Test Single MAX7219 Modules === |
[[file:SensorShield_P1080453-720px.JPG]] | [[file:SensorShield_P1080453-720px.JPG]] | ||
Line 139: | Line 190: | ||
|} | |} | ||
− | === Test MAX7219X4 Card === | + | === Test MAX7219X4 Card 3.3V === |
[[file:MAX7219X4_TEST-720PX.png]] | [[file:MAX7219X4_TEST-720PX.png]] | ||
* [[ArduinoInABox]] | * [[ArduinoInABox]] | ||
+ | * Uses J1 Rev 1 UUT or Rev 2 UUT | ||
* Wiring Table | * Wiring Table | ||
Line 193: | Line 245: | ||
* Run [https://github.com/land-boards/lb-Arduino-Code/tree/master/LBCards/MAX7219X4/LBMAX7219X4_ADDR Demo code] | * Run [https://github.com/land-boards/lb-Arduino-Code/tree/master/LBCards/MAX7219X4/LBMAX7219X4_ADDR Demo code] | ||
* Displays 0-7, 8-F twice | * Displays 0-7, 8-F twice | ||
+ | * Displays all 8's | ||
+ | |||
+ | === Test MAX7219X4 Card 5V === | ||
+ | |||
+ | [[file:MAX7219X4_P18547_TEST_720PX.jpg]] | ||
+ | |||
+ | * Arduino UNO | ||
+ | * [[Arduino Sensor Shield]] | ||
+ | * Wiring Table | ||
+ | |||
+ | {| class="wikitable" | ||
+ | ! Signal | ||
+ | ! Shield | ||
+ | ! MAX7219X4 | ||
+ | ! Signal | ||
+ | ! Color | ||
+ | |- | ||
+ | | GND | ||
+ | | D12-S | ||
+ | | J2-6 | ||
+ | | GND | ||
+ | | BLK | ||
+ | |- | ||
+ | | D10 | ||
+ | | D10-S | ||
+ | | J2-3 | ||
+ | | CS | ||
+ | | BRN | ||
+ | |- | ||
+ | | D11 | ||
+ | | D11-S | ||
+ | | J2-4 | ||
+ | | CLK | ||
+ | | YEL | ||
+ | |- | ||
+ | | D12 | ||
+ | | D12-3 | ||
+ | | J2-2 | ||
+ | | DIN | ||
+ | | WHT | ||
+ | |- | ||
+ | | 5V | ||
+ | | D12-V | ||
+ | | J2-1 | ||
+ | | 5V | ||
+ | | RED | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | * Run [https://github.com/land-boards/lb-Arduino-Code/tree/master/LBCards/MAX7219X4/LBMAX7219X4_ADDR Demo code] | ||
+ | * Displays 0-7, 8-F twice | ||
+ | * Displays all 8's | ||
== "Red" Modules == | == "Red" Modules == | ||
− | |||
− | |||
* Incompatible pinouts | * Incompatible pinouts | ||
+ | ** Do '''not''' work with this card | ||
** Flipped from blue modules | ** Flipped from blue modules | ||
+ | |||
+ | [[file:RedModule_Overall_P1080454-720px.jpg]] | ||
[[file:RedModile_Left_P1080456-720px.jpg]] | [[file:RedModile_Left_P1080456-720px.jpg]] | ||
Line 216: | Line 321: | ||
* Card can be driven from one of the two interfaces | * Card can be driven from one of the two interfaces | ||
** 5V interface does not require 3.3V | ** 5V interface does not require 3.3V | ||
+ | * Tested / works | ||
[[file:MAX7219_Front_Rev2_3D.png]] | [[file:MAX7219_Front_Rev2_3D.png]] |
Latest revision as of 21:44, 16 August 2022
Contents
Features
- (4) MAX7219 8 digits, 7 Segment display modules
- 32 digits
- 4 rows
- 8 digits per row
- Can display decimal, hex values, some text values
- Each display has 8 of 7 segment LED displays
- Uses "Blue" LED cards
- ebay search
- Not compatible with red modules
- Rev 1 has 3.3V interface operation (J1)
- 3.3V to 5V Level shifter
- Requires both 3.3V and 5V power supplies
- 8 pin connector
- Rev 2 has 3.3V signal levels J1 (as above) or 5V signal levels (adds J2)
- Only requires 5V for 5V operation
- Level translator can still be installed but right connector must be used
- 95x95mm ODAS form factor
- (4) 6-32 mounting holes
Connectors
- Only 1 of the 2 connectors J1 or J2 can be used at a time
J1 Connector
- 3.3V signal level
- 5V power to LEDs
- 1x8 right angle header mounted on rear of card
- GND
- GND
- DOUT
- CLK
- CS
- DIN
- +3.3V
- +5V
J2 (Rev 2 and higher)
- +5V
- DIN
- CS
- CLK
- DOUT
- GND
Programming
Arduino Programming
Arduino Drivers
- MAX7219X4 Land Boards Arduino GitHub repository
- Uses Arduino LedControl library
- Library writes to multiple 8-digit displays
- Pins
- Arduino UNO pin 12 is connected to the DataIn
- Arduino UNO pin 11 is connected to the CLK
- Arduino UNO pin 10 is connected to CS
- Uses Arduino LedControl library
Arduino Example Code
LBMAX7219X4_ADDR
- Runs on Arduino in a Box
- 3.3V signals level
- Also requires 5V for LEDs
- 5V on Arduino in a Box] DC Power Jack
- 5V picked off VFILT jack
- LBMAX7219X4_ADDR
- void writeHexDigit(uint8_t rowVal, uint8_t colVal, uint8_t digitVal) - Write Hexadecimal digit to location
- 8 columns, 4 rows
- rowVal = 0 is top row in display
- colVal = 0 = left character
LBMAX7219X4_ADDR_5V
- Same as LBMAX7219X4_ADDR
- Runs on 5V Arduino UNO
- LBMAX7219X4_ADDR_5V
- void writeHexDigit(uint8_t rowVal, uint8_t colVal, uint8_t digitVal) - Write Hexadecimal digit to location
- 8 columns, 4 rows
- rowVal = 0 is top row in display
- colVal = 0 = left character
LBMAX7219X4
- LBMAX7219X4
- Displays Land-Boards channel intro video across the LEDs on 4 rows of 8-digits MAX7219X4 card
- "LAND-" (first line)
- "BOARDS" (second line)
- "PRESENTS" (third line)
- "CARDS...", "AND CODE" (4th line)
CircuitPython Programming
class adafruit_max7219.bcddigits.BCDDigits(spi: SPI, cs: DigitalInOut, nDigits: int = 1)[source] Basic support for display on a 7-Segment BCD display controlled by a Max7219 chip using SPI. Parameters spi (SPI) – an spi busio or spi bitbangio object cs (DigitalInOut) – digital in/out to use as chip select signal nDigits (int) – number of led 7-segment digits; default 1; max 8
VHDL Code
- MAX7219 VHDL code
- Instance
instance: MAX7219 generic map( devices => 2, intensity => (16#1#, 16#3#) ) port map ( clk => clock, data_vector => x"FEDCBA9876543210", clk_out => MAX7219_CLK, data_out => MAX7219_DATA, load_out => MAX7219_LOAD, reset_n => globalResetN );
Test
- Test single 8-digit modules
- Test MAX7219X4 card with (4) 8-digit modules
- Test 3.3V operation on J1 (Rev 1 or Rev 2 or higher)
- Test 5V operation on J2 (Rev 2 and higher)
Test Single MAX7219 Modules
SenShld | Desc | MAX J1 | Color |
---|---|---|---|
VCC | VCC | 1 | RED |
GND | GND | 2 | BLK |
D12 | DATAIN | 3 | WHT |
D10 | CS | 4 | BRN |
D11 | CLK | 5 | YEL |
Test MAX7219X4 Card 3.3V
- ArduinoInABox
- Uses J1 Rev 1 UUT or Rev 2 UUT
- Wiring Table
Signal | AiB | MAX7219X4 | Signal | Color |
---|---|---|---|---|
GND | J5-25 | J1-1 | GND | BLK |
D10 | J5-21 | J1-5 | CS | WHT |
D11 | J5-19 | J1-4 | CLK | YEL |
D12 | J5-17 | J1-6 | DIN | BLU |
+3.3V | J5-1 | J1-7 | +3.3V | RED |
VFILT | J9-1 | J1-8 | 5V | ORG |
- Run Demo code
- Displays 0-7, 8-F twice
- Displays all 8's
Test MAX7219X4 Card 5V
- Arduino UNO
- Arduino Sensor Shield
- Wiring Table
Signal | Shield | MAX7219X4 | Signal | Color |
---|---|---|---|---|
GND | D12-S | J2-6 | GND | BLK |
D10 | D10-S | J2-3 | CS | BRN |
D11 | D11-S | J2-4 | CLK | YEL |
D12 | D12-3 | J2-2 | DIN | WHT |
5V | D12-V | J2-1 | 5V | RED |
- Run Demo code
- Displays 0-7, 8-F twice
- Displays all 8's
"Red" Modules
- Incompatible pinouts
- Do not work with this card
- Flipped from blue modules
Mechanicals
Revision History
Rev 2
- Add 5V interface connector - J2
- Card can be driven from one of the two interfaces
- 5V interface does not require 3.3V
- Tested / works
- +5V
- DIN
- CS
- CLK
- DOUT
- GND
Rev 1
- Tested/works
- Requires 3.3V power and signal levels
- Requires 5V power