|
ILI9486TFT驅(qū)動(dòng)程序STM32 這個(gè)用來(lái)移植
1、該例程為JPEG圖片解碼例程。
2、使用說(shuō)明
(1)工程文件路徑:SY-STM32F407 V2程序\SY-STM32F407 V2例程:JPEG圖片解碼例程\Project\Project.uvproj。
(2)請(qǐng)使用MDK 4.0以上版本打開(kāi),MDK版本過(guò)低會(huì)導(dǎo)致無(wú)法識(shí)別工程。
(3)下載調(diào)試工具為JLINK。
(4)請(qǐng)將串口線(直連串口線)插在板子COM1口上,并打開(kāi)超級(jí)終端或串口助手,配置波特率115200,8位,一個(gè)停止位,無(wú)校驗(yàn)位。
(5)HEX文件下載到板子后,使用超級(jí)終端或串口調(diào)試助手可以看到調(diào)試信息,插上TFT模塊顯示一個(gè)小MM,表明例程運(yùn)行正確。
3、注意事項(xiàng)
請(qǐng)務(wù)必在下載、調(diào)試、運(yùn)行過(guò)程中,保持板子上電、JLINK連接并插在電腦上。
單片機(jī)源程序如下:
復(fù)制代碼 - /* ------------------------------------------包含的頭文件-----------------------------------------------*/
- #include "stm32f4xx.h"
- #include "delay.h"
- #include "led.h"
- #include "usart.h"
- #include "lcd.h"
- #include "adc.h"
- extern unsigned char JPGBUFF[];
- /*************************************************************************************
- * 函數(shù)名稱:main()
- * 參數(shù) :void
- * 返回值 :void
- * 描述 :程序主入口main函數(shù)
- *************************************************************************************/
- int main(void)
- {
- SystemInit(); //初始化系統(tǒng)時(shí)鐘,設(shè)置時(shí)鐘為168Mhz
- LED_GPIO_Config(); //初始化LED的GPIO配置
- SysTick_Init(); //系統(tǒng)節(jié)拍初始化
- USART1_Conf(); //串口1初始化
- LCD_Init(); //LCD初始化
- printf("\r\n歡迎使用SY-STM32F407 V2開(kāi)發(fā)板!\r\n");
- printf("\r\n 山巖科技!\r\n");
- printf("\r\n -----專業(yè),值得信賴!\r\n");
- delay_nms(50); //延時(shí)
- printf("\r\n 這是一個(gè)JPG解碼例程 \r\n");
- LoadJpegFile(JPGBUFF);
- while(1)
- {
- LED1(On);
- delay_nms(300);
- LED1(Off);
- delay_nms(300);
- }
- }
- #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
復(fù)制代碼
所有資料51hei提供下載:
ILI9486 JPEG圖片解碼例程.rar
(491.05 KB, 下載次數(shù): 95)
2018-11-27 03:48 上傳
點(diǎn)擊文件名下載附件
源代碼 下載積分: 黑幣 -5
|
|