Nov 24, 2017

MAX7219 8-digits 7-segment (STM32F103C8T6)

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:
MAX7219_SendAddrDat(0x08,LEDcode[(a/10000000)]+0x80);
0x08 is the digit number, 0x80 is the command to turn on the decimal point.

Get the code here.
https://drive.google.com




No comments:

Post a Comment

P10 Module x2 Running Text (STM32F103C8T6)

Interested to build a running text display made of two P10 modules? The text looks shaky on video but actually not, recording quality ...