添加了数码管的字模
This commit is contained in:
+25
-2
@@ -13,6 +13,29 @@
|
||||
#define MOTA(x) HAL_GPIO_WritePin(MOTA_GPIO_Port, MOTA_Pin, x);
|
||||
#define MOTB(x) HAL_GPIO_WritePin(MOTB_GPIO_Port, MOTB_Pin, x);
|
||||
|
||||
const char d_num_data[2][10]=
|
||||
{
|
||||
{
|
||||
0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f
|
||||
},
|
||||
{
|
||||
0xed,0x48,0xe6,0x6e,0x4b,0x2f,0xaf,0x68,0xef,0x6f
|
||||
}
|
||||
};
|
||||
|
||||
struct
|
||||
{
|
||||
char d_num[4];
|
||||
char dot1:1;
|
||||
char dot2:1;
|
||||
char dot3:1;
|
||||
char dot4:1;
|
||||
char led_run:1;
|
||||
char led_p:1;
|
||||
char led_n:1;
|
||||
char led_err:1;
|
||||
}dis_buff;
|
||||
|
||||
void Send_to_595(char h,char l)
|
||||
{
|
||||
|
||||
@@ -55,8 +78,8 @@ void mymain()
|
||||
HC595_RCK(0);
|
||||
HC595_SCK(0);
|
||||
|
||||
Send_to_595(0x00,0x00);
|
||||
|
||||
Send_to_595(0x00,0x6f);
|
||||
dis_buff.d_num[0]=1;
|
||||
while(1)
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user