Jun 2, 2015 #1 R rameshrai Full Member level 3 Joined Aug 16, 2010 Messages 158 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
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
Jun 2, 2015 #2 A arun_190175 Member level 3 Joined Oct 22, 2014 Messages 60 Helped 14 Reputation 28 Reaction score 14 Trophy points 1,288 Location INDIA\RAJASTHAN\CHIRAWA Activity points 1,574 SCON=0x00 ok for send data TI=1; SBUF=(data); TI=1; while(TI==0); TI=0; TI=0
Jun 2, 2015 #3 R rameshrai Full Member level 3 Joined Aug 16, 2010 Messages 158 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
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
Jun 2, 2015 #4 A arun_190175 Member level 3 Joined Oct 22, 2014 Messages 60 Helped 14 Reputation 28 Reaction score 14 Trophy points 1,288 Location INDIA\RAJASTHAN\CHIRAWA Activity points 1,574 test it i think solve your problam and sorry for last post - - - Updated - - - Attachments 8051_mode0.rar 35.4 KB · Views: 95
Jun 3, 2015 #5 R rameshrai Full Member level 3 Joined Aug 16, 2010 Messages 158 Helped 7 Reputation 14 Reaction score 7 Trophy points 1,298 Activity points 2,272 it is not working
Jun 4, 2015 #6 A arun_190175 Member level 3 Joined Oct 22, 2014 Messages 60 Helped 14 Reputation 28 Reaction score 14 Trophy points 1,288 Location INDIA\RAJASTHAN\CHIRAWA Activity points 1,574 why check with simulation this is tested with real hardware