FMUSER Wirless Transmit Video And Audio More Easier !

[email protected] WhatsApp +8618078869184
Language

    Interactive scheme of LCD module using SMC and LCD controller

     

    In the previous example, ILI93XX modules have been added in ASF, and related statements are made. This time you do a good job in the SMC, then use the API provided by ASF to print "Hello World!" On the screen. First, circuit diagram The wiring of the LCD connector of the development board is shown. All of these connectors are connected in accordance with the function of the SMC corresponding pin, which is clear that SMC comes with the LCD interact. There are two pins that require attention: The peripheral A of the PD18 pin is NCS1, i.e., the LCD is connected to the slice selection device 1 of the SMC. The RS line represents "Register Selection", depending on the different levels of this pin, you will choose to access different registers. The peripheral of the PC19 pin is the address line A1, which will be described later. Second, the interaction of SMC and LCD controller When interacting with some storage devices, there is a more complex timing. For example, when writing to the register of the LCD controller: Moreover, the difference between the level of the lead level is also specified. If you use SMC, you will automatically complete these timings automatically after doing the appropriate configuration. Also, the chip maps a piece of address. When accessing the address of the corresponding interval, it will be submitted to the SMC to complete the actual access work: The LCD controller is a chip selection device 1 of the SMC, so it is actually accessed to the LCD controller when the access address is in the interval [0x6100 0000, 0x61FF fff]. The RS is connected to the data line A1, so depending on the first bit of the access address, it will affect the high and low of the RS pin level depending on the first bit (from 0). If the RS is low at the access address 0x6100 0000, it is high when the 0x6100 0002 is accessed. Third, SMC timing settings The corresponding timing can be found on the chip manual of the LCD controller: When the MCK is 96 MHz, set it as follows: 1 2 3 4 5 6 Seduce 8 9 10 11 12 Mean 14 15 16 In one In 19 20 twenty one twenty two twenty three #define ili93xx_lcd_cs 1 #define SMC_CS SMC->SMC_CS_NUMBER [ili93xx_lcd_cs] / * If you use the ASF's PMC module, call this to enable your peripheral clock * / PMC_ENABLE_PERIPH_CLK (ID_SMC); SMC_CS.SMC_SETUP = SMC_SetUp_nwe_setup (1) | SMC_SETUP_NCS_WR_SETUP (1) | SMC_SETUP_NRD_SETUP (1) | SMC_SETUP_NCS_RD_SETUP (1); SMC_CS.SMC_PULSE = SMC_PULSE_NWE_PULSE (5) | SMC_PULSE_NCS_WR_PULSE (5) | SMC_PULSE_NRD_PULSE (15) | SMC_PULSE_NCS_RD_PULSE (15); SMC_CS.SMC_CYCLE = SMC_CYCLE_NWE_CYCLE (10) | SMC_CYCLE_NRD_CYCLE (300); / * Controlled by NRD or NWE signal * / SMC_CS.SMC_MODE = SMC_MODE_READ_MODE | SMC_MODE_WRITE_MODE; This setting does not have to be too strict, such as the settings in the ASF sample code and this a bit gap, but can run successfully. In addition, the sample code in the ASF is also a good learning material. Open sample items in Atmel Studio's Start Page: Fourth, the use of the LCD module In Conf_Board.h, you can see there are two configuration items. In general, these two configurations have been defined in the development board support module. However, after reading the previous section, you should also know that it makes so configured. Since this LCD controller is slightly complex (its chip manual has more than 100 pages), and the ASF has implemented the relevant module, so this will continue to use ASF. In ILI93XX, many control and drawing modules are implemented, and an English-language library is also included, which can be easily illustrated for basic graphics and English. The initialization of LCD. 1 2 3 4 5 6 Seduce 8 9 10 Structili93xx_opt_t lcd_init_opt; LCD_INIT_OPT.UL_WIDTH = ILI93XX_LCD_WIDTH; LCD_INIT_OPT.UL_HEIGHT = ILI93XX_LCD_HEIGHT; LCD_INIT_OPT.FOREGROUND_COLOR = Color_Black; LCD_INIT_OPT.BACKGROUND_COLOR = Color_White; / * Initializing LCD * / ILI93XX_INIT (& LCD_INIT_OPT); / * Start LCD * / ILI93XX_DISPLAY_ON (); Pack the screen as a sky blue. 1 2 3 4 / * The pixel format is Argb-888 * / Constuint32_t sky_blue_rgb = 0x87ceeb; ILI93XX_SET_FOREGROUND_COLOR (SKY_BLUE_RGB); ILI93XX_DRAW_FILLED_RECTANGLE (0, 0, ILI93XX_LCD_WIDTH, ILI93XX_LCD_HEIGHT); Draw a text. 1 2 3 / * Draw text * / ILI93XX_SET_FOREGROUND_COLOR (color_black); ILI93XX_DRAW_STRING (50, 150, (uint8_t *) "Hello World!"); There are many other APIs, such as controlling display or more, you can view the API document or the corresponding header file. Edit: hfy, read full text

     

     

     

     

    List all Question

    Nickname

    Email

    Questions

    Our other product:

    Professional FM Radio Station Equipment Package

     



     

    Hotel IPTV Solution

     


      Enter email  to get a surprise

      fmuser.org

      es.fmuser.org
      it.fmuser.org
      fr.fmuser.org
      de.fmuser.org
      af.fmuser.org ->Afrikaans
      sq.fmuser.org ->Albanian
      ar.fmuser.org ->Arabic
      hy.fmuser.org ->Armenian
      az.fmuser.org ->Azerbaijani
      eu.fmuser.org ->Basque
      be.fmuser.org ->Belarusian
      bg.fmuser.org ->Bulgarian
      ca.fmuser.org ->Catalan
      zh-CN.fmuser.org ->Chinese (Simplified)
      zh-TW.fmuser.org ->Chinese (Traditional)
      hr.fmuser.org ->Croatian
      cs.fmuser.org ->Czech
      da.fmuser.org ->Danish
      nl.fmuser.org ->Dutch
      et.fmuser.org ->Estonian
      tl.fmuser.org ->Filipino
      fi.fmuser.org ->Finnish
      fr.fmuser.org ->French
      gl.fmuser.org ->Galician
      ka.fmuser.org ->Georgian
      de.fmuser.org ->German
      el.fmuser.org ->Greek
      ht.fmuser.org ->Haitian Creole
      iw.fmuser.org ->Hebrew
      hi.fmuser.org ->Hindi
      hu.fmuser.org ->Hungarian
      is.fmuser.org ->Icelandic
      id.fmuser.org ->Indonesian
      ga.fmuser.org ->Irish
      it.fmuser.org ->Italian
      ja.fmuser.org ->Japanese
      ko.fmuser.org ->Korean
      lv.fmuser.org ->Latvian
      lt.fmuser.org ->Lithuanian
      mk.fmuser.org ->Macedonian
      ms.fmuser.org ->Malay
      mt.fmuser.org ->Maltese
      no.fmuser.org ->Norwegian
      fa.fmuser.org ->Persian
      pl.fmuser.org ->Polish
      pt.fmuser.org ->Portuguese
      ro.fmuser.org ->Romanian
      ru.fmuser.org ->Russian
      sr.fmuser.org ->Serbian
      sk.fmuser.org ->Slovak
      sl.fmuser.org ->Slovenian
      es.fmuser.org ->Spanish
      sw.fmuser.org ->Swahili
      sv.fmuser.org ->Swedish
      th.fmuser.org ->Thai
      tr.fmuser.org ->Turkish
      uk.fmuser.org ->Ukrainian
      ur.fmuser.org ->Urdu
      vi.fmuser.org ->Vietnamese
      cy.fmuser.org ->Welsh
      yi.fmuser.org ->Yiddish

       
  •  

    FMUSER Wirless Transmit Video And Audio More Easier !

  • Contact

    Address:
    No.305 Room HuiLan Building No.273 Huanpu Road Guangzhou China 510620

    E-mail:
    [email protected]

    Tel / WhatApps:
    +8618078869184

  • Categories

  • Newsletter

    FIRST OR FULL NAME

    E-mail

  • paypal solution  Western UnionBank OF China
    E-mail:[email protected]   WhatsApp:+8618078869184   Skype:sky198710021 Chat with me
    Copyright 2006-2020 Powered By www.fmuser.org

    Contact Us