16x2 LCD hardware is programmable in 4-bit mode, using 6 LCD control signals
D4: PD4
D5: PD5
D6: PD6
D7: PD7

  • Buttons
    BT1: PB0
    BT2: PB1
    BT3: PB2
    Calling delay (1000) will have a delay of 1000ms ~ 1s.
    Postcard: Write a program that fulfills the following requirements:
    The original LCD display is as follows:
    Line 1: DTYS13 - HVKTQS
    Line 2: NHOM XX
  • When the BT1 key is pressed 2 characters XX (group name) flashes: display ¼ second, hide ¼ second, press the BT1 key the next time the LCD display as the original (when the XX is blinking, press the BT1 key flashing the same display as the original, while displaying the same as pressing the BT1 key, XX flashes)

  • When XX flashes, press the BT2 key to increase the value of XX to 1 unit, when bigger than 18, then 01: 01 → 02 → … → 18 → 01

  • When XX flashes, press the BT3 key to reduce the value of XX to 1 unit, when <01 returns 18: 18 → 17 → … → 01 → 18


Wrong. I don't care what you were trying to do, that is NOT the way to do it.

Speaking of wrong, you failed to read the stickies at the top of the forum. Do so now, and fix your post.

Please read this before posting a programming question. Use code tags to get rid of the italics in your code.

Always show us your ‘current’ compete sketch.
Use CTRL T to format the sketch.
Please use code tags.
Use the </> icon in the posting menu.

[code] Paste sketch here. [/code]