µµ¼­(BOOK)
Å°Æ®(KIT)
ƯÆÇ »óÇ°
Á¹¾÷ÀÛÇ°&ÀüÀÚ±âÃÊ
ÀÀ¿ë¸ðµâ
ÀüÀÚºÎÇ°
¸ðÅÍ
±â±¸
¿£Å¬·ÎÁ®
°³ÀΰáÁ¦¿ë
 
°í°´¼¾ÅÍ °Ô½ÃÆÇ
ÀÚÀ¯°Ô½ÃÆÇ
MCU ÅëÇÕ °Ô½ÃÆÇ
°­ÁÂ-RaspberryPi
°­ÁÂ-µå·Ð(ÄõµåÄßÅÍ)
°­ÁÂ-¾ÆµÎÀ̳ë(±âÃÊ)
°­ÁÂ-¾ÆµÎÀ̳ë(ÀÀ¿ë)
½ÅÁ¦Ç°/½Å±â¼ú ¼Ò°³
DIY °øÀÛ °Ô½ÃÆÇ
À±±³¼öÀÇ ¿¬±¸½Ç Ä®·³
 
 
 
1 ÀÚ·á½ÇÀÌ¿ë½Ã Âü°í»çÇ×
 
 
2 2024³â °©Áø³â (Ë£òãÒ´) »õ..
 
 
3 »ç¹«½Ç ÀÌÀü ¾È³»
 
 
4 2023 °è¹¦³â »õÇØ º¹ ¸¹ÀÌ..
 
 
5 AVR128DA64 Á¤º¹ Ãâ°£¾È³»
 
 
 
 
 
 
 ¢Ï : 02-776-4868

 £Æ: 02-779-6757
À̸ÞÀϹ®ÀÇ
 
¢Ñ ÆòÀÏ(¿ù~±Ý) : 10~17½Ã
¢Ñ ÁÖ¸», °øÈÞÀÏ ÈÞ¹«
 
±¹¹Î822437-04-008415
¢Ñ ¿¹±ÝÁÖ : À̹ÎÈñ(¿È»ç(OHM»ç))
 
 
1 À±±³¼öÀÇ ¸¶ÀÌÅ©·ÎÇÁ·Î¼¼¼­ ¿ùµå
 
2 (ÁÖ)¼®¿µºê¶óÀ̽ºÅæ
 

 

 
°­ÁÂ-¾ÆµÎÀ̳ë(±âÃÊ)
 
2014. 05. 20 (11:07)
Á¦¸ñ[¾ÆµÎÀ̳ë] 14. µµÆ®¸ÞÆ®¸¯½º – MAX7219
ÀÛ¼ºÀÚohmsa Á¶È¸ : 13535

14. µµÆ®¸ÞÆ®¸¯½º – MAX7219


À̹ø °­Á¿¡¼­´Â µµÆ®¸ÞÆ®¸¯½º Á¦¾î¿¡ ´ëÇؼ­ ¾Ë¾Æ º¸µµ·Ï ÇÑ´Ù. 8x8 LED µµÆ®¸ÞÆ®¸¯½º¸¦ ÀÌ¿ëÇϸç MAX7219 LED Display Driver¸¦ ÀÌ¿ëÇÑ ¹æ¹ý¿¡ ´ëÇؼ­ ¾Ë¾Æº»´Ù. ¾ÆµÎÀÌ³ë ¶óÀ̺귯¸®¸¦ Ãß°¡ÇÏ¿© ¿¹Á¦¸¦ ±¸µ¿ÇØ º¸¸é¼­ »ìÆì º¸ÀÚ.

 

MAX7219´Â 7-Segment¸¦ ±¸µ¿ÇÒ °æ¿ì¿¡ ÁÖ·Î »ç¿ëÇÏÁö¸¸, À̹ø °­ÁÂÀÇ ¿¹Ã³·³ µµÆ®¸ÞÆ®¸¯½º¸¦ Á÷Á¢ Á¦¾î°¡ °¡´ÉÇÏ´Ù.

