Problem with interfacing LCD with AT89c51



Hello All,

We are trying to interface 16*2 character LCD with Atmel AT89c51. We are
using ACM1602A. the connection to the 8051 is port 1 is used for data i.e.
DB0-DB7 of LCD and the RS,R/W,E pins to P2.0,P2.1,P2.2 respectively. and
the A and K pins to VCC and Ground respectively.The code for interfacing
is as follows.
-------------------------------------------------------------------------
ORG 0000H;
LJMP MAIN;
ORG 0030H;
MAIN:
ACALL INITIALISE;//first initialising the LCD
MAIN1: MOV A,#'M';
ACALL DISPLAY;
HERE: SJMP HERE;
INITIALISE:
MOV A,#038H;//selecting 2 rows.
ACALL CONFIGURE;
MOV A,#0EH;//displaying the cursor.
ACALL CONFIGURE;
MOV A,#06H;
ACALL CONFIGURE;
RET;
DISPLAY:
MOV P1,A;
SETB P2.0;//Setting RS
CLR P2.1;//Clearing R/W
SETB P2.2;//Setting E.
CLR P2.2;//Clearing E.
RET;

CONFIGURE:
CLR P2.0;//Clearing RS.
CLR P2.1;//Clearing R/W.
MOV P1,A;
SETB P2.2;//Setting E.
CLR P2.2;//Clearing E.
RET;
END;
-------------------------------------------------------------------------
Sorry for such a long post.
Awaiting help at the earliest.

Thanks in advance.
.



Relevant Pages

  • Re: Mystery LCD
    ... >similar to the one on the LCD. ... The remaining 13 pins are ... look for info on that interface and you'll find lots of data ... Embedded software/hardware/analog Info for designers: http://www.speff.com ...
    (sci.electronics.components)
  • Re: Additional Hardware Module with Xilinx MicroBlaze Processor
    ... a pcore for your LCD module. ... You can write to the fsl interface with the function putfslx, ... What I would like to do is define a GPIO port on the processor to ... and write to the FSL bus suffice? ...
    (comp.arch.fpga)
  • Re: Additional Hardware Module with Xilinx MicroBlaze Processor
    ... A pcore in EDK contains the HDL files and a set of data files. ... a pcore for your LCD module. ... You can write to the fsl interface with the function putfslx, ... What I would like to do is define a GPIO port on the processor to ...
    (comp.arch.fpga)
  • Re: Additional Hardware Module with Xilinx MicroBlaze Processor
    ... Then it should be a direct match for the FSL interface. ... MicroBlaze have plenty of options for the FSL instructions, ... I would also like to use the LCD ...
    (comp.arch.fpga)
  • Re: Additional Hardware Module with Xilinx MicroBlaze Processor
    ... Your busy signal needs be high when it can't accept a new word even ... You can write to the fsl interface with the function putfslx, ... I would also like to use the LCD ... What I would like to do is define a GPIO port on the processor to ...
    (comp.arch.fpga)