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

 找回密碼
 立即注冊

QQ登錄

只需一步,快速開始

搜索
查看: 5216|回復(fù): 0
打印 上一主題 下一主題
收起左側(cè)

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

[復(fù)制鏈接]
跳轉(zhuǎn)到指定樓層
樓主
ID:206973 發(fā)表于 2017-6-2 09:18 | 只看該作者 |只看大圖 回帖獎勵 |倒序瀏覽 |閱讀模式
附件里面有完整的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黑下載附件…………
復(fù)制代碼

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


評分

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

查看全部評分

分享到:  QQ好友和群QQ好友和群 QQ空間QQ空間 騰訊微博騰訊微博 騰訊朋友騰訊朋友
收藏收藏 分享淘帖 頂1 踩
回復(fù)

使用道具 舉報

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

本版積分規(guī)則

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

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

快速回復(fù) 返回頂部 返回列表
主站蜘蛛池模板: 97国产精品视频人人做人人爱 | 91精品国产综合久久婷婷香蕉 | 国产精品久久久久久妇女6080 | 久久人人爽人人爽人人片av免费 | 国产目拍亚洲精品99久久精品 | 日韩成人在线免费观看 | 欧美男人天堂 | 精品久久久久久久人人人人传媒 | 国产在线精品一区二区三区 | 日韩视频一区二区 | 欧美日韩精品免费 | 秋霞影院一区二区 | www久久久 | 国产精品自产av一区二区三区 | 一久久久 | 国产在线观 | 草草视频在线观看 | 国产精品特级毛片一区二区三区 | 尤物在线视频 | 99久久婷婷国产综合精品电影 | 日韩一区中文字幕 | 久久久久久成人 | 国产一区二区在线观看视频 | 精品一区二区三区在线观看国产 | 国产欧美精品在线观看 | 草比av| 99国产精品久久久 | 欧美一区二区免费视频 | 亚洲狠狠 | 国产高清性xxxxxxxx | 国产一级一级国产 | 亚欧性视频 | 在线看av网址 | 超碰免费在线 | 夜夜爽99久久国产综合精品女不卡 | 日韩精品一区二区三区中文在线 | 老司机深夜福利网站 | 精品国产一区二区三区免费 | 国产蜜臀97一区二区三区 | 欧美高清成人 | 中文字幕高清免费日韩视频在线 |