MAX7219´Â ¾Æ·¡ ÀÀ¿ëȸ·Î¸¦ ÂüÁ¶ÇÏ´Â °ÍÀ¸·Î ¼³¸íÀ» ´ë½ÅÇÏ°Ú´Ù. °¢ÀÚ µ¥ÀÌÅͽÃÆ®¸¦ º¸¸é¼­ ÀÚ¼¼ÇÑ ³»¿ëÀº Âü°íÇϱ⠹ٶõ´Ù.



¿©±â¼­ Áß¿äÇÑ ³»¿ëÀº MCU¿Í ¿¬°á ÇÒ °æ¿ì, ´ÜÁö 3°³ÀÇ Çɸ¸À» ÇÊ¿ä·Î ÇÑ´Ù´Â °ÍÀÌ´Ù. À̸¦ ²À ±â¾ïÇÏ°í ³Ñ¾î °¡µµ·Ï ÇÑ´Ù.

 

À̹ø °­Á¿¡¼­ »ç¿ëÇÏ°Ô µÉ 8x8 µµÆ®¸ÞÆ®¸¯½º ¸ðµâÀº ´ÙÀ½°ú °°´Ù.



°ü·Ã ȸ·Î´Â ¾Æ·¡ ȸ·Îµµ¸¦ Âü°íÇÑ´Ù,


¾ÆµÎÀ̳ë¿Í´Â ´ÙÀ½°ú °°ÀÌ È¸·Î¸¦ ±¸¼ºÇÑ´Ù.


 

¸ðµâ¿¡ Àü¿ø°ú Á¦¾î ½ÅÈ£ 3Çɸ¸ ¿¬°áÇÏ¸é ½±°Ô ±¸µ¿ÇÒ ¼ö ÀÖ´Ù.

½ÇÁ¦ °á¼±Àº ´ÙÀ½°ú °°ÀÌ ±¸¼ºÇÑ´Ù.



¿¹Á¦¸¦ ¿­¾î¼­ µ¿ÀÛÀ» ½ÃÄÑ º¸±â Àü¿¡, ¹Ì¸® ÀÛ¾÷À» ÇØ¾ß ÇÒ ³»¿ëÀÌ ÀÖ´Ù. ¾ÆµÎÀÌ³ë °³¹ßȯ°æ¿¡´Â ÀÌ ¶óÀ̺귯¸®°¡ Æ÷ÇԵǾî ÀÖÁö ¾Ê±â ¶§¹®¿¡ Á÷Á¢ °ø½Ä »çÀÌÆ®¿¡¼­ ´Ù¿îÀ» ¹Þ¾Æ¼­ ¶óÀ̺귯¸® Æú´õ¿¡ ÀúÀåÇϵµ·Ï ÇÏÀÚ.

 

http://playground.arduino.cc/Main/LedControlDemos

 

À§ ¸µÅ©¿¡¼­ º¸¸é, »¡°£ ¹Ú½º·Î Ç¥½ÃÇÑ ºÎºÐÀÇ ÆÄÀÏÀ» ¹Þ¾Æ¼­ ÀúÀåÇϵµ·Ï ÇÑ´Ù.




À§¿Í °°ÀÌ [LCDemoMatrix] ¿¹Á¦¸¦ ¿­¾î º¸µµ·Ï ÇÏÀÚ.


//We always have to include the library


#include "LedControl.h"

LedControl lc=LedControl(2,3,4,1);

 

/* we always wait a bit between updates of the display */

 

unsigned long delaytime=100;

 

void setup() {

 

  /*

 

   The MAX72XX is in power-saving mode on startup,

 

   we have to do a wakeup call

 

   */

 

  lc.shutdown(0,false);

 

  /* Set the brightness to a medium values */

 

  lc.setIntensity(0,8);

 

  /* and clear the display */

 

  lc.clearDisplay(0);

}

 

/*

 

 This method will display the characters for the

 

 word "Arduino" one after the other on the matrix.

 

 (you need at least 5x7 leds to see the whole chars)

 

 */

 

