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.

Serial communication between 8051 and PC

Status
Not open for further replies.

fubuaks

New Member
I am trying to send data serially from AT89s52 to PC using hyperterminal. But nothing is being displayed on the hyperterminal screen.

The code with which i've programmed the uc is:

MOV TMOD,20H
MOV TH1,#-3
MOV SCON,#50H
SETB TR1
AGAIN: MOV SBUF,#'Y'
HERE: JNB TI,HERE
CLR TI
SJMP AGAIN

The baud rate of PC is 9600 and i have used MAX232 IC for RS232 to TTL conversion.

My doubts are:

-Can I use normal single strand wires for connecting PC and MAX232.
-In the hyperterminal window i am getting Auto detect instead of 9600 8-n-1


my cnxns are:

8051 max232 RS232
11 to 11-14 to 2
10 to 12-13 to 3

pin no 5of RS232 to gnd
 
Thnx......now i am getting some arbitrary characters on hyper terminal screen. even if i send a binary value i get those same chars.
Please help me wid this prob.......
 
Circuit and snaps

The Max 232 chip is H1N232CPZ. uc is AT89s52. The hyperterminal screen shot is also attached. the code is:


MOV TMOD,#20H
MOV TH1,#-3
MOV SCON,#50H
SETB TR1
AGAIN: MOV SBUF,#'Y'
HERE: JNB TI,HERE
CLR TI
SJMP AGAIN
 

Attachments

  • hyper.JPG
    hyper.JPG
    141.2 KB · Views: 832
  • circuit.JPG
    circuit.JPG
    754.2 KB · Views: 1,006
Last edited:
hi,
The text describes a MAX233 which does not require external capacitors, IF you are using a MAX232 you must add the 4 capacitors.
 

Attachments

  • AAesp01.gif
    AAesp01.gif
    23 KB · Views: 951
Last edited:
hi,
I am new to micro controller.can u pls tell how to perform communicate between pc and micro controller using visual basic 6
 
hi,
I am new to micro controller.can u pls tell how to perform communicate between pc and micro controller using visual basic 6
 
thanks all for your replies.....i got the thingz correct now.....i was using a 12MHz crystal and assuming it same as a 11.0592MHz one.......silly!
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top