Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Tools
Old 23rd December 2005, 02:00 AM   #1
Default AT89C55WD to transmit and receive data from max232..........

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]
frantry is offline  
Old 23rd December 2005, 02:15 AM   #2
Default 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
frantry is offline  
Old 23rd December 2005, 02:23 AM   #3
Default BLOCK DIAGRAM

block diagram
Attached Thumbnails
AT89C55WD to transmit and receive data from max232..........-blockdiagram.jpg  
frantry is offline  
Old 23rd December 2005, 02:53 AM   #4
Default MY schematic diagram

this picture i didnt add the reset button(pin 9 at89c55wd) due to space restrict.
Attached Thumbnails
AT89C55WD to transmit and receive data from max232..........-schematic_diagram.jpg  
frantry is offline  
Old 23rd December 2005, 09:54 AM   #5
Default

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).
__________________
L.Chung
eblc1388 is offline  
Old 27th December 2005, 02:10 AM   #6
Default

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
frantry is offline  
Reply

Tags
at89c55wd, data, max232, receive, transmit

Thread Tools
Display Modes




All times are GMT. The time now is 04:09 AM.


Electronic Circuits  |  Learning Electronics
eXTReMe Tracker