a.txt
资源名称:a.rar [点击查看]
上传用户:lhdljz
上传日期:2021-11-17
资源大小:4k
文件大小:2k
源码类别:

多媒体

开发平台:

Visual C++

  1. #include <msp430x44x.h>
  2. #include <string.h>
  3. #include <stdio.h>
  4. //定义液晶显示笔画
  5. #define a  (0x01)
  6. #define b  (0x02)
  7. #define c  (0x10)
  8. #define d  (0x08)
  9. #define e  (0x40)
  10. #define f  (0x20)
  11. #define g  (0x04)
  12. //#define h  (0x80)
  13. //显示字符的指针
  14.  const unsigned char LCD_Tab[] = {
  15.                                   a+b+c+d+e+f     ,//显示 "0", LCD_Tab[00]
  16.                                   b+c             ,//显示 "1", LCD_Tab[01]
  17.                                   a+b+d+e+g       ,//显示 "2", LCD_Tab[02]
  18.                                   a+b+c+d+g       ,//显示 "3", LCD_Tab[03]
  19.                                   b+c+f+g         ,//显示 "4", LCD_Tab[04]
  20.                                   a+c+d+f+g       ,//显示 "5", LCD_Tab[05]
  21.                                   a+c+d+e+f+g     ,//显示 "6", LCD_Tab[06]
  22.                                   a+b+c           ,//显示 "7", LCD_Tab[07]
  23.                                   a+b+c+d+e+f+g   ,//显示 "8", LCD_Tab[08]
  24.                                   a+b+c+d+f+g     ,//显示 "9", LCD_Tab[09]
  25.                                   a+b+c+e+f+g     ,//显示 "A", LCD_Tab[0A]
  26.                                   c+d+e+f+g       ,//显示 "b", LCD_Tab[0B]
  27.                                   a+d+e+f         ,//显示 "C", LCD_Tab[0C]
  28.                                   b+c+d+e+g       ,//显示 "d", LCD_Tab[0D]
  29.                                   a+d+e+f+g       ,//显示 "E", LCD_Tab[0E]
  30.                                   a+e+f+g         ,//显示 "F", LCD_Tab[0F]
  31.                                   0               ,//显示 " ", LCD_Tab[10]
  32.                                  };