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

 找回密碼
 立即注冊

QQ登錄

只需一步,快速開始

搜索
查看: 5309|回復(fù): 0
收起左側(cè)

3.2寸(SSD1298) 芯片手冊和LPC1700參考程序

[復(fù)制鏈接]
ID:206973 發(fā)表于 2017-6-2 09:18 | 顯示全部樓層 |閱讀模式
附件里面有完整的3.2寸(SSD1298) 芯片手冊下載

Bmp2RGB.exe:
0.png
0.png

0.png


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黑下載附件…………
復(fù)制代碼

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


評分

參與人數(shù) 1黑幣 +1 收起 理由
3535435345 + 1 贊一個!

查看全部評分

回復(fù)

使用道具 舉報

您需要登錄后才可以回帖 登錄 | 立即注冊

本版積分規(guī)則

小黑屋|51黑電子論壇 |51黑電子論壇6群 QQ 管理員QQ:125739409;技術(shù)交流QQ群281945664

Powered by 單片機(jī)教程網(wǎng)

快速回復(fù) 返回頂部 返回列表
主站蜘蛛池模板: 久久久在线视频 | 人人人人干 | 日本亚洲欧美 | 精品国产91乱码一区二区三区 | 亚洲一区二区中文字幕 | 国产精品欧美一区喷水 | 国产成人99久久亚洲综合精品 | 午夜视频一区二区三区 | 九九伊人sl水蜜桃色推荐 | 国产乱码一区 | 精品日韩 | 欧美中文视频 | av天空| 成人免费看片 | 免费视频99 | 欧美成人精品激情在线观看 | 黄色毛片网站在线观看 | 99热这里都是精品 | 欧美自拍日韩 | 国产这里只有精品 | 久热国产精品视频 | 国产a一区二区 | 精品一区二区三区视频在线观看 | 极品国产视频 | 日日噜噜噜夜夜爽爽狠狠视频97 | 日韩欧美国产一区二区 | 成人黄色a | 日韩欧美高清 | 女女百合av大片一区二区三区九县 | 久久国 | 尤物在线 | 午夜激情免费视频 | 久久久免费少妇高潮毛片 | 一区二区三区亚洲 | 精品99久久 | 精品一区二区三区在线观看国产 | 日本精品视频 | 国产免费av在线 | 国产99久久 | 欧美极品在线 | 国产日韩精品一区二区 |