void writeArduinoOnMatrix() {

 

  /* here is the data for the characters */

 

  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 i[5]={B00000000,B00100010,B10111110,B00000010,B00000000};

 

  byte n[5]={B00111110,B00010000,B00100000,B00100000,B00011110};

 

  byte o[5]={B00011100,B00100010,B00100010,B00100010,B00011100};

 

  /* now display them one by one with a small delay */

 

  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]);

 

  delay(delaytime);

 

  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]);

 

  delay(delaytime);

 

  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]);

 

  delay(delaytime);

 

  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]);

 

  delay(delaytime);

 

  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]);

 

  delay(delaytime);

 

  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]);

 

  delay(delaytime);

 

  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]);

 

  delay(delaytime);

 

  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);

 

  delay(delaytime);

 

}

 

/*

 

  This function lights up a some Leds in a row.

 

 The pattern will be repeated on every row.

 

 The pattern will blink along with the row-number.

 

 row number 4 (index==3) will blink 4 times etc.

 

 */

 

void rows() {

 

  for(int row=0;row<8;row++) {

 

    delay(delaytime);

 

    lc.setRow(0,row,B10100000);

 

    delay(delaytime);

 

    lc.setRow(0,row,(byte)0);

 

    for(int i=0;i

 

      delay(delaytime);

 

      lc.setRow(0,row,B10100000);

 

      delay(delaytime);

 

      lc.setRow(0,row,(byte)0);

 

    }

 

  }

 

}

 

/*

 

  This function lights up a some Leds in a column.

 

 The pattern will be repeated on every column.

 

 The pattern will blink along with the column-number.

 

 column number 4 (index==3) will blink 4 times etc.

 

 */

 

void columns() {

 

  for(int col=0;col<8;col++) {

 

    delay(delaytime);

 

    lc.setColumn(0,col,B10100000);

 

    delay(delaytime);

 

    lc.setColumn(0,col,(byte)0);

 

    for(int i=0;i

 

      delay(delaytime);

 

      lc.setColumn(0,col,B10100000);

 

      delay(delaytime);

 

      lc.setColumn(0,col,(byte)0);

 

    }

 

  }

 

}

 

/*

 

 This function will light up every Led on the matrix.

 

 The led will blink along with the row-number.

 

 row number 4 (index==3) will blink 4 times etc.

 

 */

 

void single() {

 

  for(int row=0;row<8;row++) {

 

    for(int col=0;col<8;col++) {

 

      delay(delaytime);

 

      lc.setLed(0,row,col,true);

 

      delay(delaytime);

 

      for(int i=0;i

 

        lc.setLed(0,row,col,false);

 

        delay(delaytime);

 

        lc.setLed(0,row,col,true);

 

        delay(delaytime);

 

      }

 

    }

 

  }

 

}

 

void loop() {

 

  writeArduinoOnMatrix();

 

  rows();

 

  columns();

 

  single();

 

}

 

 

Á» ±æ´Ù¡¦.^^


¿¹Á¦¸¦ ±¸µ¿ÇØ º¸¸é, ºü¸£°Ô Áö³ª°¡´Â  arduino ±ÛÀÚ¿Í ´Ù¾çÇÑ ÆÐÅϵéÀ» Ç¥ÇöÇÏ°í ÀÖ´Ù. ¾Æ·¡ µ¿¿µ»óÀ» Âü°í Çϵµ·Ï ÇÏÀÚ.


ÁÖ¿ä Äڵ带 »ìÆì º¸µµ·Ï ÇÏÀÚ.

 

           #include "LedControl.h"

 

´õ ÀÌ»ó ¸» ¾È Çصµ ¾Ë°ÚÁÒ? ¶óÀ̺귯¸®¸¦ »ç¿ëÇϴϱñ¡¦

 

           LedControl lc=LedControl(2,3,4,1);

           LedControl(dataPin,clockPin,csPin,numDevices)

 

»õ·Î¿î ÀνºÅϽº¸¦ »ý¼ºÇÏ°í, °¢ ÆĶó¹ÌÅ͸¦ ÁöÁ¤ÇØ ÁØ´Ù.

 

