当前位置: 首页 > news >正文

编程自己做网站/东莞网站关键词优化公司

编程自己做网站,东莞网站关键词优化公司,夫妻工作室网站建设,网站插入银行支付怎么做屏幕如图所示,共14个IO口(也可能只有13个),控制屏幕的有9个IO口 详细版介绍见:http://www.ciast.net/post/20151112.html 反面IO口图: 连接通过SPI方式连接: //默认程序接线说明: #d…

屏幕如图所示,共14个IO口(也可能只有13个),控制屏幕的有9个IO口

详细版介绍见:http://www.ciast.net/post/20151112.html

 

反面IO口图:

 

连接通过SPI方式连接:

//默认程序接线说明:
#define LCD_CTRL             GPIOB                //定义TFT数据端口为PB组
#define LCD_LED            GPIO_Pin_9  //MCU_PB9           对应接液晶屏(或者模块)TFT --PIN_LED背光正极(背光可以由IO口提供电流,或者外接3.3V电压)
#define LCD_CS            GPIO_Pin_11 //MCU_PB11            对应接液晶屏(或者模块)TFT --CS
#define LCD_SCL            GPIO_Pin_13    //MCU_PB13            对应接液晶屏(或者模块)TFT --SCL
#define LCD_SDA            GPIO_Pin_15    //MCU_PB15 MOSI    对应接液晶屏(或者模块)TFT --SDA 
#define LCD_SDO            GPIO_Pin_14    //MCU_PB14 MISO    对应接液晶屏(或者模块)TFT --SDO 
#define LCD_RS             GPIO_Pin_10    //MCU_PB10            对应接液晶屏(或者模块)TFT --RS/DC
#define LCD_RST           GPIO_Pin_12    //MCU_PB12            对应接液晶屏(或者模块)TFT --RST

  实现功能:

//本测试程序演示功能包括:
//1.纯色填充测试
//2.英文显示测试示例
//3.中文显示测试示例
//4.2D按钮显示测试示例
//5.数码管字体数字显示测试示例
//6.图片显示测试示例
//7.横竖屏切换测试示例

main.c文件:

