FMUSER Wirless Transmit Video And Audio More Easier !

[email protected] WhatsApp +8618078869184
Language

    God teaches you 1602 LCD display experiment

     

    "1602 adopts standard 14 pin interface, in which: Pin 1: VSS is the ground power supply Pin 2: VDD connected to 5V positive power supply Pin 3: V0 is the contrast adjustment terminal of LCD. The contrast is the weakest when connected to the positive power supply and the highest when connected to the grounding power supply. If the contrast is too high, a "ghost" will be generated. When in use, the contrast can be adjusted through a 10k potentiometer Pin 4: RS is register selection, data register is selected at high level and instruction register is selected at low level. Pin 5: RW is a read-write signal line. Read at high level and write at low level. When RS and RW are at low level together, instructions or display addresses can be written; when RS is at low level, RW is at high level, busy signals can be read; when RS is at high level, RW is at low level, data can be written. Pin 6: terminal e is the enable terminal. When terminal e jumps from high level to low level, the LCD module executes the command. Pins 7 ~ 14: d0 ~ D7 are 8-bit bidirectional data lines. In addition, pins "a" and "K" are backlight pins, "a" is positive and "K" is negative, which will illuminate the backlight. The character generation memory (cgrom) inside the 1602 LCD module has stored 160 different dot matrix character graphics, as shown in Table 1. These characters include Arabic numerals, case of English letters, common symbols, Japanese Kanas, etc. each character has a fixed code, such as the code of uppercase English letter "a" is 01000001b (41h), When displaying, the module displays the dot matrix character graphics in address 41h, and we can see the letter "a" The controller inside the 1602 LCD module has 11 control commands, as shown in Table 2, Its read-write operation, screen and cursor operation are realized through instruction programming( Note: 1 is high level, 0 is low level) Instruction 1: clear the display, the instruction code is 01h, and the cursor is reset to the address 00h position Instruction 2: reset the cursor and return the cursor to address 00h Instruction 3: cursor and display mode setting I / D: cursor moving direction, high level moving right, low level moving left s: whether all words on the screen move left or right. High level means valid, low level means invalid Command 4: display switch control. D: Control the on and off of the overall display. High level means on display and low level means off display. C: control the on and off of the cursor. High level means with cursor and low level means without cursor. B: control whether the cursor flashes, high level flashes and low level does not flash Instruction 5: cursor or display shift s / C: move the displayed text at high level and move the cursor at low level Instruction 6: function setting command DL: 4-bit bus at high level and 8-bit bus at low level n: single line display at low level, double line display at high level F: 5x7 dot matrix characters at low level and 5x10 dot matrix characters at high level Instruction 7: character generator RAM address setting Instruction 8: DDRAM address setting Instruction 9: read busy signal and cursor address BF: it is the busy flag bit. High level indicates busy. At this time, the module cannot receive commands or data. If low level indicates not busy. Instruction 10: write data Instruction 11: read data The LCD module is a slow display device, so before executing each instruction, be sure to confirm that the busy flag of the module is low, indicating that it is not busy, otherwise the instruction will be invalid. To display characters, first enter the display character address, that is, tell the module where to display characters. Table 3 is the internal display address of dm-162. For example, if the address of the first character in the second line is 40H, can the cursor be positioned at the position of the first character in the second line by directly writing 40H? This does not work because the highest bit D7 is required to be constant as high level 1 when writing the display address, so the actually written data should be 01000000B (40H) + 10000000B (80h) = 110000000b (C0H) RSEQUP3.7 RWEQUP3.6 EEQUP3.5 movp3,#0ffh MOVP1,#01H; Clear screen ACALLENABLE MOVP1,#38H; 8-bit lattice ACALLENABLE MOVP1,#0FH; On display ACALLENABLE MOVP1,#06H; Move Cursor ACALLENABLE MOVP1,#80H; Display location ACALLENABLE l3:movp1,#01h acallenable movdptr,#table1; Send the first sentence callwrite1 callenable MOVP1,#0C0H; Write display start address (first position on the second line) ACALLENABLE; Call write command subroutine callwrite1 callenable movp1,#01h calldelay1 calldelay1 calldelay1 jmpl3 ENABLE:; Send command CLRRS CLRRW CLRE ACALLDELAY SETBE RET write1:; Send string movr1,#00h a1:mova,r1 movca,@a+dptr callwrite2 incr1 cjnea,#00h,a1; Use 00h as string end flag ret write2:; Send single character movp1,a setbrs clrrw clre calldelay setbe ret delay:; Delay subroutine movr7,#255 d1:movr6,#255 d2:djnzr6,d2 djnzr7,d1 ret delay1: movr7,#255 delay2:movr6,#255 djnzr6,$ djnzr7,delay2 ret ; Each table below is a sentence, with 00h as the end of each sentence. table1:db20h,20h,20h,57h,45h,4ch,43h,4fh,4dh,45h,20h,54h,4fh,20h,20h,20h,20h,00h table2:db20h,57h,57h,57h,2Eh,4dh,43h,55h,39h,39h,2Eh,43h,4Fh,4Dh,20h,20h,20h,00h End, read the full text, technology zone Summary of AVR MCU provided by great God Several working modes of timer in AVR Explain the solution of stnrg011 multi-mode PFC controller in detail Detailed explanation of ucc28c43-q1pwm control scheme (characteristics, indicators, block diagram, circuit diagram) Three minutes to tell you: AVR MCU fuse and unlock“

     

     

     

     

    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