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

標題: Keil stm32的12864液晶顯示程序 [打印本頁]

作者: jjxiong92    時間: 2018-7-25 14:30
標題: Keil stm32的12864液晶顯示程序
分享一個基于Keil STM32的12864液晶模塊顯示程序。

單片機源程序如下:
  1. #include "stm32f10x.h"
  2. #include "integer.h"
  3. #include "lcd12864_chuan.H"


  4. //12864 STM32驅動程序

  5. void delay(u32 delaytime);
  6. void NVIC_Configuration(void);
  7. void RCC_Configuration(void);
  8. void GPIO_init(void);



  9. void delay(u32 delaytime){
  10.         while(delaytime>1)delaytime--;
  11. }
  12. void NVIC_Configuration(void){
  13.         #ifdef  VECT_TAB_RAM  
  14.           /* Set the Vector Table base location at 0x20000000 */
  15.           NVIC_SetVectorTable(NVIC_VectTab_RAM, 0x0);
  16.         #else  /* VECT_TAB_FLASH  */
  17.           /* Set the Vector Table base location at 0x08000000 */
  18.           NVIC_SetVectorTable(NVIC_VectTab_FLASH, 0x0);   
  19.         #endif
  20.           /* Configure one bit for preemption priority */
  21. }
  22. //配置系統時鐘,使能各外設時鐘
  23. void RCC_Configuration(void){
  24.         SystemInit();        
  25.         RCC_APB2PeriphClockCmd( RCC_APB2Periph_GPIOA
  26.                            |RCC_APB2Periph_GPIOB | RCC_APB2Periph_GPIOC
  27.                            |RCC_APB2Periph_GPIOD | RCC_APB2Periph_GPIOE
  28.                                                    | RCC_APB2Periph_AFIO |RCC_APB2Periph_SPI1         
  29.                             , ENABLE );           
  30. }



  31. void GPIO_init(void){
  32.         GPIO_InitTypeDef GPIO_InitStructure;
  33.         /* Configure PC13 as input floating (EXTI Line0) */
  34. //        GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0|GPIO_Pin_1|GPIO_Pin_8|GPIO_Pin_9|GPIO_Pin_10|GPIO_Pin_11|GPIO_Pin_12;
  35. //        GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;
  36. //        GPIO_Init(GPIOA, &GPIO_InitStructure);

  37. //        GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0|GPIO_Pin_1;
  38. //        GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;
  39. //        GPIO_Init(GPIOB, &GPIO_InitStructure);

  40.         GPIO_InitStructure.GPIO_Pin = GPIO_Pin_2|GPIO_Pin_3;
  41.         GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
  42.         GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
  43.         GPIO_Init(GPIOA, &GPIO_InitStructure);        

  44.         GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0|GPIO_Pin_1|GPIO_Pin_2;  //12864控制腳 OD輸出
  45.         GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
  46.         GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_OD;
  47.         GPIO_Init(GPIOB, &GPIO_InitStructure);
  48. }

  49. void Init_All_Periph(void){
  50.         RCC_Configuration();        
  51.         NVIC_Configuration();
  52.         GPIO_init();        
  53. //        SPI_Configuration();
  54. //    SD_Init();
  55.         lcd_init();
  56. }



  57. int main(void){
  58.                 Init_All_Periph();
  59.         while(1)
  60.         {        

  61. Chshow(2,2,"xxxxxx aa");
  62. delay(10000000);
  63. Chshow(2,2,"feasfas");
  64. delay(10000000);

  65. //Draw_circle(64,32,30)
  66. //            f_mount(0,&fs);  //開辟一個新的工作區
  67. //                window();
  68. //                f_mount(0,NULL);  //注銷工作區                                          
  69.         }
  70. }
復制代碼

所有資料51hei提供下載:
STM32_12864_原創顯示程序.rar (327.87 KB, 下載次數: 58)



作者: miryuan    時間: 2018-10-27 12:30
沒黑幣下載




歡迎光臨 (http://www.zg4o1577.cn/bbs/) Powered by Discuz! X3.1
主站蜘蛛池模板: 久久精品中文字幕 | 五月综合激情在线 | 黄色国产视频 | 久久四虎 | 免费观看一级特黄欧美大片 | 欧美一区二区视频 | 久久这里只有精品首页 | 日韩手机在线看片 | 日本黄色片免费在线观看 | 精品一二三区视频 | 欧美在线高清 | 国产一区二区在线视频 | 午夜男人天堂 | 最新中文字幕久久 | 天天干com | 日韩伦理一区二区三区 | 日韩av一区二区在线观看 | 四虎永久在线精品免费一区二 | 亚洲一二三区av | 日韩精品一区二区三区视频播放 | 国产精品国产三级国产aⅴ无密码 | 亚洲人人 | 亚洲欧美中文日韩在线v日本 | 看羞羞视频免费 | 国产欧美一区二区三区另类精品 | 日韩免费av一区二区 | 日韩精品久久一区二区三区 | 久久精品亚洲一区 | 一级片在线免费播放 | 亚洲免费在线 | av一区二区在线观看 | 精品美女| 免费观看毛片 | 国产精品视频网 | 日日夜夜草| 福利国产 | 国产精品久久久久久久久久免费 | 欧美国产激情二区三区 | 中文无码日韩欧 | 色男人的天堂 | 免费一级欧美在线观看视频 |