标题: stm32驱动st7567 lcd12864屏程序 [打印本页]

作者: Crazyxiaomen    时间: 2019-6-29 11:41
标题: stm32驱动st7567 lcd12864屏程序
stm32 驱动 st7567 lcd 屏

单片机源程序如下:
  1. #include "stm32f10x.h"
  2. #include "lcd_12864.H"
  3. #include "led.h"



  4. int main(void)
  5. {
  6.         unsigned char i,j,k,m;
  7.         SystemInit();
  8.         RCC_Configuration();
  9.         GPIO_Config();
  10.         SPI_Initial();
  11.         LedInit();
  12.         LED1 = 0;                        //点亮背光
  13.         delay(500);
  14.         LCD_Init();
  15.         ClearScreen();    //clear all dots
  16.         //LcdWriteCom(0xb0);
  17.         

  18.         //DisplayFont(1,1,0,FONT_8X16);
  19.         for (i=0; i<16; i++)
  20.         {
  21.                 DisplayFont(1, i*8+1, i, FONT_8X16);
  22.         }
  23.         /*DisplayFont(2, 1, 3, SCRIBING);*/

  24.         for (j=0; j<16; j++)
  25.         {
  26.                 m = j;
  27.                 DisplayFont(3, m*8+1, m+16, FONT_8X16);
  28.         }
  29.         for (j=0; j<16; j++)
  30.         {
  31.                 k = j;
  32.                 DisplayFont(5, k*8+1, k+32, FONT_8X16);
  33.         }
  34.         /*for (k=8; k<16; k++)
  35.         {
  36.                 DisplayFont(3, (k-8)*16+1, k-8, FONT_16X16);
  37.         } */

  38.         /*for (j=0; j<8; j++)
  39.         {
  40.                 DisplayFont(3, 1, j, FONT_16X16);
  41.         }
  42.         for (k=8; k<16; k++)
  43.         {
  44.                 DisplayFont(5, 1, k, FONT_16X16);
  45.         }*/
  46.         /*ASCII_function(1, 18, 1);
  47.         ASCII_function(1, 35, 2);
  48.         ASCII_function(1, 52, 3);
  49.         ASCII_function(1, 69, 4);
  50.         ASCII_function(1, 86, 5);
  51.         ASCII_function(1, 103, 6);
  52.         ASCII_function(3, 1, 7);
  53.         ASCII_function(3, 18, 8);
  54.         ASCII_function(3, 35, 9);
  55.         ASCII_function(3, 52, 10);
  56.         ASCII_function(3, 69, 11);
  57.         ASCII_function(3, 86, 12);
  58.         ASCII_function(3, 103, 13);
  59.         DisplayFont(5, 1, 14, FONT_16X16);
  60.         DisplayFont(5, 18, 15, FONT_16X16);
  61.         DisplayFont(5, 35, 16, FONT_16X16);*/
  62.         while(1)
  63.         {        
  64.                 //LED2 = !LED2;
  65.                 //delay(500);
  66.         }
  67. }
复制代码

所有资料51hei提供下载:
SPI2驱动LCD12848基于ST7567.7z (148.66 KB, 下载次数: 206)



作者: gavinchou    时间: 2019-8-7 10:15
正在找相关的资源,感谢,学习了
作者: fang17    时间: 2019-9-2 16:38
我下了程序改了引脚,屏幕为什么不能显示,求教
作者: 单片机爱好者223    时间: 2019-10-23 13:10
不知道有用没用,,,支持一下
作者: GIN51    时间: 2020-9-16 12:48
问下你用的是6800还是8080的时序




欢迎光临 (http://www.51hei.com/bbs/) Powered by Discuz! X3.1