3510i.h
上传用户:hzhsqp
上传日期:2022-07-28
资源大小:37k
文件大小:34k
源码类别:

驱动编程

开发平台:

C/C++

  1. //接口定义
  2. sbit  cs=P2^0;  //片选
  3. sbit  rest=P2^1;  //复位
  4. sbit  sdata=P2^3;  //数据
  5. sbit  sclk=P2^4;  //时钟
  6. unsigned char Ver='A';  //驱动版本,默认为A版本,一共4个版本
  7. //8*12字符
  8. unsigned char code zifu[]={         
  9. /*--  文字:     --*/
  10. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  11. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  12. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  13. /*--  文字:  !  --*/
  14. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  15. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  16. 0x00,0x00,0x20,0x20,0x20,0x20,0x20,0x20,0x00,0x20,0x00,0x00,
  17. /*--  文字:  "  --*/
  18. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  19. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  20. 0x00,0x28,0x50,0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  21. /*--  文字:  #  --*/
  22. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  23. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  24. 0x00,0x00,0x28,0x28,0xFC,0x28,0x50,0xFC,0x50,0x50,0x00,0x00,
  25. /*--  文字:  $  --*/
  26. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  27. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  28. 0x00,0x20,0x78,0xA8,0xA0,0x60,0x30,0x28,0xA8,0xF0,0x20,0x00,
  29. /*--  文字:  %  --*/
  30. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  31. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  32. 0x00,0x00,0x48,0xA8,0xB0,0x50,0x28,0x34,0x54,0x48,0x00,0x00,
  33. /*--  文字:  &  --*/
  34. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  35. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  36. 0x00,0x00,0x20,0x50,0x50,0x78,0xA8,0xA8,0x90,0x6C,0x00,0x00,
  37. /*--  文字:  '  --*/
  38. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  39. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  40. 0x00,0x40,0x40,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  41. /*--  文字:  (  --*/
  42. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  43. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  44. 0x00,0x04,0x08,0x10,0x10,0x10,0x10,0x10,0x10,0x08,0x04,0x00,
  45. /*--  文字:  )  --*/
  46. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  47. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  48. 0x00,0x40,0x20,0x10,0x10,0x10,0x10,0x10,0x10,0x20,0x40,0x00,
  49. /*--  文字:  *  --*/
  50. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  51. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  52. 0x00,0x00,0x00,0x20,0xA8,0x70,0x70,0xA8,0x20,0x00,0x00,0x00,
  53. /*--  文字:  +  --*/
  54. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  55. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  56. 0x00,0x00,0x20,0x20,0x20,0xF8,0x20,0x20,0x20,0x00,0x00,0x00,
  57. /*--  文字:  ,  --*/
  58. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  59. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  60. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x40,0x80,
  61. /*--  文字:  -  --*/
  62. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  63. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  64. 0x00,0x00,0x00,0x00,0x00,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,
  65. /*--  文字:  .  --*/
  66. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  67. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  68. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,
  69. /*--  文字:  /  --*/
  70. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  71. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  72. 0x00,0x08,0x10,0x10,0x10,0x20,0x20,0x40,0x40,0x40,0x80,0x00,
  73. /*--  文字:  0  --*/
  74. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  75. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  76. 0x00,0x00,0x70,0x88,0x88,0x88,0x88,0x88,0x88,0x70,0x00,0x00,
  77. /*--  文字:  1  --*/
  78. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  79. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  80. 0x00,0x00,0x20,0x60,0x20,0x20,0x20,0x20,0x20,0x70,0x00,0x00,
  81. /*--  文字:  2  --*/
  82. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  83. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  84. 0x00,0x00,0x70,0x88,0x88,0x10,0x20,0x40,0x80,0xF8,0x00,0x00,
  85. /*--  文字:  3  --*/
  86. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  87. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  88. 0x00,0x00,0x70,0x88,0x08,0x30,0x08,0x08,0x88,0x70,0x00,0x00,
  89. /*--  文字:  4  --*/
  90. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  91. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  92. 0x00,0x00,0x10,0x30,0x50,0x50,0x90,0x78,0x10,0x18,0x00,0x00,
  93. /*--  文字:  5  --*/
  94. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  95. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  96. 0x00,0x00,0xF8,0x80,0x80,0xF0,0x08,0x08,0x88,0x70,0x00,0x00,
  97. /*--  文字:  6  --*/
  98. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  99. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  100. 0x00,0x00,0x70,0x90,0x80,0xF0,0x88,0x88,0x88,0x70,0x00,0x00,
  101. /*--  文字:  7  --*/
  102. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  103. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  104. 0x00,0x00,0xF8,0x90,0x10,0x20,0x20,0x20,0x20,0x20,0x00,0x00,
  105. /*--  文字:  8  --*/
  106. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  107. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  108. 0x00,0x00,0x70,0x88,0x88,0x70,0x88,0x88,0x88,0x70,0x00,0x00,
  109. /*--  文字:  9  --*/
  110. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  111. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  112. 0x00,0x00,0x70,0x88,0x88,0x88,0x78,0x08,0x48,0x70,0x00,0x00,
  113. /*--  文字:  :  --*/
  114. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  115. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  116. 0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x20,0x00,0x00,
  117. /*--  文字:  ;  --*/
  118. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  119. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  120. 0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x20,0x20,0x00,
  121. /*--  文字:  <  --*/
  122. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  123. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  124. 0x00,0x04,0x08,0x10,0x20,0x40,0x20,0x10,0x08,0x04,0x00,0x00,
  125. /*--  文字:  =  --*/
  126. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  127. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  128. 0x00,0x00,0x00,0x00,0xF8,0x00,0x00,0xF8,0x00,0x00,0x00,0x00,
  129. /*--  文字:  >  --*/
  130. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  131. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  132. 0x00,0x40,0x20,0x10,0x08,0x04,0x08,0x10,0x20,0x40,0x00,0x00,
  133. /*--  文字:  ?  --*/
  134. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  135. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  136. 0x00,0x00,0x70,0x88,0x88,0x10,0x20,0x20,0x00,0x20,0x00,0x00,
  137. /*--  文字:  @  --*/
  138. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  139. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  140. 0x00,0x00,0x70,0x88,0x98,0xA8,0xA8,0xB8,0x80,0x78,0x00,0x00,
  141. /*--  文字:  A  --*/
  142. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  143. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  144. 0x00,0x00,0x20,0x20,0x30,0x50,0x50,0x78,0x48,0xCC,0x00,0x00,
  145. /*--  文字:  B  --*/
  146. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  147. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  148. 0x00,0x00,0xF0,0x48,0x48,0x70,0x48,0x48,0x48,0xF0,0x00,0x00,
  149. /*--  文字:  C  --*/
  150. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  151. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  152. 0x00,0x00,0x78,0x88,0x80,0x80,0x80,0x80,0x88,0x70,0x00,0x00,
  153. /*--  文字:  D  --*/
  154. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  155. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  156. 0x00,0x00,0xF0,0x48,0x48,0x48,0x48,0x48,0x48,0xF0,0x00,0x00,
  157. /*--  文字:  E  --*/
  158. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  159. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  160. 0x00,0x00,0xF8,0x48,0x50,0x70,0x50,0x40,0x48,0xF8,0x00,0x00,
  161. /*--  文字:  F  --*/
  162. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  163. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  164. 0x00,0x00,0xF8,0x48,0x50,0x70,0x50,0x40,0x40,0xE0,0x00,0x00,
  165. /*--  文字:  G  --*/
  166. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  167. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  168. 0x00,0x00,0x38,0x48,0x80,0x80,0x9C,0x88,0x48,0x30,0x00,0x00,
  169. /*--  文字:  H  --*/
  170. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  171. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  172. 0x00,0x00,0xCC,0x48,0x48,0x78,0x48,0x48,0x48,0xCC,0x00,0x00,
  173. /*--  文字:  I  --*/
  174. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  175. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  176. 0x00,0x00,0xF8,0x20,0x20,0x20,0x20,0x20,0x20,0xF8,0x00,0x00,
  177. /*--  文字:  J  --*/
  178. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  179. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  180. 0x00,0x00,0x7C,0x10,0x10,0x10,0x10,0x10,0x10,0x90,0xE0,0x00,
  181. /*--  文字:  K  --*/
  182. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  183. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  184. 0x00,0x00,0xEC,0x48,0x50,0x60,0x50,0x50,0x48,0xEC,0x00,0x00,
  185. /*--  文字:  L  --*/
  186. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  187. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  188. 0x00,0x00,0xE0,0x40,0x40,0x40,0x40,0x40,0x44,0xFC,0x00,0x00,
  189. /*--  文字:  M  --*/
  190. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  191. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  192. 0x00,0x00,0xD8,0xD8,0xD8,0xD8,0xA8,0xA8,0xA8,0xA8,0x00,0x00,
  193. /*--  文字:  N  --*/
  194. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  195. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  196. 0x00,0x00,0xDC,0x48,0x68,0x68,0x58,0x58,0x48,0xE8,0x00,0x00,
  197. /*--  文字:  O  --*/
  198. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  199. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  200. 0x00,0x00,0x70,0x88,0x88,0x88,0x88,0x88,0x88,0x70,0x00,0x00,
  201. /*--  文字:  P  --*/
  202. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  203. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  204. 0x00,0x00,0xF0,0x48,0x48,0x70,0x40,0x40,0x40,0xE0,0x00,0x00,
  205. /*--  文字:  Q  --*/
  206. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  207. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  208. 0x00,0x00,0x70,0x88,0x88,0x88,0x88,0xE8,0x98,0x70,0x18,0x00,
  209. /*--  文字:  R  --*/
  210. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  211. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  212. 0x00,0x00,0xF0,0x48,0x48,0x70,0x50,0x48,0x48,0xEC,0x00,0x00,
  213. /*--  文字:  S  --*/
  214. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  215. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  216. 0x00,0x00,0x78,0x88,0x80,0x60,0x10,0x08,0x88,0xF0,0x00,0x00,
  217. /*--  文字:  T  --*/
  218. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  219. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  220. 0x00,0x00,0xF8,0xA8,0x20,0x20,0x20,0x20,0x20,0x70,0x00,0x00,
  221. /*--  文字:  U  --*/
  222. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  223. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  224. 0x00,0x00,0xCC,0x48,0x48,0x48,0x48,0x48,0x48,0x30,0x00,0x00,
  225. /*--  文字:  V  --*/
  226. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  227. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  228. 0x00,0x00,0xCC,0x48,0x48,0x50,0x50,0x30,0x20,0x20,0x00,0x00,
  229. /*--  文字:  W  --*/
  230. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  231. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  232. 0x00,0x00,0xA8,0xA8,0xA8,0x70,0x50,0x50,0x50,0x50,0x00,0x00,
  233. /*--  文字:  X  --*/
  234. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  235. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  236. 0x00,0x00,0xD8,0x50,0x50,0x20,0x20,0x50,0x50,0xD8,0x00,0x00,
  237. /*--  文字:  Y  --*/
  238. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  239. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  240. 0x00,0x00,0xD8,0x50,0x50,0x20,0x20,0x20,0x20,0x70,0x00,0x00,
  241. /*--  文字:  Z  --*/
  242. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  243. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  244. 0x00,0x00,0xF8,0x90,0x10,0x20,0x20,0x40,0x48,0xF8,0x00,0x00,
  245. /*--  文字:  [  --*/
  246. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  247. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  248. 0x00,0x38,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x38,0x00,
  249. /*--  文字:    --*/
  250. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  251. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  252. 0x00,0x40,0x40,0x40,0x20,0x20,0x10,0x10,0x10,0x08,0x00,0x00,
  253. /*--  文字:  ]  --*/
  254. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  255. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  256. 0x00,0x70,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x70,0x00,
  257. /*--  文字:  ^  --*/
  258. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  259. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  260. 0x00,0x20,0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  261. /*--  文字:  _  --*/
  262. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  263. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  264. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,
  265. /*--  文字:  `  --*/
  266. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  267. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  268. 0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  269. /*--  文字:  a  --*/
  270. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  271. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  272. 0x00,0x00,0x00,0x00,0x00,0x30,0x48,0x38,0x48,0x3C,0x00,0x00,
  273. /*--  文字:  b  --*/
  274. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  275. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  276. 0x00,0x00,0xC0,0x40,0x40,0x70,0x48,0x48,0x48,0x70,0x00,0x00,
  277. /*--  文字:  c  --*/
  278. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  279. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  280. 0x00,0x00,0x00,0x00,0x00,0x38,0x48,0x40,0x40,0x38,0x00,0x00,
  281. /*--  文字:  d  --*/
  282. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  283. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  284. 0x00,0x00,0x18,0x08,0x08,0x38,0x48,0x48,0x48,0x3C,0x00,0x00,
  285. /*--  文字:  e  --*/
  286. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  287. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  288. 0x00,0x00,0x00,0x00,0x00,0x30,0x48,0x78,0x40,0x38,0x00,0x00,
  289. /*--  文字:  f  --*/
  290. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  291. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  292. 0x00,0x00,0x1C,0x20,0x20,0x78,0x20,0x20,0x20,0x78,0x00,0x00,
  293. /*--  文字:  g  --*/
  294. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  295. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  296. 0x00,0x00,0x00,0x00,0x00,0x3C,0x48,0x30,0x40,0x78,0x44,0x38,
  297. /*--  文字:  h  --*/
  298. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  299. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  300. 0x00,0x00,0xC0,0x40,0x40,0x70,0x48,0x48,0x48,0xEC,0x00,0x00,
  301. /*--  文字:  i  --*/
  302. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  303. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  304. 0x00,0x00,0x20,0x00,0x00,0x60,0x20,0x20,0x20,0x70,0x00,0x00,
  305. /*--  文字:  j  --*/
  306. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  307. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  308. 0x00,0x00,0x10,0x00,0x00,0x30,0x10,0x10,0x10,0x10,0x10,0xE0,
  309. /*--  文字:  k  --*/
  310. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  311. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  312. 0x00,0x00,0xC0,0x40,0x40,0x5C,0x50,0x70,0x48,0xEC,0x00,0x00,
  313. /*--  文字:  l  --*/
  314. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  315. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  316. 0x00,0x00,0xE0,0x20,0x20,0x20,0x20,0x20,0x20,0xF8,0x00,0x00,
  317. /*--  文字:  m  --*/
  318. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  319. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  320. 0x00,0x00,0x00,0x00,0x00,0xF0,0xA8,0xA8,0xA8,0xA8,0x00,0x00,
  321. /*--  文字:  n  --*/
  322. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  323. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  324. 0x00,0x00,0x00,0x00,0x00,0xF0,0x48,0x48,0x48,0xEC,0x00,0x00,
  325. /*--  文字:  o  --*/
  326. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  327. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  328. 0x00,0x00,0x00,0x00,0x00,0x30,0x48,0x48,0x48,0x30,0x00,0x00,
  329. /*--  文字:  p  --*/
  330. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  331. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  332. 0x00,0x00,0x00,0x00,0x00,0xF0,0x48,0x48,0x48,0x70,0x40,0xE0,
  333. /*--  文字:  q  --*/
  334. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  335. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  336. 0x00,0x00,0x00,0x00,0x00,0x38,0x48,0x48,0x48,0x38,0x08,0x1C,
  337. /*--  文字:  r  --*/
  338. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  339. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  340. 0x00,0x00,0x00,0x00,0x00,0xD8,0x60,0x40,0x40,0xE0,0x00,0x00,
  341. /*--  文字:  s  --*/
  342. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  343. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  344. 0x00,0x00,0x00,0x00,0x00,0x78,0x40,0x30,0x08,0x78,0x00,0x00,
  345. /*--  文字:  t  --*/
  346. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  347. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  348. 0x00,0x00,0x00,0x20,0x20,0x70,0x20,0x20,0x20,0x18,0x00,0x00,
  349. /*--  文字:  u  --*/
  350. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  351. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  352. 0x00,0x00,0x00,0x00,0x00,0xD8,0x48,0x48,0x48,0x3C,0x00,0x00,
  353. /*--  文字:  v  --*/
  354. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  355. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  356. 0x00,0x00,0x00,0x00,0x00,0xEC,0x48,0x50,0x30,0x20,0x00,0x00,
  357. /*--  文字:  w  --*/
  358. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  359. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  360. 0x00,0x00,0x00,0x00,0x00,0xA8,0xA8,0x70,0x50,0x50,0x00,0x00,
  361. /*--  文字:  x  --*/
  362. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  363. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  364. 0x00,0x00,0x00,0x00,0x00,0xD8,0x50,0x20,0x50,0xD8,0x00,0x00,
  365. /*--  文字:  y  --*/
  366. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  367. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  368. 0x00,0x00,0x00,0x00,0x00,0xEC,0x48,0x50,0x30,0x20,0x20,0xC0,
  369. /*--  文字:  z  --*/
  370. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  371. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  372. 0x00,0x00,0x00,0x00,0x00,0x78,0x10,0x20,0x20,0x78,0x00,0x00,
  373. /*--  文字:  {  --*/
  374. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  375. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  376. 0x00,0x18,0x10,0x10,0x10,0x20,0x10,0x10,0x10,0x10,0x18,0x00,
  377. /*--  文字:  |  --*/
  378. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  379. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  380. 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
  381. /*--  文字:  }  --*/
  382. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  383. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  384. 0x00,0x60,0x20,0x20,0x20,0x10,0x20,0x20,0x20,0x20,0x60,0x00,
  385. /*--  文字:  ~  --*/
  386. /*--  宋体9;  此字体下对应的点阵为:宽x高=6x12   --*/
  387. /*--  宽度不是8的倍数,现调整为:宽度x高度=8x12  --*/
  388. 0x40,0xA4,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  389.     
  390. };  
  391. //16*16汉字
  392. unsigned char code hanzi[]={
  393. /*---------------雨----------------*/
  394. 0x00,0x4F,0xFE,0x4,0x7,0xFC,0x66,0x45,0x54,0x44,0x46,0x64,0x55,0x44,0x44,0x45,
  395. 0xC0,0x00,
  396. /*---------------亭----------------*/
  397. 0x04,0x07,0xFC,0x00,0x01,0xF8,0x10,0x8F,0xFE,0x80,0x23,0xF8,0x04,0x00,0x40,0x1C,
  398. 0x00,0x00,
  399. /*---------------电----------------*/
  400. 0x04,0x00,0x44,0x7F,0xE4,0x44,0x7F,0xC4,0x44,0x44,0x47,0xFC,0x44,0x00,0x42,0x03,
  401. 0xE0,0x00,
  402. /*---------------子----------------*/
  403. 0x7F,0xC0,0x08,0x01,0x00,0x60,0x04,0x4F,0xFE,0x04,0x00,0x40,0x04,0x00,0x40,0x1C,
  404. 0x00,0x00,   
  405. /*---------------我----------------*/
  406. 0x0A,0x8F,0x24,0x12,0x0F,0xFE,0x12,0x01,0x64,0x3A,0x8D,0x10,0x13,0x21,0xCA,0x70,
  407. 0x60,0x00,
  408. /*---------------是----------------*/
  409. 0x1F,0x81,0x08,0x1F,0x81,0x08,0x1F,0x80,0x00,0xFF,0xE2,0x40,0x37,0xC4,0xC0,0x87,
  410. 0xE0,0x00,
  411. /*---------------企----------------*/
  412. 0x04,0x00,0x60,0x09,0x01,0x08,0x24,0x6C,0x40,0x17,0x81,0x40,0x14,0x01,0x40,0xFF,
  413. 0xE0,0x00,
  414. /*---------------鹅----------------*/
  415. 0x30,0x8D,0xBC,0x52,0x4F,0xB4,0x52,0xC7,0x60,0xDB,0xE5,0x02,0x6B,0xE4,0xA2,0xC6,
  416. 0xC0,0x00,
  417. /*---------------我----------------*/
  418. 0x0A,0x8F,0x24,0x12,0x0F,0xFE,0x12,0x01,0x64,0x3A,0x8D,0x10,0x13,0x21,0xCA,0x70,
  419. 0x60,0x00,
  420. /*---------------怕----------------*/
  421. 0x21,0x02,0x20,0x27,0xEB,0x42,0xAC,0x2A,0x42,0x27,0xE2,0x42,0x24,0x22,0x42,0x27,
  422. 0xE0,0x00,
  423. /*---------------谁----------------*/
  424. 0x45,0x02,0x48,0x0F,0xE0,0xC8,0xD7,0xE4,0x48,0x44,0x84,0x7E,0x54,0x86,0x7E,0x04,
  425. 0x00,0x00,
  426. /*-------------------------------*/
  427. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  428. 0x00,0x00,
  429. };
  430. //40*40图片
  431. unsigned char code img[1600] = { /* 0X08,0X08,0X28,0X00,0X28,0X00, */
  432. 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
  433. 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
  434. 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
  435. 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XDB,0X92,0X6D,0X45,0X24,0X24,0X24,0X24,0X49,
  436. 0X92,0XB6,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
  437. 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XDB,0X6D,0X24,
  438. 0X00,0X24,0X24,0X24,0X24,0X24,0X24,0X24,0X00,0X00,0X49,0X92,0XDB,0XFF,0XFF,0XFF,
  439. 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
  440. 0XFF,0XFF,0XFF,0XFF,0X92,0X24,0X00,0X24,0X24,0X24,0X24,0X24,0X49,0X45,0X24,0X24,
  441. 0X24,0X24,0X00,0X00,0X24,0XB6,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
  442. 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0X6D,0X00,0X24,0X24,0X49,
  443. 0X49,0X24,0X49,0X49,0X49,0X49,0X49,0X24,0X24,0X24,0X24,0X24,0X00,0X00,0X92,0XFF,
  444. 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
  445. 0XFF,0XFF,0X92,0X00,0X24,0X24,0X49,0X49,0X49,0X6D,0X49,0X49,0X49,0X49,0X49,0X49,
  446. 0X49,0X24,0X24,0X24,0X24,0X00,0X00,0X92,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
  447. 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XB6,0X24,0X24,0X24,0X49,0X49,0X49,
  448. 0XB6,0XFF,0XB6,0X49,0X49,0X49,0X6D,0XDB,0XB6,0X49,0X24,0X24,0X24,0X24,0X00,0X24,
  449. 0XDB,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
  450. 0XFF,0X49,0X00,0X24,0X49,0X49,0X49,0X92,0XFF,0XFF,0XFF,0X92,0X49,0X49,0XDB,0XFF,
  451. 0XFF,0XB6,0X24,0X24,0X24,0X24,0X24,0X00,0X6D,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
  452. 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0X92,0X00,0X24,0X49,0X49,0X49,0X49,0XB6,
  453. 0XFF,0XDB,0X92,0X92,0X49,0X92,0XDB,0X6D,0XFF,0XDB,0X49,0X24,0X24,0X24,0X24,0X00,
  454. 0X24,0XDB,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
  455. 0X6D,0X00,0X24,0X49,0X49,0X49,0X49,0XDB,0XFF,0XB6,0X00,0X49,0X49,0XB6,0X92,0X6D,
  456. 0X6D,0XFF,0X6D,0X24,0X24,0X24,0X24,0X00,0X00,0X92,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
  457. 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XDB,0X24,0X24,0X24,0X49,0X49,0X49,0X49,0XB6,
  458. 0XFF,0XDB,0X49,0X92,0X49,0X92,0XFF,0XFF,0XFF,0XDB,0X49,0X24,0X24,0X24,0X24,0X24,
  459. 0X00,0X49,0XDB,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XB6,
  460. 0X20,0X24,0X49,0X49,0X49,0X49,0X49,0X92,0XFF,0XFF,0XFF,0X92,0X24,0X49,0XFF,0XFF,
  461. 0XFF,0XDB,0X24,0X24,0X24,0X24,0X24,0X24,0X00,0X24,0XDB,0XFF,0XFF,0XFF,0XFF,0XFF,
  462. 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0X92,0X00,0X24,0X49,0X49,0X49,0X49,0X49,0X49,
  463. 0XB6,0XDB,0X96,0X49,0X25,0X25,0X72,0XDB,0XBB,0X6D,0X24,0X24,0X24,0X24,0X24,0X24,
  464. 0X00,0X24,0XB6,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0X4D,
  465. 0X04,0X24,0X49,0X49,0X49,0X49,0X49,0X49,0X49,0X6D,0X68,0X6C,0X8C,0X8C,0X68,0X6D,
  466. 0X49,0X24,0X25,0X24,0X24,0X24,0X24,0X24,0X00,0X00,0X92,0XFF,0XFF,0XFF,0XFF,0XFF,
  467. 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XDB,0X64,0X44,0X24,0X49,0X49,0X49,0X49,0X8D,0XAD,
  468. 0XD0,0XD0,0XF0,0XF4,0XF4,0XF4,0XF0,0XF0,0XCC,0XAC,0X88,0X48,0X24,0X24,0X24,0X24,
  469. 0X00,0X00,0X49,0XDB,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0X8D,0XA0,
  470. 0XA0,0X24,0X29,0X49,0X88,0XCC,0XF5,0XFA,0XF4,0XF4,0XF4,0XF4,0XF4,0XF4,0XF4,0XF4,
  471. 0XF0,0XF0,0XF0,0XEC,0X88,0X24,0X24,0X04,0X20,0X40,0X40,0X96,0XFF,0XFF,0XFF,0XFF,
  472. 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XA4,0XA0,0XE0,0XA0,0X44,0X49,0XAC,0XF0,0XF0,0XF5,
  473. 0XF4,0XF4,0XF4,0XF4,0XF4,0XF4,0XF4,0XF4,0XF0,0XF0,0XF0,0XF0,0XAC,0X24,0X04,0X40,
  474. 0X80,0X80,0X40,0X92,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XC4,0XC0,
  475. 0XC4,0XE4,0XC0,0X64,0X49,0X49,0X68,0X68,0XD0,0XF0,0XF4,0XF4,0XF4,0XF4,0XF4,0XF0,
  476. 0XD0,0X88,0X48,0X48,0X24,0X24,0X60,0XA0,0X80,0X80,0X44,0X96,0XFF,0XFF,0XFF,0XFF,
  477. 0XFF,0XFF,0XFF,0XFF,0XFF,0X6D,0X60,0XE0,0XE0,0XED,0XE9,0XE0,0XA0,0X64,0X44,0X45,
  478. 0X29,0X68,0X8C,0XB0,0XB0,0XB0,0X8C,0X68,0X24,0X24,0X24,0X44,0X60,0XA0,0XC0,0XA0,
  479. 0XA0,0X60,0X00,0X92,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0X6D,0X00,0X24,0X84,
  480. 0XE0,0XE0,0XE9,0XED,0XE9,0XE4,0XE0,0XA0,0X84,0X64,0X64,0X44,0X44,0X44,0X44,0X44,
  481. 0X60,0X60,0XA0,0XC0,0XC0,0XC0,0XA0,0XA0,0X80,0X20,0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F,0XFF,
  532. };
  533. void delayms(unsigned  int ii)//1ms延时函数
  534. {
  535. unsigned int i,x;
  536. for (x=0;x<ii;x++)
  537. {
  538. for (i=0;i<100;i++);
  539. }
  540. }
  541. void send(unsigned char value, unsigned char cd) //写8位数据
  542.  { 
  543.   unsigned char i,dt; 
  544. cs=0;
  545. sclk=0;
  546.    if(cd == 0) 
  547.       sdata=0;
  548.    else 
  549.      sdata=1;
  550.      sclk=1;    
  551. dt=value;
  552. for(i=0;i<8;i++)
  553. sclk=0; 
  554. if(dt&0x80)
  555. sdata=1;
  556. else
  557. sdata=0;
  558. dt=dt<<1;
  559. sclk=1; 
  560. }
  561. cs=1;
  562. }
  563. void readdata()  //读数据
  564. {
  565. unsigned char i,j;
  566. unsigned char ch[6];
  567. send(0x09, 0);      // 读数据 
  568.     cs=0;
  569. sclk=0;
  570. for (i=0;i<6;i++)
  571. {
  572. ch[i]=0;
  573. for (j=0;j<8;j++)
  574. {
  575. sclk=1;
  576. if (sdata==0)
  577. {
  578. ch[i]=ch[i]|(1<<(7-j));
  579. }
  580. sclk=0;
  581. }
  582.  }
  583.  switch(ch[0])
  584.  {
  585.   case 255:
  586. Ver='A';
  587. break;
  588. case 127:
  589. Ver='B';
  590. break;
  591. case 0:
  592. if(ch[1]+ch[2]+ch[3]==0)
  593. {
  594. Ver='D';
  595. }else
  596. {
  597. Ver='C';
  598. }
  599. break;
  600.  }
  601. cs=1;
  602. }
  603. void LCD_Initialize()  //LCD初始化
  604. {
  605. unsigned char i;
  606.   rest=1;
  607. cs=1;
  608. sdata=0;
  609. sclk=1;
  610. rest=0;
  611. delayms(50);
  612. rest=1;
  613. delayms(50);
  614.    send(0x00, 0);      // NOP
  615.    delayms(5); 
  616.    send(0x01, 0);      // LCD Software Reset 
  617.    delayms(5); 
  618.   
  619.    send(0xC6, 0);      // Initial Escape 
  620.       
  621.    send(0xB9, 0);      // Refresh set 
  622.    send(0x00, 1); 
  623.    readdata();    //读出数据
  624.        
  625.    send(0xB5, 0);      // Gamma Curve Set 
  626.    send(0x01, 1); 
  627.    send(0xbd, 0);      //common driver output select//很重要的
  628.    if(Ver=='D')
  629.    {
  630.     send(0x04, 1); 
  631.    }else
  632.    {
  633.     send(0x00, 1); 
  634.    }
  635.    send(0xBE, 0);      // Power Control 
  636.    send(0x03, 1); 
  637.     
  638.    send(0x11, 0);      // Sleep out 
  639.    send(0xBA, 0);      // Power Control 
  640.    send(0x7F, 1); 
  641.    send(0x03, 1);
  642.    
  643.    send(0x36, 0);      // 扫描方式
  644.    if (Ver=='A')
  645.    {
  646.      send(0x00|0x08,1);     //RGB
  647.     }
  648. else
  649. {
  650.     send(0x00,1);     //RGB
  651. }
  652.   
  653.    send(0xB7, 0);      // Temperature gradient set 
  654.    for(i=0; i<14; i++) 
  655.    { 
  656.       send(0, 1); 
  657.    } 
  658.    send(0x29, 0);      //display ON  
  659.        
  660.    send(0x03, 0);      // Booster Voltage ON 
  661.       
  662.    delayms(20);         // Booster Voltage stabilisieren lassen      
  663.     
  664.    send(0x20, 0);     //display inversion OFF
  665.    send(0x25, 0);      // Write contrast   
  666.    switch(Ver)    //对比度设置
  667.    {
  668.     case 'A':
  669. send(70, 1);  //对比度设置
  670. break;
  671.     case 'B':   
  672. send(67, 1);  //对比度设置
  673. break;
  674. case 'C':
  675. //send(74, 1); 
  676.     send(66, 1); 
  677. // send(64, 1);   //对比度设置
  678. break;
  679. case 'D':   //对比度设置
  680. send(49, 1); 
  681. break;
  682.    } 
  683.       
  684. }
  685. //************************
  686. //颜色模式设置:color=1为4096色模式
  687. //            :color=0为256色模式
  688. //************************
  689. void LCD_ColorSet(unsigned char Color)
  690. {
  691. if (Color==1) {
  692. send(0x3a, 0); //interface pixel format
  693. send(0x03, 1);       //0x03 为4096色,0x02为256色
  694.  
  695. }
  696. else
  697. {
  698. send(0x3a, 0); //interface pixel format
  699. send(0x02, 1);       //0x03 为4096色,0x02为256色
  700.  
  701. send(0x2d, 0); //调色板设置
  702. if (Ver=='B'||Ver=='C')
  703.  {
  704.    //red
  705. send(~0x00, 1);
  706. send(~0x02, 1);
  707. send(~0x03, 1);
  708. send(~0x04, 1);
  709. send(~0x05, 1);
  710. send(~0x06, 1);
  711. send(~0x08, 1);
  712. send(~0x0f, 1);
  713. //green
  714. send(~0x00, 1);
  715. send(~0x02, 1);
  716. send(~0x03, 1);
  717. send(~0x04, 1);
  718. send(~0x05, 1);
  719. send(~0x06, 1);
  720. send(~0x08, 1);
  721. send(~0x0f, 1);
  722. //blue
  723. send(~0x00, 1);
  724. send(~0x03, 1);
  725. send(~0x06, 1);
  726. send(~0x0f, 1);
  727.  }else
  728. {
  729.     //red
  730. send(0x00, 1);
  731. send(0x02, 1);
  732. send(0x03, 1);
  733. send(0x04, 1);
  734. send(0x05, 1);
  735. send(0x06, 1);
  736. send(0x08, 1);
  737. send(0x0f, 1);
  738. //green
  739. send(0x00, 1);
  740. send(0x02, 1);
  741. send(0x03, 1);
  742. send(0x04, 1);
  743. send(0x05, 1);
  744. send(0x06, 1);
  745. send(0x08, 1);
  746. send(0x0f, 1);
  747. //blue
  748. send(0x00, 1);
  749. send(0x03, 1);
  750. send(0x06, 1);
  751. send(0x0f, 1);
  752. }
  753.     
  754.    }
  755. }
  756. void addset(unsigned char x1,unsigned char y1,unsigned char x2,unsigned char y2)  //坐标设置  4个参数依次为开始X,开始Y,结束x,结束Y
  757. {
  758.     send(0x2a,0 );//column address set
  759.     send(x1,1 );
  760. send(x2,1 );
  761.   send(0x2B,0 );//page address set
  762.     send(y1,1 );
  763. send(y2,1 );
  764.   send(0x2C,0 );//memory write
  765. }
  766. //************************
  767. //清屏:color=1为4096色模式清屏
  768. //    :color=0为256色模式清屏
  769. //************************
  770. void LCD_Clear(unsigned int value,unsigned char Color)
  771. {
  772. unsigned char x, y;
  773. addset(0,0,97,66);
  774. if (Color==1)
  775. {
  776. for(y = 0; y < 67; y ++)
  777. {
  778. for(x = 0; x < 49;x ++)
  779. { send(value>>4,1);
  780. send(((value&0x0f)<<4)|(value>>8),1);
  781. send(value,1);
  782. }
  783.  }
  784. }
  785. else
  786. {
  787. for(y = 0; y < 67; y ++)
  788. {
  789. for(x = 0; x < 98; x ++)
  790. {
  791. send(value,1);
  792. }
  793. }
  794. }
  795. //在指定位置显示一个字符(8*12大小)
  796. //dcolor为内容颜色,gbcolor为背静颜色
  797. void showzifu(unsigned char x,unsigned char y,unsigned char value,unsigned char dcolor,unsigned char bgcolor)
  798. {  
  799. unsigned char i,j;
  800. unsigned char *temp=zifu;    
  801.     addset(x,y,x+7,y+11); //设置区域      
  802. temp+=(value-32)*12;
  803. for(j=0;j<12;j++)
  804. {
  805. for(i=0;i<8;i++)
  806. {       
  807.   if((*temp&(1<<(7-i)))!=0)
  808. {
  809. send(dcolor,1);
  810. else
  811. {
  812. send(bgcolor,1);
  813. }   
  814. }
  815. temp++;
  816.  }
  817. }
  818. //在指定位置显示一个字符串(8*12大小)
  819. //dcolor为内容颜色,gbcolor为背静颜色
  820. void showzifustr(unsigned char x,unsigned char y,unsigned char *str,unsigned char dcolor,unsigned char bgcolor)   
  821. {  
  822. unsigned char x1,y1;
  823. x1=x;
  824. y1=y;
  825. while(*str!='')
  826. {
  827. showzifu(x1,y1,*str,dcolor,bgcolor);
  828. x1+=7;
  829. str++;
  830. }
  831. }
  832. //在指定位置显示一个汉字(12*12大小)
  833. //dcolor为内容颜色,gbcolor为背静颜色
  834. void showhanzi(unsigned char x,unsigned char y,unsigned char value,unsigned char dcolor,unsigned char bgcolor)
  835. {  
  836. unsigned char i,j;
  837. unsigned char *temp=hanzi;    
  838.     addset(x,y,x+11,y+11); //设置区域      
  839. temp+=value*18;
  840. for(j=0;j<18;j++)
  841. {
  842. for(i=0;i<8;i++)
  843. {       
  844.   if((*temp&(1<<(7-i)))!=0)
  845. {
  846. send(dcolor,1);
  847. else
  848. {
  849. send(bgcolor,1);
  850. }   
  851. }
  852. temp++;
  853.  }
  854. }