#include "fw_hal.h"Go to the source code of this file.
Macros | |
| #define | MAX7219_CS P17 |
| #define | MAX7219_BLOCKS 4 |
| #define | DECODE_MODE 0x09 |
| #define | INTENSITY 0x0A |
| #define | SCAN_LIMIT 0x0B |
| #define | SHUT_DOWN 0x0C |
| #define | DISPLAY_TEST 0x0F |
Functions | |
| void | MAX7219_singeWrite (uint8_t index, uint8_t addr, uint8_t dat) |
| void | MAX7219_multiWrite (uint8_t addr, uint8_t len, uint8_t *dat) |
| void | MAX7219_init (void) |
| void | SPI_init (void) |
| void | main () |
Variables | |
| const uint8_t | numbers [] |
| uint8_t | val [MAX7219_BLOCKS] |
| uint8_t | character_len = sizeof(numbers) / 8 |
| #define DECODE_MODE 0x09 |
Definition at line 55 of file max7219_8x8led_4in1.c.
| #define DISPLAY_TEST 0x0F |
Definition at line 59 of file max7219_8x8led_4in1.c.
| #define INTENSITY 0x0A |
Definition at line 56 of file max7219_8x8led_4in1.c.
| #define MAX7219_BLOCKS 4 |
Definition at line 53 of file max7219_8x8led_4in1.c.
| #define MAX7219_CS P17 |
Demo: MAX7219 8x8 LED Matrix 4 in 1 Board: STC8H1K08
P1.3 -> DIN P1.5 -> SCLK P1.7 -> 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_4in1.c.
| #define SCAN_LIMIT 0x0B |
Definition at line 57 of file max7219_8x8led_4in1.c.
| #define SHUT_DOWN 0x0C |
Definition at line 58 of file max7219_8x8led_4in1.c.
| void main | ( | void | ) |
| | |_______________________| A B
pos: point to the bit for boundary A lpos: point to the bit for boundary B
Definition at line 160 of file max7219_8x8led_4in1.c.
| void MAX7219_init | ( | void | ) |
Definition at line 128 of file max7219_8x8led_4in1.c.
Definition at line 117 of file max7219_8x8led_4in1.c.
Definition at line 103 of file max7219_8x8led_4in1.c.
| void SPI_init | ( | void | ) |
Definition at line 140 of file max7219_8x8led_4in1.c.
Definition at line 101 of file max7219_8x8led_4in1.c.
| const uint8_t numbers[] |
Definition at line 61 of file max7219_8x8led_4in1.c.
| uint8_t val[MAX7219_BLOCKS] |
Definition at line 100 of file max7219_8x8led_4in1.c.