Á¦¾îÇÉ 3ÇÉÀº SPI ½ÅÈ£¿¡ ´ëÇÑ Æ÷Æ® Á¤ÀǸ¦ ÇØ ÁØ´Ù. ¸¶Áö¸·¿¡ numDevice´Â ¿¬°áµÈ ¸ðµâÀÇ ¼ö¸¦ ÁöÁ¤ÇÑ´Ù. ¿¹Á¦¿¡¼­´Â 1°³¸¸ »ç¿ëÇϱâ 떄¹®¿¡, ÀÌ °ªÀÌ 1·Î µÇ¾î ÀÖÁö¸¸, cascade·Î ¿©·¯ °³°¡ ¿¬°áµÇ¾î ÀÖÀ¸¸é, ¿¬°áµÇ¾î ÀÖ´Â ¼ýÀÚ¸¸Å­ Àû¾î ÁÖ¸é µÈ´Ù.

 

           lc.shutdown(0,false);

       shutdown(int addr, bool b);

 

power saving ¸ðµå¸¦ À§ÇÑ ÇÔ¼öÀ̸ç, addrÀº Á¦¾î¸¦ À§ÇÑ µð¹ÙÀ̽ºÀÇ ÁÖ¼ÒÀ̸ç, b´Â true¸é power saving ¸ðµå, falseÀ̸é Á¤»ó ¸ðµåÀÌ´Ù.

 

          lc.setIntensity(0,8);

       setIntensity(int addr, int intensity);

 

µð½ºÇ÷¹ÀÌÀÇ ¹à±â¸¦ ÁöÁ¤ÇØ ÁØ´Ù. addrÀº µð¹ÙÀ̽º ÁÖ¼ÒÀ̸ç, Intensity´Â ¹à±âÀÇ ´Ü°è·Î 0(¾îµÎ¿ò)ºÎÅÍ 15(¹àÀ½)±îÁö ÁöÁ¤ÇÒ ¼ö ÀÖ´Ù.

 

           lc.clearDisplay(0);

       clearDisplay(int addr); 

 

µð½ºÇ÷¹ÀÌÀÇ ¸ðµç LED¸¦ OFF½ÃŲ´Ù.

 

            lc.setRow(0,0,a[0]);

       setRow(int addr, int row, byte value);  

 

ÇÑ rowÀÇ 8°³ LED¿¡ ´ëÇؼ­ ¼³Á¤ÇÑ´Ù. addrÀº µð¹ÙÀ̽º ÁÖ¼ÒÀ̸ç, row´Â ¼³Á¤ ÇÏ°íÀÚ ÇÏ´Â rowÀÌ°í, value´Â ´ëÀÀµÇ´Â 8°³ LEDÀÇ »óŸ¦ Ç¥½ÃÇÑ´Ù.

 

           lc.setColumn(0,col,B10100000);

void setColumn(int addr, int col, byte value);

 

 ÇÑ columnÀÇ 8°³ LED¿¡ ´ëÇؼ­ ¼³Á¤ÇÑ´Ù. addrÀº µð¹ÙÀ̽º ÁÖ¼ÒÀ̸ç, col´Â ¼³Á¤ ÇÏ°íÀÚ ÇÏ´Â columnÀÌ°í, value´Â ´ëÀÀµÇ´Â 8°³ LEDÀÇ »óŸ¦ Ç¥½ÃÇÑ´Ù.

 

          lc.setLed(0,row,col,true);

      setLed(int addr, int row, int col, boolean state);

 

ÇØ´ç À§Ä¡ÀÇ LED¸¦ ON/OFF ½ÃŲ´Ù. addrÀº µð¹ÙÀ̽º ÁÖ¼ÒÀ̸ç, row¿Í colÀº °¢°¢ row¿Í columnÀÇ À§Ä¡ÀÌ´Ù. ÀÌ °ªÀº 0-7·Î ÁöÁ¤ÀÌ °¡´ÉÇÏ´Ù. state´Â true¸é LED ON, false¸é LED OFF°¡ µÈ´Ù.

 

