Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

AT89C55WD to transmit and receive data from max232..........

Status
Not open for further replies.

frantry

New Member
i am asked to do AT89C55WD to transmit to MAX232 and the MAX232 interfacing to the PC.I am asked to use hyperterminal to transmit data to the AT89C55WD and then send back data to AT89C55WD which LCD DISPLAY (2X 16) will display the character.
i have to use assembly language to do it.



can anyone help me?
[/img]
 
MY assembly language

ORG 0000H
JMP MAIN
ORG 0100H

MAIN: CLR P2.5 ; send command
CLR P2.6 ; write
MOV A,#38H :5*8 font
CALL STROBE
MOV A,#0CH :cursor off
CALL STROBE
MOV A,#06H ;display pattern
CALL STROBE
MOV A,#01H ;clear display
CALL STROBE
MOV A,#02H ;return home
CALL STROBE

SETB P2.5 ;rs send data
MOV SCON,#50H ;set serial mode
MOV TMOD,#20H ;set timer1 to mode 2
MOV TCON,#00H ; set baud rate to 9600bps
MOV TH1,#FDH
SETB TR1

MOV A,#41H ;mov 41h to a

TX: MOV SBUF,A ;put character into sbuf
WAIT: JNB TI,WAIT ;check tx ready?
CLR TI ;yes,clear flag

RX: JNB RI,RX ;any character rx?
CLR RI ;yes,clear flag
MOV A,SBUF ;read character into a
CALL STROBE ;display in LCD
JMP TX ;endless loop

STROBE: SETB P2.7 ;Set e to high
MOV P0,A ;send to port 0

CLR P2.7
RET

END
 
BLOCK DIAGRAM

block diagram
 

Attachments

  • blockdiagram.jpg
    blockdiagram.jpg
    27.5 KB · Views: 562
MY schematic diagram

this picture i didnt add the reset button(pin 9 at89c55wd) due to space restrict.
 

Attachments

  • schematic_diagram.jpg
    schematic_diagram.jpg
    45.6 KB · Views: 571
Do not test your software all at once.

Works on the LCD routine alone to make sure that your can display correct characters on the LCD in its two lines.

After you have completed that, then you can test out your serial routine.

A brief look at your code indicates that your have not consider the proper power on reset sequence to place the LCD into operating mode(You need to wait for sometime and send several commands to do that, its all been described inside the datasheet of HD44780 LCD datasheet).
 
The above program have been tested on the LCD and it works.
u mean i didnt not do the power rest on the hardware?
(if yes i already put a reset button on the AT89C55WD)
Can pls give me an example code? Thanks 4 replying to me:)
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top