#include "fw_hal.h"Go to the source code of this file.
Macros | |
| #define | MAX7219_CS P55 |
| #define | DECODE_MODE 0x09 |
| #define | INTENSITY 0x0A |
| #define | SCAN_LIMIT 0x0B |
| #define | SHUT_DOWN 0x0C |
| #define | DISPLAY_TEST 0x0F |
Functions | |
| void | MAX7219_write (uint8_t addr, uint8_t dat) |
| void | MAX7219_init (void) |
| void | SPI_init (void) |
| void | main () |
Variables | |
| const uint8_t | numbers [] |
| #define DECODE_MODE 0x09 |
Definition at line 54 of file max7219_8x8led_stc8g1k08.c.
| #define DISPLAY_TEST 0x0F |
Definition at line 58 of file max7219_8x8led_stc8g1k08.c.
| #define INTENSITY 0x0A |
Definition at line 55 of file max7219_8x8led_stc8g1k08.c.
| #define MAX7219_CS P55 |
Demo: MAX7219 8x8 LED Matrix Board: STC8G1K08, STC8G1K08A
P5.4 -> DIN P3.2 -> SCLK P5.5 -> CS
PlatformIO configuration example
[env:stc8g1k08] platform = intel_mcs51 board = stc8g1k08 build_flags = -D__CONF_FOSC=36864000UL -D__CONF_MCU_MODEL=MCU_MODEL_STC8G1K08 -D__CONF_CLKDIV=0x00 -D__CONF_IRCBAND=0x01 -D__CONF_VRTRIM=0x20 -D__CONF_IRTRIM=0xA3 -D__CONF_LIRTRIM=0x03 upload_protocol = custom upload_port = /dev/ttyUSB0 upload_speed = 115200 upload_flags = -p$UPLOAD_PORT -s$UPLOAD_SPEED -e upload_command = ${platformio.packages_dir}/tool-stc8prog/stc8prog $UPLOAD_FLAGS -f $SOURCE
Definition at line 52 of file max7219_8x8led_stc8g1k08.c.
| #define SCAN_LIMIT 0x0B |
Definition at line 56 of file max7219_8x8led_stc8g1k08.c.
| #define SHUT_DOWN 0x0C |
Definition at line 57 of file max7219_8x8led_stc8g1k08.c.
| void main | ( | void | ) |
Definition at line 119 of file max7219_8x8led_stc8g1k08.c.
| void MAX7219_init | ( | void | ) |
Definition at line 90 of file max7219_8x8led_stc8g1k08.c.
Definition at line 82 of file max7219_8x8led_stc8g1k08.c.
| void SPI_init | ( | void | ) |
Definition at line 99 of file max7219_8x8led_stc8g1k08.c.
| const uint8_t numbers[] |
Definition at line 60 of file max7219_8x8led_stc8g1k08.c.