Â÷±ÙÂ÷±Ù À§ÀÇ ¿¹Á¦¸¦ ºÐ¼®ÇØ º¸¸é¼­, ÀÌÇظ¦ Çϵµ·Ï ÇÏÀÚ.

 

¸Å¹ø °­Á¿¡¼­´Â °¡´ÉÇÑ ¶óÀ̺귯¸®¸¦ »ç¿ëÇÏ·Á°í Çß´Ù. ±× ÀÌÀ¯´Â ¾ÆµÎÀ̳ë´Â Çϵå¿þ¾î¿¡ ½±°Ô Á¢±ÙÀ» ÇÏ°íÀÚ ÇÏ´Â »ç¶÷µéÀ» À§Çؼ­ ¸¸µé¾î Áø °Íó·³ ÀÌ °­Á¿¡¼­´Â ÇÁ·Î±×·¥ ±â¹ýÀ» °¡¸£Ä¡Áö ¾Ê°í Á¦°øµÈ ¶óÀ̺귯¸®¸¦ ½±°Ô »ç¿ëÇÒ ¼ö ÀÖ´Â ¹æÇâ¿¡ ÃÊÁ¡À» µÎ¾ú±â ¶§¹®ÀÌ´Ù. ÇÁ·Î±×·¥ ±â¹ýÀº °æÇèÀÌ ¸¹À»¼ö·Ï ½×ÀÌ°Ô µÇ´Â °ÍÀ̱⠶§¹®¿¡ ¿©±â¼­ ±îÁö´Â ´Ù·ê ÇÊ¿ä°¡ ¾ø´Ù°í »ý°¢µÈ´Ù.

 

¾î´Àµ¡ ´ÙÀ½ °­Á°¡ ¸¶Áö¸·ÀÌ´Ù. ¹°·Ð, ±âÃÊ¿¡ ´ëÇÑ °­Á°¡ ¸¶Áö¸·ÀÌ´Ù. ¸¶Áö¸·À» ¾î¶² ³»¿ëÀ¸·Î ÇÒÁö ¾ÆÁ÷ °áÁ¤ÀÌ µÇÁö ¾Ê¾ÒÁö¸¸¡¦À½¡¦°èȹ ¾øÀÌ °­Á ¿¬ÀçÇÑ´Ù°í ¿åÇϰڴ°É~~

 

ÀÌ·± Àú·± Ä«Æ並 º¸´Ù º¸´Ï, ¼­º¸ ¸ðÅÍ Á¦¾î¿¡ ´ëÇؼ­ Áú¹®ÀÌ ¸¹Àº ÆíÀ̾ ¼­º¸ ¸ðÅ͸¦ ´Ù·ï º¼±î ÇÑ´Ù¡¦..°©Àڱ⠸¾ÀÌ º¯ÇÒ ¼öµµ ÀÖÀ¸´Ï ¸¶Áö¸· °­Á´ ²À È®ÀÎ ÇØ º¸¼¼¿ä¡¦


ºñ¹Ð¹øÈ£ È®ÀÎ ´Ý±â
name password
  Content name date hits
[¾ÆµÎÀ̳ë] 14. µµÆ®¸ÞÆ®¸¯½º – MAX7219  
2014/05/20 13535


Copyright ¨Ï µµ¼­ÃâÆÇ ¿È»ç All Rights Reserved. ¢Ï : 02-776-4868 ,£Æ: 02-779-6757
»óÈ£¸í : ¿È»ç(OHM»ç) »ç¾÷Àå¼ÒÀçÁö : ¼­¿ïƯº°½Ã ¿µµîÆ÷±¸ ´ë¸²·Î170-1, 1Ãþ(´ë¸²µ¿)
»ç¾÷ÀÚµî·Ï¹øÈ£ : 416-18-31168 [»ç¾÷ÀÚÁ¤º¸È®ÀÎ] Åë½ÅÆǸž÷½Å°í¹øÈ£ : Á¦2023-¼­¿ï¿ë»ê-1034È£
´ëÇ¥ : À̹ÎÈñ °³ÀÎÁ¤º¸ º¸È£ Ã¥ÀÓÀÚ : Á¤È«±â