Hi, I am trying to perform serial communication with two AT89S52 MCs. Now the problem is that sometime everything works fine, but sometimes not. ------ Hardware Config-------- ---> RC reset circuit ---> 11.0592 MHz crystal ---> Mode 1 for serial communication with 9600 baudrate ---> Port 2 as output port at receiver side
Hardware is working fine with simple programs like LED blinking, but when it comes to serial communication, nah ..........behaves randomly.... Any suggestion will be valuable for me.
The second block of code is for receiver not for transmitter.... and yes that line is commented so i think that is not affecting my hardware right......
you DO have a MAX232(equivalent) between your chip and the PC I hope
Erik
Thanks for your help, but as i mentioned earlier i am trying to perform serial communication in wired mode between two MCs, so MAX232 is still required..??
Yes, if you have some distance between your two processors then you should use MAX232 or similar on both sides. Logic-level communication isn't robust for longer distances - it is intended for use within a PCB or for shorter cable distances to a neighbour PCB.
Well lets see, i will try that too.. and once again thanks to all of you for your valuable time and comments.