I didn't see the LCD screen. Forget the money, buy a program first.
/******************************************************************************** Experiment Name: LCD1602 experiment * Use of IO:LCD use P0 * Experimental results: Display love* on the LCD screen Note: *******************************************************************************/#incl Ude <reg52.h> #include <intrins.h> #define gpio_led p2#define gpio_lcd p0#define gpio_key p1#define UINT unsigned int#define uchar unsigned charsbit lcde=p2^7;sbit rw=p2^5;sbit rs=p2^6;uchar code dig_code[17]={0x3f,0x06,0x5b , 0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71};uchar my_code[]= "Love"; void Delay10ms (); void Lcdinit (); void lcdwritecom (Uchar com); void lcdwritedata (Uchar dat); void main () {Uchar I; Lcdinit (); for (i=0;i<4;i++) Lcdwritedata (My_code[i]), while (1) {}}void delay10ms () {Uchar i=38,j=130; while (i--) while (j--);} void lcdwritecom (Uchar com)//read command {rs=0;rw=0; gpio_lcd=com; Lcde=1;delay10ms (); lcde=0;} void Lcdwritedata (Uchar dat)//read data {rs=1;rw=0; Gpio_lcd=dat; Lcde=1;delay10ms (); lcde=0;} void Lcdinit ()//Initialize {lcdwritecom (0x38); Lcdwritecom (0x0c); Lcdwritecom (0x06); Lcdwritecom (0x01); Lcdwritecom (0x80);}
51 single-chip computer sixth---LCD LCD display module