Cov txheej txheem:

MAX7219 LED Dot Matrix Assembly thiab Kev Xeem: 6 Cov Kauj Ruam (nrog Duab)
MAX7219 LED Dot Matrix Assembly thiab Kev Xeem: 6 Cov Kauj Ruam (nrog Duab)

Video: MAX7219 LED Dot Matrix Assembly thiab Kev Xeem: 6 Cov Kauj Ruam (nrog Duab)

Video: MAX7219 LED Dot Matrix Assembly thiab Kev Xeem: 6 Cov Kauj Ruam (nrog Duab)
Video: MAX7219 8x8 LED MATRIX ASSEMBLY AND TESTING using ARDUINO 2024, Hlis ntuj nqeg
Anonim
Image
Image
Txheeb Pob
Txheeb Pob

Dot-Matrix Display yog cov cuab yeej tso saib uas muaj lub teeb pom kev tawm ntawm lub diodes ua ke nyob rau hauv daim ntawv ntawm matrix. Scrolling motion. Dot Matrix Display tau tsim tawm hauv ntau qhov ntev xws li 5x7, 8x8, 16x8, 128x16, 128x32 thiab 128x64 qhov twg cov lej sawv cev LED's hauv kab thiab kab, Tsis tas li cov lus no los hauv cov xim sib txawv xws li Liab, Ntsuab, Daj, Xiav, Txiv kab ntxwv, Dawb.

Hauv Cov Lus Qhia no, Kuv yuav hla kev cuam tshuam nrog 8x8 Dot Matrix uas muaj MAX7219 tus tsav tsheb mus rau Arduino Uno. Let's pib.

Khoom siv

MAX7219

Kauj Ruam 1: Txheeb Pob

Raws li koj tuaj yeem pom kuv muaj smt version ntawm lub rooj tsav tsheb, nws yog ib qho tseem ceeb heev los txheeb xyuas txhua qhov thiab txhua yam khoom siv xav tau raws li cov khoom siv smd me me me me thiab koj tuaj yeem plam lawv tau yooj yim. smt version rau nws qhov loj me.

Kauj Ruam 2: Me Me Txog Qhov Tshwj Xeeb Dot Matrix

Me Me Txog Qhov Tshwj Xeeb Dot Matrix
Me Me Txog Qhov Tshwj Xeeb Dot Matrix

ib tus qauv tuaj yeem tsav tus 8x8 dot matrix ntau cathode.

Kev khiav hauj lwm muaj zog: 5 v

Qhov ntev: ntev 3.2 cm X 3.2 cm dav X 1.3 cm siab, qhov nrog plaub tus ntsia hlau, txoj kab uas hla ntawm 3 hli

Modules nrog cov tswv yim thiab tso tawm cuam tshuam, txhawb rau cascading ntau cov qauv.

Cov ntaub ntawv IN thiab OUT cov davhlau ya nyob twg tau teev tseg ntawm tus qauv.

Kauj Ruam 3: MAX7219 Tsav Tsheb

MAX7219 Tsav Tsheb
MAX7219 Tsav Tsheb
MAX7219 Tsav Tsheb
MAX7219 Tsav Tsheb

MAX7219 yog IC tsim los tswj 8x8 LED MATRIX. IC yog cov lus tawm tswv yim ib txwm muaj-cathode (Common Negative) tso saib cov tsav tsheb uas cuam tshuam cov microprocessors (lossis microcontroller) mus rau 7-ntu lej lej LED qhia txog 8 tus lej, bar-graph qhia, lossis 64 tus kheej LEDs.

Nta thiab Specifications

Kev ua haujlwm voltage ntau: +4.0 txog +5.5V

Pom zoo ua haujlwm voltage: +5V

Qhov siab tshaj qhov hluav taws xob: 6V

Qhov siab tshaj tam sim no tau kos los ntawm txhua ntu ntu: 100mA

Qhov siab tshaj tam sim no tau tso cai los ntawm txhua tus lej hauv av: 500mA

Tsawg zog siv

Cov Ntaub Ntawv-rau-Ntu Ncua Sijhawm: 2.2mSec

Ua haujlwm kub: 0 ° C txog +70 ° C

Cia Kub: -65 ° C txog +150 ° C

Kauj ruam 4: Circuit Court

Qhov Circuit
Qhov Circuit
Qhov Circuit
Qhov Circuit

Lub Circuit Court yog qhov yooj yim heev thiab tuaj yeem tsim los siv txiv neej rau poj niam jumper xov hlau. Tsuas yog ua raws tus pinout thiab tsim lub Circuit Court. Tom qab koj tuaj yeem sib sau ua ke ntawm PCB yog tias koj tab tom ua daim ntawv thov tas mus li rau Matrix.

Tus Pin Configuration yog raws li hauv qab no:

  • Vcc rau 5V Pin ntawm Arduino.
  • Gnd rau Gnd Pin ntawm Arduino.
  • DIN rau Digital Pin 12 ntawm Arduino.
  • CS rau Digital Pin 11 ntawm Arduino
  • CLK rau Digital Pin 10 ntawm Arduino.