//     /* Includes ------------------------------------------------------------------*/
#include "stm32f10x.h"
#include "Lcd_Driver.h"
#include "GUI.h"
#include "delay.h"
#include "Picture.h"GPIO_InitTypeDef GPIO_InitStructure;void RCC_Configuration(void);void Delayms(__IO uint32_t nCount);unsigned char Num[10]={0,1,2,3,4,5,6,7,8,9};void Redraw_Mainmenu(void)
{Lcd_Clear(GRAY0);Gui_DrawFont_GBK16(16,0,BLUE,GRAY0,"全动电子技术");Gui_DrawFont_GBK16(16,20,RED,GRAY0,"液晶测试程序");DisplayButtonUp(15,38,113,58); //x1,y1,x2,y2Gui_DrawFont_GBK16(16,40,YELLOW,GRAY0,"颜色填充测试");DisplayButtonUp(15,68,113,88); //x1,y1,x2,y2Gui_DrawFont_GBK16(16,70,BLUE,GRAY0,"文字显示测试");DisplayButtonUp(15,98,113,118); //x1,y1,x2,y2Gui_DrawFont_GBK16(16,100,RED,GRAY0,"图片显示测试");Gui_DrawFont_GBK16(16,120,BLUE,GRAY0,"S1:Move.    ");Gui_DrawFont_GBK16(16,140,RED,GRAY0, "S2:Sellect  ");delay_ms(1000);delay_ms(1000);/*Gui_DrawFont_Num32(100,125,RED,GRAY0,Num[5]);delay_ms(1000);Gui_DrawFont_Num32(100,125,RED,GRAY0,Num[4]);delay_ms(1000);Gui_DrawFont_Num32(100,125,RED,GRAY0,Num[3]);delay_ms(1000);Gui_DrawFont_Num32(100,125,RED,GRAY0,Num[2]);delay_ms(1000);Gui_DrawFont_Num32(100,125,RED,GRAY0,Num[1]);delay_ms(1000);Gui_DrawFont_Num32(100,125,RED,GRAY0,Num[0]);    */
}void Num_Test(void)
{u8 i=0;Lcd_Clear(GRAY0);Gui_DrawFont_GBK16(16,20,RED,GRAY0,"Num Test");delay_ms(1000);Lcd_Clear(GRAY0);for(i=0;i<10;i++){Gui_DrawFont_Num32((i%3)*40,32*(i/3)+30,RED,GRAY0,Num[i+1]);delay_ms(100);}delay_ms(1000);}
//文字显示测试全动电子技术商城因为专注所以专业程
void Font_Test(void)
{u8 x_offset;
#ifdef H_VIEW  //如果定义了横屏显示x_offset=40;
#elsex_offset=0;
#endifLcd_Clear(GRAY0);Gui_DrawFont_GBK16(16,10,BLUE,GRAY0,  "   文字显示测试   ");delay_ms(1000);Lcd_Clear(WHITE);Gui_DrawFont_GBK16(x_offset,10,RED,WHITE,  "     全动电子技术有限公司      ");Gui_DrawFont_GBK16(x_offset,30,RED,WHITE,  "         QDtech .,LTD         ");Gui_DrawFont_GBK24(x_offset,50,BLUE,WHITE, "           欢迎您            ");Gui_DrawFont_GBK16(x_offset,100,GREEN,WHITE,   "     全程技术支持     ");    Gui_DrawFont_GBK16(x_offset,120,RED,YELLOW,   "http://qdtech.taobao.com");Gui_DrawFont_GBK16(x_offset,140,RED,YELLOW,   "E-Mail:QDtech2008@gmail.com");Gui_DrawFont_GBK16(x_offset,160,RED,YELLOW,   "技术交流群:324828016");    Gui_DrawFont_GBK16(x_offset,180,BLUE,WHITE,   "Tel:15989313508 ");delay_ms(3000);    
}void Color_Test(void)
{u8 i=2;Lcd_Clear(GRAY0);Gui_DrawFont_GBK16(20,10,BLUE,GRAY0,"Color Test");delay_ms(1000);while(i--){Lcd_Clear(WHITE);Lcd_Clear(BLACK);Lcd_Clear(RED);Lcd_Clear(GREEN);Lcd_Clear(BLUE);}        
}
//16位 垂直扫描  右到左  高位在前
void show_pic(const unsigned char *p)
{int i,j;unsigned char picH,picL;//Lcd_SetRegion(0,0,240-1,240-1);for(i=0;i<240;i++)for(j=0;j<320;j++){picH=*p++;picL=*p++;Lcd_WriteData(picH);Lcd_WriteData(picL);}        
} u16 ID=0;
int main(void)
{//uint16_t a;/* System Clocks Configuration **********************************************/SystemInit();delay_init(72);//延时初始化 while(1) {Lcd_Init();            Lcd_Clear(WHITE);LCD_LED_SET;//delay_ms(500);// LCD_LED_CLR;//delay_ms(500);//LCD_LED_SET;Redraw_Mainmenu();//简单菜单测试Color_Test();//简单刷屏测试Num_Test();//数码管字体显示Font_Test();//中英文测试  
            Lcd_Clear(WHITE);  show_pic(gImage_123);//图片显示测试delay_ms(1000);delay_ms(1000);Lcd_Clear(WHITE);  Gui_DrawFont_GBK16(10,50,BLUE,GRAY0,"测试成功.");delay_ms(1000);}}void RCC_Configuration(void)
{   /* Setup the microcontroller system. Initialize the Embedded Flash Interface,  initialize the PLL and update the SystemFrequency variable. */SystemInit();
}void Delayms(__IO uint32_t nCount)
{for(; nCount != 0; nCount--);
}#ifdef  USE_FULL_ASSERT
/*** @brief  Reports the name of the source file and the source line number*   where the assert_param error has occurred.* @param file: pointer to the source file name* @param line: assert_param error line source number* @retval : None*/void assert_failed(uint8_t* file, uint32_t line)
{ /* User can add his own implementation to report the file name and line number,ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) *//* Infinite loop */while (1){}
}
#endif/******************* (C) COPYRIGHT 2009 STMicroelectronics *****END OF FILE****/

最终效果图:

----------------------------------------------------------------------------------------------------------

其他文件:

整个 STM程序下载:http://download.csdn.net/detail/zgc261/7306853

转载于:https://www.cnblogs.com/zitech/p/3712864.html

http://www.jmfq.cn/news/5066425.html

相关文章:

  • 网站建设行业广告语/seo搜索优化 指数
  • ps做图 游戏下载网站有哪些内容/中国工商业联合会
  • 建站展示/app推广之家
  • 专业做中文网站/百度seo培训班
  • 夜间正能量网站/关键词你们懂的
  • 做网站时为什么导航时两行字/最新推广注册app拿佣金
  • 直销系统网站开发/晋城seo
  • 提供家居企业网站建设/青岛seo结算
  • 内部门户网站建设方案/sem是什么意思
  • it外包公司好不好/站长之家的seo综合查询工具
  • 大良企业网站建设/网络营销的基本方法有哪些
  • 做电影ppt模板下载网站/搜狐综合小时报2022113011
  • 国企怎么做网站/seo关键词排名优化联系方式
  • 网站维护员招聘/空间刷赞网站推广
  • 黄山网站建设有哪些/知乎推广公司
  • 专业柳州网站建设公司/百度免费推广平台
  • 专门做音乐的网站/精准网站seo诊断报告
  • 重庆网站建设外包公司哪家好/外贸网站建设流程
  • wordpress 付款插件/网站seo优化免费
  • 权重的网站/免费建站哪个网站最好
  • 上海市建设和城乡建设委员会网站/seopeix
  • 做外贸的网站如何选择服务器/合肥seo按天收费
  • 写作网站哪个名声好/搜狗网站收录提交入口
  • 五路居网站建设/手机如何做网站
  • 做户外的网站/优化工作流程
  • 做网站怎么上传图片/建网站教程
  • 做cms网站/简易的旅游网页制作
  • wordpress 显示备案信息/长沙网站托管优化
  • 免费申请一个qq号/百度seo关键词排名价格
  • 产品设计经典案例/湖南网络优化服务