IamNew
Newbie level 6
Hi there,
I am doing a microcontroller project which utilizing AT 89S52 and a LCD 16x1. I have problem when trying to display letter of 'N' to the LCD. I could have the display on the LCD display but it only give me the LCD backlight and show me the black boxes. My microcontroller is tested fine.
Below is the codes that I programmed into my microcontroller
The Schematic of my circuit:
Please guide me if I am wrong somewhere in the circuit or the code.
I am doing a microcontroller project which utilizing AT 89S52 and a LCD 16x1. I have problem when trying to display letter of 'N' to the LCD. I could have the display on the LCD display but it only give me the LCD backlight and show me the black boxes. My microcontroller is tested fine.
Below is the codes that I programmed into my microcontroller
Code:
ORG 0
MOV A,#38H;
ACALL COMNWRT;
ACALL DELAY;
MOV A,#0EH;
ACALL COMNWRT;
ACALL DELAY;
MOV A,#01H;
ACALL COMNWRT;
ACALL DELAY;
MOV A,#06H;
ACALL COMNWRT;
ACALL DELAY;
MOV A,#84H;
ACALL COMNWRT;
ACALL DELAY;
MOV A,#'N';
ACALL DATAWRT;
ACALL DELAY;
AGAIN: SJMP AGAIN;
COMNWRT: MOV P2,A;
CLR P3.0;
CLR P3.1;
SETB P3.2;
CLR P3.2;
RET
DATAWRT:MOV P2,A;
SETB P3.0;
CLR P3.1;
SETB P3.2;
CLR P3.2;
RET
DELAY: MOV R3,#50;
HERE2: MOV R4,#255;
HERE: DJNZ R4,HERE;
DJNZ R3,HERE2;
RET
END
The Schematic of my circuit:
Please guide me if I am wrong somewhere in the circuit or the code.
Attachments
Last edited: