FMUSER Wirless Transmit Video And Audio More Easier !

[email protected] WhatsApp +8618078869184
Language

    51 Single Chip Microcomputer Driving Design for LCD1602 LCD

     

    51 single-chip - LCD1602 1,1602 LCD read / write timing (1), reading status RS = L, R / W = H, E = H. (Judgment is busy after the bus is released) (2) Read data RS = H, R / W = H, E = H. (3), write instructions RS = L, R / W = L, D0 ~ D7 = instruction code, E = high pulse (4), write data RS = H, R / W = L, D0 ~ D7 = data, E = high pulse 2, LCD display driver file #include #define LCD1602_DB P0 SBIT LCD1602_RS = P1 ^ 0; SBIT LCD1602_RW = P1 ^ 1; SBIT LCD1602_E = P1 ^ 5; / * Wait for liquid crystal ready * / Void LcdwaitReady () { UNSIGNED Char STA; LCD1602_DB = 0xFF; LCD1602_RS = 0; LCD1602_RW = 1; DO { LCD1602_e = 1; STA = LCD1602_DB; // Read status word LCD1602_e = 0; } While (sta & 0x80); // bit7 is equal to 1 means the liquid crystal is busy, repeatedly detected until it is equal to 0 } / * Writing a byte command to LCD1602 LCD, cmd - to write command value * / Void LCDWRITECMD (UNSIGNED Char CMD) { LCDWAITREADY (); LCD1602_RS = 0; LCD1602_RW = 0; LCD1602_DB = cmd; LCD1602_e = 1; LCD1602_e = 0; } / * Write one byte data to LCD1602 LCD, DAT - to write data value * / Void LCDWRITEDAT (UNSIGNED Char Dat) { LCDWAITREADY (); LCD1602_RS = 1; LCD1602_RW = 0; LCD1602_DB = DAT; LCD1602_e = 1; LCD1602_e = 0; } / * Set the display of the RAM start address, that is, the cursor position, (x, y) - the character coordinate on the corresponding screen * / Void LCDSetCursor (unsigned char x, unsigned char y) { UNSIGNED CHAR ADDR; IF (y == 0) // Calculate the address of the RAM by the input screen coordinate { Addr = 0x00 + x; // The first line character address starts from 0x00 } Else { Addr = 0x40 + x; // The second line character address starts from 0x40 } LCDWRITECMD (Addr | 0x80); // Setting a RAM address } / * Display strings on LCD, (x, y) - the start coordinate on the corresponding screen, STR-string pointer * / Void LCDSHOWSTR (Unsigned char y, unsigned char y, unsigned char * STR) { LCDSETCURSOR (X, Y); // Set the start address While (* str! = '\ 0') // Continuously write string data until the end of the end { LCDWRITEDAT (* STR ++); } } / * Initialization 1602 LCD * / VoidinitLCD1602 () { LCDWRITECMD (0x38); // 16 * 2 shows, 5 * 7 o'clock, 8-bit data interface LCDWRITECMD (0x0c); // Display, cursor off LCDWRITECMD (0x06); // Text does not move, address automatic +1 LCDWRITECMD (0x01); // clear screen }, Read the 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