title: LED 8x8 Matrix with MAX7219 on ARM STM32 MikroC
body: <p>I would like to send some data to display it on LED 8x8 matrix which has MAX7219 chip on it. </p>
  
  <p>My MCU is ARM STM32F4 and I'm using MikroC as develop tool to program this peripheral.</p>
  
  <p>I am total beginner to this way of programming, so I would like to know how is sending text i.e. done from MCU to LED matrix. </p>
  
  <p>I've wrote some code, and when I turn on my MCU all 64 LEDs are shining constantly, I don't have idea why.</p>
  
  <pre><code>// MCU's CS/PE11 pin
  sbit Chip_Select at ODR11_GPIOE_ODR_bit;
  
  void main() {
  // Set PE11 as output pin (ChipSelect pin)
  GPIO_Digital_Output(&amp;GPIOE_BASE, _GPIO_PINMASK_11);
  
  // Initialization method from SPI library from mikroC 
  SPI2_Init();
  
    while (1) {
          // select led matrix
          Chip_Select = 0;
  
          // sending data to matrix
          SPI2_Write(0x01FF);
  
          // deselect led matrix
          Chip_Select = 1;
          Delay_ms(500);
    }
  } 
  </code></pre>
  
  <p>Hope anyone could help me get more familiar with this. </p>
  
  <p>Thanks in advance!</p>