This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Serial communication

Hi, I use AT89S52 in a project. I send and receive data through TXD, RXD pins to a GSM module for sending SMS to another mobile equipment. I use watchdog facility and the watchdog counter is reset at every 256 counts. My crystal frequency is 11.0592 MHz. It happens once in a while that the uC doesn't respond and remains as if it hangs. Then it has to be RESET again. I doubt whether it happens while serial data reception and sending happens simultaneously. I wrote the program in C using KEIL IDE.
My questions are
1) What are the special precautions to be taken in this case?(sending and receiving simultaneously)
2)why this happens even when the watchdog is active? It will be highly appreciated if anybody can give some guidance.

Parents
  • For resetting during switch ON, I used an RC network with 10uF and 10K. But today I changed it to a single 0.1uF capacitor connected from Vcc to RESET pin. It works. I expect that this will make some improvement as far as sensitivity to power supply spikes are concerned.

Reply
  • For resetting during switch ON, I used an RC network with 10uF and 10K. But today I changed it to a single 0.1uF capacitor connected from Vcc to RESET pin. It works. I expect that this will make some improvement as far as sensitivity to power supply spikes are concerned.

Children
  • You mean, you've tried it a couple of times on your bench, and you haven't noticed any problems?

    That is not anywhere near a sufficient amount of testing to guarantee that it will always work under all conditions of power supplies, noise, etc, etc,...

    You should understand this by now: you said you'd already tried it on your bench with no problems, and the problems only arise in the Real World - so it should be obvious that your bench is not a good simulation of the Real World!

    The whole purpose of a Supervisor chip is to cope with these kind of Real World situations that don't occur in nice, clean bench tests and are not covered by simplistic RC reset circuits...

  • You should understand this by now: you said you'd already tried it on your bench with no problems, and the problems only arise in the Real World - We were discussing this as if a program bug. I also thought it is so. I pass this additional details expecting that experienced people may give some useful hints. It is not that I am unaware about new problems that can come in the real world.

  • For resetting during switch ON, I used an RC network with 10uF and 10K.
    no wonder your have problems INSTALL A SUPERVISOR CHIP

    Erik