微波EDA网,见证研发工程师的成长!
首页 > 硬件设计 > 嵌入式设计 > 第83节:矩阵键盘输入任意数字或小数点的液晶屏显示程序

第83节:矩阵键盘输入任意数字或小数点的液晶屏显示程序

时间:11-22 来源:互联网 点击:

  1. oid key_scan(); //按键扫描函数 放在定时中断里
  2. void initial_myself();
  3. void initial_peripheral();
  4. void lcd_display_service(void); //应用层面的液晶屏显示程序
  5. void clear_all_canvas(void);//把画布全部清零
  6. code unsigned char Zf816_0[]=
  7. {
  8. /*--文字:0--*/
  9. /*--宋体12;此字体下对应的点阵为:宽x高=8x16 --*/
  10. 0x00,0x00,0x00,0x18,0x24,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x24,0x18,0x00,0x00,
  11. };
  12. code unsigned char Zf816_1[]=
  13. {
  14. /*--文字:1--*/
  15. /*--宋体12;此字体下对应的点阵为:宽x高=8x16 --*/
  16. 0x00,0x00,0x00,0x10,0x70,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x7C,0x00,0x00,
  17. };
  18. code unsigned char Zf816_2[]=
  19. {
  20. /*--文字:2--*/
  21. /*--宋体12;此字体下对应的点阵为:宽x高=8x16 --*/
  22. 0x00,0x00,0x00,0x3C,0x42,0x42,0x42,0x04,0x04,0x08,0x10,0x20,0x42,0x7E,0x00,0x00,
  23. };
  24. code unsigned char Zf816_3[]=
  25. {
  26. /*--文字:3--*/
  27. /*--宋体12;此字体下对应的点阵为:宽x高=8x16 --*/
  28. 0x00,0x00,0x00,0x3C,0x42,0x42,0x04,0x18,0x04,0x02,0x02,0x42,0x44,0x38,0x00,0x00,
  29. };
  30. code unsigned char Zf816_4[]=
  31. {
  32. /*--文字:4--*/
  33. /*--宋体12;此字体下对应的点阵为:宽x高=8x16 --*/
  34. 0x00,0x00,0x00,0x04,0x0C,0x14,0x24,0x24,0x44,0x44,0x7E,0x04,0x04,0x1E,0x00,0x00,
  35. };
  36. code unsigned char Zf816_5[]=
  37. {
  38. /*--文字:5--*/
  39. /*--宋体12;此字体下对应的点阵为:宽x高=8x16 --*/
  40. 0x00,0x00,0x00,0x7E,0x40,0x40,0x40,0x58,0x64,0x02,0x02,0x42,0x44,0x38,0x00,0x00,
  41. };
  42. code unsigned char Zf816_6[]=
  43. {
  44. /*--文字:6--*/
  45. /*--宋体12;此字体下对应的点阵为:宽x高=8x16 --*/
  46. 0x00,0x00,0x00,0x1C,0x24,0x40,0x40,0x58,0x64,0x42,0x42,0x42,0x24,0x18,0x00,0x00,
  47. };
  48. code unsigned char Zf816_7[]=
  49. {
  50. /*--文字:7--*/
  51. /*--宋体12;此字体下对应的点阵为:宽x高=8x16 --*/
  52. 0x00,0x00,0x00,0x7E,0x44,0x44,0x08,0x08,0x10,0x10,0x10,0x10,0x10,0x10,0x00,0x00,
  53. };
  54. code unsigned char Zf816_8[]=
  55. {
  56. /*--文字:8--*/
  57. /*--宋体12;此字体下对应的点阵为:宽x高=8x16 --*/
  58. 0x00,0x00,0x00,0x3C,0x42,0x42,0x42,0x24,0x18,0x24,0x42,0x42,0x42,0x3C,0x00,0x00,
  59. };
  60. code unsigned char Zf816_9[]=
  61. {
  62. /*--文字:9--*/
  63. /*--宋体12;此字体下对应的点阵为:宽x高=8x16 --*/
  64. 0x00,0x00,0x00,0x18,0x24,0x42,0x42,0x42,0x26,0x1A,0x02,0x02,0x24,0x38,0x00,0x00,
  65. };
  66. code unsigned char Zf816_nc[]=//空字模
  67. {
  68. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  69. };
  70. code unsigned char Zf816_dot[]=//小数点
  71. {
  72. /*--文字:.--*/
  73. /*--宋体12;此字体下对应的点阵为:宽x高=8x16 --*/
  74. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x60,0x00,0x00,
  75. };
  76. code unsigned char Zf816_mao_hao[]=//冒号
  77. {
  78. /*--文字::--*/
  79. /*--宋体12;此字体下对应的点阵为:宽x高=8x16 --*/
  80. 0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,
  81. };
  82. code unsigned char Hz1616_yi[]=
  83. {
  84. /*--文字:一--*/
  85. /*--宋体12;此字体下对应的点阵为:宽x高=16x16 --*/
  86. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x7F,0xFE,
  87. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  88. };
  89. code unsigned char Hz1616_xiang[]=
  90. {
  91. /*--文字:项--*/
  92. /*--宋体12;此字体下对应的点阵为:宽x高=16x16 --*/
  93. 0x00,0x00,0x03,0xFE,0xFC,0x20,0x10,0x40,0x11,0xFC,0x11,0x04,0x11,0x24,0x11,0x24,
  94. 0x11,0x24,0x11,0x24,0x1D,0x24,0xE1,0x34,0x00,0x48,0x01,0x86,0x06,0x02,0x00,0x00,
  95. };
  96. code unsigned char Hz1616_shu[]=
  97. {
  98. /*--文字:数--*/
  99. /*--宋体12;此字体下对应的点阵为:宽x高=16x16 --*/
  100. 0x08,0x20,0x49,0x30,0x2A,0x20,0x1C,0x20,0xFF,0x7E,0x1C,0x44,0x2B,0x44,0x48,0xC4,
  101. 0x08,0x28,0xFF,0x28,0x12,0x10,0x34,0x10,0x0C,0x28,0x32,0x4E,0xC0,0x84,0x00,0x00,
  102. };
  103. code unsigned char Hz1616_zhu[]=
  104. {
  105. /*--文字:组--*/
  106. /*--宋体12;此字体下对应的点阵为:宽x高=16x16 --*/
  107. 0x10,0x00,0x19,0xF8,0x11,0x08,0x25,0x08,0x25,0x08,0x79,0xF8,0x09,0x08,0x11,0x08,
  108. 0x21,0x08,0x7D,0xF8,0x01,0x08,0x01,0x08,0x0D,0x08,0x73,0xFE,0x00,0x00,0x00,0x00,
  109. };
  110. /* 注释一:
  111. * 以下是画布显示数组。横向是6个字节,纵向16行,可以显示3个16x16的汉字.
  112. *注意,这节内容的画布跟前面章节的画布大小不一样,前面章

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top