mstechca
New Member
Here is my 8051 code I am using now to print ABC to the LCD.
MOV P1,63
SETB P3.4
CLR P3.4
MOV P1,0
SETB P3.4
CLR P3.4
SETB P3.5
MOV P1,65
SETB P3.4
CLR P3.4
MOV P1,66
SETB P3.4
CLR P3.4
MOV P1,67
SETB P3.4
CLR P3.4
My clock is at about 2Khz, and this code works well. But is there any way I can somehow condense the code?
Each character or function sent seems to want 7 bytes just to display it.
and 2K flash / 7 bytes a piece = 292 characters or LCD functions maximum. Then divide by 16 since my LCD only holds 16 characters = approximately 18 screens. This excludes code used for processing data.
P3.4 is attached to the Enable pin of the LCD and P3.5 is attached to the Instruction/Data pin at P3.4
MOV P1,63
SETB P3.4
CLR P3.4
MOV P1,0
SETB P3.4
CLR P3.4
SETB P3.5
MOV P1,65
SETB P3.4
CLR P3.4
MOV P1,66
SETB P3.4
CLR P3.4
MOV P1,67
SETB P3.4
CLR P3.4
My clock is at about 2Khz, and this code works well. But is there any way I can somehow condense the code?
Each character or function sent seems to want 7 bytes just to display it.
and 2K flash / 7 bytes a piece = 292 characters or LCD functions maximum. Then divide by 16 since my LCD only holds 16 characters = approximately 18 screens. This excludes code used for processing data.
P3.4 is attached to the Enable pin of the LCD and P3.5 is attached to the Instruction/Data pin at P3.4