久久久久久久999_99精品久久精品一区二区爱城_成人欧美一区二区三区在线播放_国产精品日本一区二区不卡视频_国产午夜视频_欧美精品在线观看免费

標題: 3.2寸(SSD1298) 芯片手冊和LPC1700參考程序 [打印本頁]

作者: 惜羽飛    時間: 2017-6-2 09:18
標題: 3.2寸(SSD1298) 芯片手冊和LPC1700參考程序
附件里面有完整的3.2寸(SSD1298) 芯片手冊下載

Bmp2RGB.exe:






LPC1700源程序如下:
  1. /******************************************************************************/
  2. /* GLCD_SPI_LPC1700.c: LPC1700 low level Graphic LCD (320x240 pixels) driven  */
  3. /*                     with SPI functions                                     */
  4. /******************************************************************************/
  5. /* This file is part of the uVision/ARM development tools.                    */
  6. /* Copyright (c) 2005-2009 Keil Software. All rights reserved.                */
  7. /* This software may only be used under the terms of a valid, current,        */
  8. /* end user licence from KEIL for a compatible version of KEIL software       */
  9. /* development tools. Nothing else gives you the right to use this software.  */
  10. /******************************************************************************/


  11. #include <lpc17xx.h>
  12. #include "stdint.h"
  13. #include "LCD.h"
  14. #include "bmboard.h"
  15. #include "ssd1298.h"
  16. #include "fonts_5x7.h"

  17. static unsigned short DeviceCode;

  18. /* LCD module is fixed */
  19. #define LCD_WIDTH        240
  20. #define LCD_HEIGHT        320

  21. #define CHAR_H      8
  22. #define CHAR_W      6


  23. /*******************************************************************************
  24. *                                                DEFINES
  25. *
  26. * Note(s) (1): LCD orientation and GRAM configuration:
  27. *
  28. *                        | ------ 240 ------ |
  29. *                   (0,0)+===================+  --->x
  30. *                        |                   |   |
  31. *           GRAM         | ----------------> |   |
  32. *        ADDRES UPDATE   | ----------------> |   |
  33. *                        |                   |   |
  34. *                        |                   |   |  
  35. *                        |                   |  320
  36. *                        |                   |   |  
  37. *                        |                   |   |
  38. *                        |                   |   |
  39. *                        |                   |   |
  40. *                        |                   |   |
  41. *                        +===================+  ---
  42. *                       \ /                    (239, 319)
  43. *******************************************************************************/

  44. /*------------------------- Speed dependant settings -------------------------*/

  45. /* If processor works on high frequency delay has to be increased, it can be
  46.    increased by factor 2^N by this constant                                   */
  47. #define DELAY_2N    18

  48. /*--------------- Graphic LCD interface hardware definitions -----------------*/

  49. /* Pin EN setting to 0 or 1                                                   */
  50. #define SET_LCD_EN(x)   ((x) ? (LPC_GPIO0->FIOSET = LCD_PIN_EN) : (LPC_GPIO0->FIOCLR = LCD_PIN_EN));
  51. /* Pin LE setting to 0 or 1                                                   */
  52. #define SET_LCD_LE(x)   ((x) ? (LPC_GPIO0->FIOSET = LCD_PIN_LE) : (LPC_GPIO0->FIOCLR = LCD_PIN_LE));
  53. /* Pin DIR setting to 0 or 1                                                   */
  54. #define SET_LCD_DIR(x)   ((x) ? (LPC_GPIO0->FIOSET = LCD_PIN_DIR) : (LPC_GPIO0->FIOCLR = LCD_PIN_DIR));
  55. /* Pin CS setting to 0 or 1                                                   */
  56. #define SET_LCD_CS(x)   ((x) ? (LPC_GPIO0->FIOSET = LCD_PIN_CS) : (LPC_GPIO0->FIOCLR = LCD_PIN_CS));
  57. /* Pin RS setting to 0 or 1                                                   */
  58. #define SET_LCD_RS(x)   ((x) ? (LPC_GPIO0->FIOSET = LCD_PIN_RS) : (LPC_GPIO0->FIOCLR = LCD_PIN_RS));
  59. /* Pin WR setting to 0 or 1                                                   */
  60. #define SET_LCD_WR(x)   ((x) ? (LPC_GPIO0->FIOSET = LCD_PIN_WR) : (LPC_GPIO0->FIOCLR = LCD_PIN_WR));
  61. /* Pin RD setting to 0 or 1                                                   */
  62. #define SET_LCD_RD(x)   ((x) ? (LPC_GPIO0->FIOSET = LCD_PIN_RD) : (LPC_GPIO0->FIOCLR = LCD_PIN_RD));

  63. /*---------------------------- Global variables ------------------------------*/

  64. /******************************************************************************/
  65. static volatile unsigned short TextColor = LCD_COLOR_RED, BackColor = LCD_COLOR_BLACK;

  66. /************************ Local auxiliary functions ***************************/
  67. void wait_delay(int count)
  68. {
  69.   while(count--);
  70. }

  71. void wait()
  72. {
  73. }

  74. static __inline void lcd_write (uint16_t word) {

  75.         LPC_GPIO2->FIODIR |= 0x000000FF;          //P2.0...P2.7 Output
  76.         SET_LCD_DIR(1);                                   //Interface A->B(CPU->LCD)
  77.         wait();
  78.         SET_LCD_EN(0);                                //Enable 2A->2B
  79.         LPC_GPIO2->FIOPIN =  (word);                   //Write D0..D7
  80.         SET_LCD_LE(1);
  81.         wait();                           
  82.         SET_LCD_LE(0);                                //latch D0..D7
  83.         LPC_GPIO2->FIOPIN =  (word >> 8);           //Write D8..D15
  84.         wait();
  85. }


  86. /*******************************************************************************
  87. * read 1 byte over serial communication                                        *
  88. *   Parameter:    byte:   byte to be sent                                      *
  89. *   Return:                                                                    *
  90. *******************************************************************************/

  91. ……………………

  92. …………限于本文篇幅 余下代碼請從51黑下載附件…………
復制代碼

所有資料51hei提供下載:
LCD3.2.rar (1.89 MB, 下載次數: 24)







歡迎光臨 (http://www.zg4o1577.cn/bbs/) Powered by Discuz! X3.1
主站蜘蛛池模板: 91精品久久久久久久久久 | www.欧美 | 国产色婷婷精品综合在线手机播放 | 一区影院| 国产精品夜夜夜一区二区三区尤 | 成人av电影在线 | 久久久精品一区二区三区四季av | 一区二区三区欧美在线观看 | 中文字幕视频免费 | 一区二区三区四区在线视频 | 91精品久久久久久久久久小网站 | 亚洲人在线 | 成人免费观看男女羞羞视频 | 久久国产高清 | 精品久久久久久久久久久久 | 天堂av影院 | 欧美一级精品片在线看 | 亚洲精品成人在线 | 欧美综合久久久 | 一二区视频 | 亚洲视频免费在线看 | 欧美video | 美女黄网 | 日韩av成人 | 精品无码久久久久久国产 | 男人的天堂久久 | 综合二区 | 亚洲97 | 男人的天堂中文字幕 | 97精品一区二区 | 久久精品国产一区二区三区 | 成人免费看 | 免费国产视频 | 日韩av在线中文字幕 | 亚洲精品www | 一级全黄少妇性色生活免费看 | 日韩一区二区在线播放 | 亚洲男人网 | 中文字幕精品一区 | 久久丝袜 | 国产黄色免费网站 |