欧美极品高清xxxxhd,国产日产欧美最新,无码AV国产东京热AV无码,国产精品人与动性XXX,国产传媒亚洲综合一区二区,四库影院永久国产精品,毛片免费免费高清视频,福利所导航夜趣136
標題:
Keil stm32的12864液晶顯示程序
[打印本頁]
作者:
jjxiong92
時間:
2018-7-25 14:30
標題:
Keil stm32的12864液晶顯示程序
分享一個基于Keil STM32的12864液晶模塊顯示程序。
單片機源程序如下:
#include "stm32f10x.h"
#include "integer.h"
#include "lcd12864_chuan.H"
//12864 STM32驅動程序
void delay(u32 delaytime);
void NVIC_Configuration(void);
void RCC_Configuration(void);
void GPIO_init(void);
void delay(u32 delaytime){
while(delaytime>1)delaytime--;
}
void NVIC_Configuration(void){
#ifdef VECT_TAB_RAM
/* Set the Vector Table base location at 0x20000000 */
NVIC_SetVectorTable(NVIC_VectTab_RAM, 0x0);
#else /* VECT_TAB_FLASH */
/* Set the Vector Table base location at 0x08000000 */
NVIC_SetVectorTable(NVIC_VectTab_FLASH, 0x0);
#endif
/* Configure one bit for preemption priority */
}
//配置系統時鐘,使能各外設時鐘
void RCC_Configuration(void){
SystemInit();
RCC_APB2PeriphClockCmd( RCC_APB2Periph_GPIOA
|RCC_APB2Periph_GPIOB | RCC_APB2Periph_GPIOC
|RCC_APB2Periph_GPIOD | RCC_APB2Periph_GPIOE
| RCC_APB2Periph_AFIO |RCC_APB2Periph_SPI1
, ENABLE );
}
void GPIO_init(void){
GPIO_InitTypeDef GPIO_InitStructure;
/* Configure PC13 as input floating (EXTI Line0) */
// 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;
// GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;
// GPIO_Init(GPIOA, &GPIO_InitStructure);
// GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0|GPIO_Pin_1;
// GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;
// GPIO_Init(GPIOB, &GPIO_InitStructure);
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_2|GPIO_Pin_3;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
GPIO_Init(GPIOA, &GPIO_InitStructure);
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0|GPIO_Pin_1|GPIO_Pin_2; //12864控制腳 OD輸出
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_OD;
GPIO_Init(GPIOB, &GPIO_InitStructure);
}
void Init_All_Periph(void){
RCC_Configuration();
NVIC_Configuration();
GPIO_init();
// SPI_Configuration();
// SD_Init();
lcd_init();
}
int main(void){
Init_All_Periph();
while(1)
{
Chshow(2,2,"xxxxxx aa");
delay(10000000);
Chshow(2,2,"feasfas");
delay(10000000);
//Draw_circle(64,32,30)
// f_mount(0,&fs); //開辟一個新的工作區
// window();
// f_mount(0,NULL); //注銷工作區
}
}
復制代碼
所有資料51hei提供下載:
STM32_12864_原創顯示程序.rar
(327.87 KB, 下載次數: 58)
2018-7-25 16:27 上傳
點擊文件名下載附件
stm32的12864顯示程序
下載積分: 黑幣 -5
作者:
miryuan
時間:
2018-10-27 12:30
沒黑幣下載
歡迎光臨 (http://www.raoushi.com/bbs/)
Powered by Discuz! X3.1