FMUSER Wirless Transmit Video And Audio More Easier !

[email protected] WhatsApp +8618078869184
Language

    Single chip drive for 1602 LCD

     

    LCD operation: 1602 LCD can only display ASCI, today drive 1602 LCD, the liquid crystal operation is simpler than the digital tube The basic operation timing of the liquid crystal: 1.1 Reading status: Enter: rs = L, RW = H, E = H Output D0 ~ D7 1.2 Write instruction: Enter: rs = L, RW = L, D0 ~ D7 instruction code, E = high pulse, output: None; RS is the data command selection (h / L); 1.3 Read Data: Enter rs = H, RW = H, E = H 1.4 write instruction: output, RS = L, RW = L, D0 ~ D7 = data, E = high pulse Note: Read and write detection must be performed before the controller is read and write each time, ensure that STA7 is 0, can be replaced with a simple delay. Initialization setting Display mode settings Communication code: 00111000 function 16 * 2 display, 5 * 7 o'clock, 8 is instructions for data interface 0x38 Display the setting of on / off Therefore, left shift and right by n and s Data pointer instruction code 80h + address code (0-27h, 40h to 67h) other settings The instruction code 01H function is a display clear screen: 1 data pointer is clear, 2 all display clear 02H Show Enter: 1 Data Pointer Clear The circuit diagram is shown in the figure: Sample code: Dynamic display #include #include #define uchar unsigned char #define uint unsigned int SBIT LCDEN = P2 ^ 6; // These ports should be in contact with the hardware circuit SBIT LCDRW = P2 ^ 5; SBIT LCDRS = P2 ^ 4; SBIT DULA = P3 ^ 1; SBIT WELA = P3 ^ 2; Uchar NUM; Uchar code Table [] = "i like mcu!"; Uchar code Table1 [] = "i like huleihao"; Void delay (uint z) { UINT X, Y; For (x = z; x>0; x -) FOR (Y = 110; Y>0; Y -); } Void Write_com (uchar COM) // Write Command Function { LCDRS = 0; // Enable end 0 low pulse instructions, high pulse write data _nop _(); // Postpone a machine cycle LCDRW = 0; // low electricity to write data P0 = COM; DELAY (5); LcDen = 1; // Enable end to a high-level reading data DELAY (5); LcDEN = 0; // Enable end to a low level } Void write_date (uchar Date) // write data function { LCDRS = 1; // Enable end 0 low pulse instructions, high pulse data _nop _(); // Postpone a machine cycle LCDRW = 0; P0 = DATE; DELAY (5); LcDEN = 1; DELAY (5); LcDEN = 0; } void init () { DULA = 0; WELA = 0; // Turn off Digital Tube LcDEN = 0; WRITE_COM (0x38); // Display mode settings Write_com (0x0e); // Display Switch and Cursor Settings WRITE_COM (0x06); WRITE_COM (0x80 + 0x10); } void main () { INIT (); For (NUM = 0; Num<11; Num ++) { Write_date (Table [NUM]); DELAY (20); } // Write_com = 1; // Clean screen operation Write_com (0x80 + 0x53); // Setting data pointer For (NUM = 0; Num<15; Num ++) { Write_date (Table1 [Num]); DELAY (20); } For (NUM = 0; Num<16; Num ++) { Write_com (0x18); // The whole screen is left DELAY (20); } While (1); } Source; 21IC, 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