Kauj ruam 5: Txoj Cai

Ntawm no hauv Cov Lus Qhia Kuv yuav muab ob qho lej sib txawv rau koj. Ib tus yuav tsim qee cov tsiaj ntawv Askiv thiab luag ntxhi ntawm Matrix. Lwm qhov yuav ua rau tag nrho 64 LEDs teeb pom kev ib ntawm ib qho. Koj yuav tsum siv lub lledcontrol library kom nws ua haujlwm.

Nov yog cov cai rau cov tsiaj ntawv Askiv thiab luag nyav

#suav nrog int DIN = 12; int CS = 11; int CLK = 10; byte e [8] = {0x7C, 0x7C, 0x60, 0x7C, 0x7C, 0x60, 0x7C, 0x7C}; byte d [8] = {0x78, 0x7C, 0x66, 0x66, 0x66, 0x66, 0x7C, 0x78}; byte u [8] = {0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x7E, 0x7E}; byte c [8] = {0x7E, 0x7E, 0x60, 0x60, 0x60, 0x60, 0x7E, 0x7E}; byte yim [8] = {0x7E, 0x7E, 0x66, 0x7E, 0x7E, 0x66, 0x7E, 0x7E}; byte s [8] = {0x7E, 0x7C, 0x60, 0x7C, 0x3E, 0x06, 0x3E, 0x7E}; byte dot [8] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18}; byte o [8] = {0x7E, 0x7E, 0x66, 0x66, 0x66, 0x66, 0x66, 0x7E, 0x7E}; byte m [8] = {0xE7, 0xFF, 0xFF, 0xDB, 0xDB, 0xDB, 0xC3, 0xC3}; LedControl lc = LedControl (DIN, CLK, CS, 0); teeb tsa tsis muaj dab tsi () {lc.shutdown (0, tsis tseeb); // MAX72XX nyob rau hauv hom kev txuag hluav taws xob thaum pib lc.setIntensity (0, 15); // Teeb lub teeb ci kom siab tshaj tus nqi lc.clearDisplay (0); // thiab tshem cov zaub} void loop () {byte luag ntxhi [8] = {0x3C, 0x42, 0xA5, 0x81, 0xA5, 0x99, 0x42, 0x3C}; byte nruab nrab [8] = {0x3C, 0x42, 0xA5, 0x81, 0xBD, 0x81, 0x42, 0x3C}; byte frown [8] = {0x3C, 0x42, 0xA5, 0x81, 0x99, 0xA5, 0x42, 0x3C}; printByte (luag); ncua (1000); printByte (nruab nrab); ncua (1000); printByte (luag nyav); ncua (1000); printEduc8s (); lc.clearDisplay (0); ncua (1000); } tsis muaj dabtsis printEduc8s () {printByte (e); ncua (1000); printByte (d); cov. ncua (1000); printByte (ua); ncua (1000); printByte (c); cov ncua (1000); printByte (yim); ncua (1000); printByte (tus); ncua (1000); printByte (teev); ncua (1000); printByte (c); cov ncua (1000); printByte (ua); ncua (1000); printByte (m); cov ncua (1000); } void printByte (byte character ) {int kuv = 0; rau (kuv = 0; kuv <8; kuv ++) {lc.setRow (0, kuv, tus cim )); }}

thiab txoj cai ntsuas txhua 64 LEDs

// Peb ib txwm yuav tsum suav nrog lub tsev qiv ntawv#suav nrog "LedControl.h"

/*

Tam sim no peb xav tau LedControl los ua haujlwm nrog. ***** Cov lej tus lej no tej zaum yuav tsis ua haujlwm nrog koj cov cuab yeej ***** tus pin 12 txuas nrog rau DataIn tus pin 10 txuas nrog CLK tus pin 11 txuas nrog LOAD Peb tsuas muaj ib qho MAX72XX nkaus xwb. */ LedControl lc = LedControl (12, 11, 10, 1);

/ * peb ib txwm tos me ntsis ntawm kev hloov kho tshiab ntawm cov zaub */

unsigned ntev ncua sijhawm = 100;

void teeb tsa () {

/ * MAX72XX yog nyob rau hauv hom kev txuag hluav taws xob ntawm kev pib, peb yuav tsum hu xov tooj rau sawv daws */ lc.shutdown (0, tsis tseeb); / * Teeb qhov ci ci rau qhov nruab nrab qhov tseem ceeb */ lc.setIntensity (0, 8); / * thiab tshem cov zaub */ lc.clearDisplay (0); }

