I made MAX7219 for C51 but now I need it for STM32F103 too.
The wiring is simple:
MAX7219_CLK hooked up to PORTA0,
MAX7219_DIN to PORTA1,
MAX7219_CS to PORTA2.
The software initiate the clock, GPIO, MAX7219 and then display is ready to use.
Just call _DisplayInt procedure and pass the value, it will display the integer on the seven segments.
If you need to turn-on the decimal point, just add 0x80 to the digit to display, example:
0x08 is the digit number, 0x80 is the command to turn on the decimal point.
Get the code here.