GUI graphics screen using BMP bit image in Emwin application

Source: Internet
Author: User
Tags directory create

1.1software that needs to be installed

① mdk-arm V5.10:

Finished installingmdk-armv5.10you will install it laterstm32f2xxof thePACK (MDK V5.10can only be installedKeil.stm32f2xx_dfp.2.1.0.packor-lower version), if you do not want to installPACK, installationmdkcortex-m Legacy Device support V5.10 (Mdkcm510.exe)is also possible;mdk-armv5.10Future versions are not supported in ChineseUTF-8encoded.

② J-link related drivers.

1.2Connecting Hardware

650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M01/7E/8B/wKiom1cDmWKjdSEeAArl_dhTQug246.jpg "style=" float: none; "title=" pic_01.jpg "alt=" Wkiom1cdmwkjdseeaarl_dhtqug246.jpg "/>

1.3AccessGuiof the graphics screenNand-flash

① Power on gui graphics screen and Span style= "FONT-SIZE:16PX;" >n-link download line plugged into computer usb interface (

② click n-link graphics screen to enter u Disk mode ( u disk identical access Gui graphic screen nand-flash (, reading speed 5.6mbytes/s) gui graphics screen into u The screen is not displayed after the disc mode.

③ copy data to local disk, then format nand-flash :

remark: 256Mbyte Product Format as FAT32 or FAT all can, but 128Mbyte products can only be formatted as FAT .

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/7E/87/wKioL1cDmg2jA7VYAABdBqei4gE380.png "style=" float: none; "title=" Pic_02.png "alt=" Wkiol1cdmg2ja7vyaabdbqei4ge380.png "/>

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/7E/8B/wKiom1cDmWOhhjRtAAA4n_hVGfQ913.png "style=" float: none; "title=" Pic_03.png "alt=" Wkiom1cdmwohhjrtaaa4n_hvgfq913.png "/>

1.4EstablishHellowordRoutines

for ① MDK Open Project:

.. \docs\democodes\empty_prj_emwin_noos_207ve_spi\mdk_proj\demo_emwin.uvproj

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/7E/87/wKioL1cDmg6Rsn7vAACHODuVNSw632.png "style=" float: none; "title=" Pic_04.png "alt=" Wkiol1cdmg6rsn7vaachoduvnsw632.png "/>

② Modification maintask.c File:

#include "Dialog.h"

#include <string.h>

#include <stdio.h>

#include "stm32f2xx.h"

#include "Glcd.h"

void Maintask (void)

{

Gui_init ();

_mhelloword (Wm_hbkwin);

while (1) {gui_delay (20);}

}


③ in .. \docs\democodes\empty_prj_emwin_noos_207ve_spi\application Directory create helloword.c file and join the project:

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/7E/87/wKioL1cDmg7hPGv3AABsBB44gkU039.png "style=" float: none; "title=" Pic_05.png "alt=" Wkiol1cdmg7hpgv3aabsbb44gku039.png "/>


④ Writing HELLOWORD.C Program:

#include "GUI.h"

#include "Dialog.h"

#include "Bitmap.h"

#define ID_WIN 1001

#define ID_BUT 1002

static Constgui_widget_create_info _ahelloword[] =// control struct-body array

{

{window_createindirect,0, Id_win, 0, 0, 640, 480, 0, 0},

{button_createindirect, "Helloword", Id_but, 280, 430, 80, 20},

};

static Void_cbhelloword (wm_message* PMSG)// Form callback function

{

Switch (pmsg->msgid)

{

Case WM_PAINT:

Gui_drawbitmap (&background, 0,0); Redraw a background picture

Break

Case Wm_init_dialog:

Break

Case Wm_notify_parent:

Break

Default

Wm_defaultproc (PMSG);

Break

}

}

Wm_hwin_mhelloword (Wm_hwin hparent)// Form Creation Functions

{

Wm_hwin Hwin;

Hwin = Gui_createdialogbox (_ahelloword,gui_countof (_ahelloword), _cbhelloword, hparent, 0, 0);

return Hwin;

}

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/7E/8B/wKiom1cDmWTwkSWeAAAwNQvRggQ360.png "style=" float: none; "title=" Pic_06.png "alt=" Wkiom1cdmwtwksweaaawnqvrggq360.png "/>


⑤ Create a background image with the system drawing tool: Background.bmp ( resolution 640*480)

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/7E/8B/wKiom1cDmWSx6M9nAACK6gKZ4z8182.png "style=" float: none; "title=" Pic_07.png "alt=" Wkiom1cdmwsx6m9naack6gkz4z8182.png "/>


⑥ copy bitmap list Generation tool to nand-flash root directory and double-click Run, which will generate bitmap.c , bitmap.h two files, bitmap.c , bitmap.h copy and add to MDK project:

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/7E/87/wKioL1cDmg-Q__uKAAB-B3hNmLg805.png "style=" float: none; "title=" Pic_08.png "alt=" Wkiol1cdmg-q__ukaab-b3hnmlg805.png "/>

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/7E/8B/wKiom1cDmWWgekY9AAAkRaWJkjg773.png "style=" float: none; "title=" Pic_09.png "alt=" Wkiom1cdmwwgeky9aaakrawjkjg773.png "/>


⑦ Compiling Helloword Engineering

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/7E/87/wKioL1cDmhDQJne5AACj-721_c8822.png "style=" float: none; "title=" Pic_10.png "alt=" Wkiol1cdmhdqjne5aacj-721_c8822.png "/>


1.5UninstallGuiof the graphics screenNand-flash

in theN-linkwhen the download line is in an idle state(led no longer flashes), clickN-linkconnection keys for download lines(or withUdisk, unplug it directly from the computer.N-linkdownload lines are available),GUIThe graphics screen will restart and enter the operating mode.

1.6Download and runHellowordRoutines

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/7E/87/wKioL1cDmhDziJbgAACEcpzaXms186.png "style=" float: none; "title=" Pic_11.png "alt=" Wkiol1cdmhdzijbgaacecpzaxms186.png "/>

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/7E/8B/wKiom1cDmWaza9JEAACraUFN20A398.png "style=" float: none; "title=" Pic_12.png "alt=" Wkiom1cdmwaza9jeaacraufn20a398.png "/>

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/7E/8B/wKiom1cDmWeSqgRTAACQFR4czc8486.png "style=" float: none; "title=" Pic_13.png "alt=" Wkiom1cdmwesqgrtaacqfr4czc8486.png "/>

650) this.width=650; "src=" http://s1.51cto.com/wyfs02/M01/7E/88/wKioL1cDmhTA4dISAATzGBEnvnw472.jpg "style=" float: none; "title=" pic_14.jpg "alt=" Wkiol1cdmhta4disaatzgbenvnw472.jpg "/>


GUI Graphic Screen product manual

First time using GUI graphical screen _helloword routines

GUI Graphics Screen performance test (SPI interface)

Emwin precautions

Emwin Drive Transplant (UP)

Emwin Drive transplant (bottom)

Emwin using fonts and bitmaps

Connaught Embedded Photoelectric

Www.neqee.com

GUI graphics screen uses BMP bit images in Emwin applications

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.