Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

8051 mode0 serial trans problem

Status
Not open for further replies.

rameshrai

Full Member level 3
Joined
Aug 16, 2010
Messages
159
Helped
7
Reputation
14
Reaction score
7
Trophy points
1,298
Activity points
2,272
hi,

i am trying to use the mode 0 serial transmission mode of 8051 microcontroller but it is not working.

what value of SCON register must be placed in order to use it?

i have used
scon = 0x00;

is this correct?

thanks
 

rameshrai

Full Member level 3
Joined
Aug 16, 2010
Messages
159
Helped
7
Reputation
14
Reaction score
7
Trophy points
1,298
Activity points
2,272
the code is not working i only get the clock signal but not the data.

why there is TI=1 two times and TI =0 two times?

Code:
#include <reg51.h>

void main(void)
 { 
   SCON=0x00;
TI=1;
    while(1)
    {
SBUF=0x05;
TI=1;
while(TI==0);
TI=0;
TI=0;
}
   
 }

thanks
 

arun_190175

Member level 3
Joined
Oct 22, 2014
Messages
60
Helped
14
Reputation
28
Reaction score
14
Trophy points
8
Location
INDIA\RAJASTHAN\CHIRAWA
Activity points
275
test it i think solve your problam
and sorry for last post

- - - Updated - - -
 

Attachments

  • 8051_mode0.rar
    35.4 KB · Views: 3

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top