資源簡介
TM1640兩線驅動,使用共陰驅動編碼,轉換成共陽驅動。所以在本代碼內,能看到共陰的驅動編碼。供學習參考。
代碼片段和文件信息
#pragma SFR
#pragma nop
#pragma EI
#pragma DI
#pragma?interrupt?INTTM51??ST
#pragma?ASM?
#pragma?realregister
#define??LED P4.1
#define??SCLK P2.4
#define??DIO????P2.5
#define??x1 P0.0
#define??x2 P0.1
#define??x3?????P12.0
#define??y1 P2.0
#define??y2 P2.1
#define??y3?????P2.2
#define??y4 P2.3
#define?DATA_COMMAND_Z 0x40
#define?DATA_COMMAND_G 0x44
#define?ADDR_START 0xc0
#define?DISP_CLOSE? 0x80
#define?DISP_OPEN 0x8f
void?initrial(void);
void?TM1640_Rest(void);
void?TM1640_Start(void);
void?TM1640_End(void);
void?TM1640_Write_Byte(unsigned?char?dat);
void?TM1640_Display(char?numchar?code);
void?Code_3(char?codechar?dat);
void?TM1640_Display_Code(void);
unsigned?cha
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????7571??2018-12-22?10:33??TM1640.c
-----------?---------??----------?-----??----
?????????????????7571????????????????????1
評論
共有 條評論