Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - 1602 LCD displays the first bit of garbled code, where the AD sampling value is the voltage value.
1602 LCD displays the first bit of garbled code, where the AD sampling value is the voltage value.
During initialization, the internal operation of LCD takes a long time.

Void initialization ()

{

LC den = 0;

write _ com(0x 38); Delay (50); //Delay should be added.

write _ com(0x0e); Delay (50);

write _ com(0x 06); Delay (50);

}

Give it a try.

-

In addition, it is too complicated to display only three digits in the end, and the calculation process is too complicated.

Theoretically:

What results should be displayed when ad = 255?

What results should be displayed when ad = 0?