Skip to content

Instantly share code, notes, and snippets.

@ThaiEasyElec
Created January 28, 2020 08:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ThaiEasyElec/88e767d31332cc65c8d81751a3581fad to your computer and use it in GitHub Desktop.
Save ThaiEasyElec/88e767d31332cc65c8d81751a3581fad to your computer and use it in GitHub Desktop.
LED_Dot_Matrix_16x16.ino
#include <Arduino.h>
#include <avr/pgmspace.h>
#include <SPI.h>
const byte STCP_PIN = 7; // Latch
const byte DS_PIN = 11; // Data In
const byte SHCP_PIN = 13; // CLK
#define LEDARRAY_D 2 // ขาที่ใช้ในการควบคุมแถวแนวนอน
#define LEDARRAY_C 3 // ขาที่ใช้ในการควบคุมแถวแนวนอน
#define LEDARRAY_B 4 // ขาที่ใช้ในการควบคุมแถวแนวนอน
#define LEDARRAY_A 5 // ขาที่ใช้ในการควบคุมแถวแนวนอน
#define LEDARRAY_G 6 // ขาที่ใช้ในการควบคุมการส่งข้อมูล ขา EN
#define runs 1000 // ยิ่งน้อย = Fast : ยิ่งมาก = Slow
#define Display_Num_Word 7 //จำนวนโมดูลที่ใช้นการต่อ
unsigned char Display_Buffer[Display_Num_Word*2];
unsigned char Display_Swap_Buffer[Display_Num_Word][32];
bool Shift_Bit = 0;
bool Flag_Shift = 0;
unsigned int Timer0_Count = 0;
unsigned char temp = 0x80;
unsigned int Shift_Count = 0;
unsigned int Display_Word_Count = 0;
unsigned char Message_index = 0;
unsigned char serial_pos[100] = {10,10,10,10,10}; //ข้อมูลเริ่มต้อนการทำงาน
unsigned char serial_index = 5;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment