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 MCU clock, init GPIO, init MAX7219 and 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

Samsung Smart TV Remote Control Receiver STM32F103C8T6

When you output your Samsung Smart TV audio to optical SPDIP, the volume control will not work because it wsork on fixed volume. So I build ...