/*

Txoj hauv kev no yuav tso tawm cov cim rau lo lus "Arduino" ib qho dhau ib qho ntawm daim ntawv. (koj xav tau tsawg kawg 5x7 leds kom pom tag nrho cov cim) */ tsis muaj dab tsi sauArduinoOnMatrix () {/ *nov yog cov ntaub ntawv rau cov cim */ byte a [5] = {B01111110, B10001000, B10001000, B10001000, B01111110}; byte r [5] = {B00111110, B00010000, B00100000, B00100000, B00010000}; byte d [5] = {B00011100, B00100010, B00100010, B00010010, B11111110}; byte u [5] = {B00111100, B00000010, B00000010, B00000100, B00111110}; byte kuv [5] = {B00000000, B00100010, B10111110, B00000010, B00000000}; byte n [5] = {B00111110, B00010000, B00100000, B00100000, B00011110}; byte o [5] = {B00011100, B00100010, B00100010, B00100010, B00011100};

/ * tam sim no tso saib lawv ib ntawm ib qho nrog kev ncua me me */

lc.setRow (0, 0, a [0]); lc.setRow (0, 1, a [1]); lc.setRow (0, 2, a [2]); lc.setRow (0, 3, a [3]); lc.setRow (0, 4, a [4]); ncua (ncua sijhawm); lc.setRow (0, 0, r [0]); lc.setRow (0, 1, r [1]); lc.setRow (0, 2, r [2]); lc.setRow (0, 3, r [3]); lc.setRow (0, 4, r [4]); ncua (ncua sijhawm); lc.setRow (0, 0, d [0]); lc.setRow (0, 1, d [1]); lc.setRow (0, 2, d [2]); lc.setRow (0, 3, d [3]); lc.setRow (0, 4, d [4]); ncua (ncua sijhawm); lc.setRow (0, 0, u [0]); lc.setRow (0, 1, u [1]); lc.setRow (0, 2, u [2]); lc.setRow (0, 3, u [3]); lc.setRow (0, 4, u [4]); ncua (ncua sijhawm); lc.setRow (0, 0, i [0]); lc.setRow (0, 1, i [1]); lc.setRow (0, 2, i [2]); lc.setRow (0, 3, i [3]); lc.setRow (0, 4, i [4]); ncua (ncua sijhawm); lc.setRow (0, 0, n [0]); lc.setRow (0, 1, n [1]); lc.setRow (0, 2, n [2]); lc.setRow (0, 3, n [3]); lc.setRow (0, 4, n [4]); ncua (ncua sijhawm); lc.setRow (0, 0, o [0]); lc.setRow (0, 1, o [1]); lc.setRow (0, 2, o [2]); lc.setRow (0, 3, o [3]); lc.setRow (0, 4, o [4]); ncua (ncua sijhawm); lc.setRow (0, 0, 0); lc.setRow (0, 1, 0); lc.setRow (0, 2, 0); lc.setRow (0, 3, 0); lc.setRow (0, 4, 0); ncua (ncua sijhawm); }

/*

Txoj haujlwm no teeb qee qhov Leds uake. Tus qauv yuav rov ua dua ntawm txhua kab. Tus qauv yuav ntsais nrog rau kab-tus lej. kab zauv 4 (ntsuas == 3) yuav ntsais 4 zaug thiab lwm yam */ tsis muaj kab () {rau (int kab = 0; kab lus <8; kab ++) {ncua (ncua sijhawm)); lc.setRow (0, kab, B10100000); ncua (ncua sijhawm); lc.setRow (0, kab, (byte) 0); rau (int i = 0; i

/*

Txoj haujlwm no teeb qee qhov Leds hauv kab. Tus qauv yuav rov ua dua ntawm txhua kab ntawv. Tus qauv yuav ntsais nrog rau kab ntawv-tus lej. kem tus lej 4 (qhov ntsuas == 3) yuav ntsais 4 zaug thiab lwm yam */ void columns () {rau (int col = 0; col <8; col ++) {ncua (ncua sijhawm)); lc.setColumn (0, col, B10100000); ncua (ncua sijhawm); lc.setColumn (0, col, (byte) 0); rau (int i = 0; i

/*

Qhov kev ua haujlwm no yuav ua kom pom txhua Led ntawm lub matrix. Cov coj yuav ntsais nrog rau kab-tus lej. kab ntawv 4 (qhov ntsuas == 3) yuav ntsais 4 zaug thiab lwm yam */ tsis muaj ib leeg () {rau (int kab = 0; kab ntawv <8; kab ntawv ++) {rau (int col = 0; col <8; col ++) { ncua (ncua sijhawm); lc.setLed (0, kab, col, tseeb); ncua (ncua sijhawm); rau (int i = 0; i

void voj () {

writeArduinoOnMatrix (); kab (); kab (); tib (); }

Kauj Ruam 6: Cov Lus Tso Tawm

Image
Image
Cov Zis
Cov Zis
Cov Zis
Cov Zis
Cov Zis
Cov Zis

Saib cov vis dis aus tag nrho ntawm no: -MAX7219 8x8 LED MATRIX ASSEMBLY THIAB TESTING siv ARDUINO

Zoo txhua txoj haujlwm nyuaj no, them nyiaj zoo heev thaum koj pom qhov tshwm sim. Nws tsim nyog nws !!

Sau npe yuav mus rau kuv tus youtube channel: -Creative Stuff

Pom zoo: