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

reading Sbuf

Hello, in my project work I want to read serially received data continuously and compare it with stored ID in MCU I am using 8051. If the ID match then Green LED will glow, for ID mismatch Orange LED. If no ID found Red LED should glow. In this I am getting problem,when valid Id received it is indicated by Green LED but if we stop sending ID i.e. logically NO DATA in SBUF the Red LED should glow ; it doesn't happen its showing Green Led on...how to solve this one?

Parents
  • "just a note; "redlighton show port bits set to '1' and I see n port configuration. Do you have external drivers fior the LEDs?"

    s10 and s11 high might be to turn off two green. While his function forgets to turn on red by changing s12 and s13.

    It's just that we can not now from code that does not contain any comments and does not make use of variable names that actually means something to the reader.

    All we know is that s12 and s13 seems to be unfairly handled by the code.

Reply
  • "just a note; "redlighton show port bits set to '1' and I see n port configuration. Do you have external drivers fior the LEDs?"

    s10 and s11 high might be to turn off two green. While his function forgets to turn on red by changing s12 and s13.

    It's just that we can not now from code that does not contain any comments and does not make use of variable names that actually means something to the reader.

    All we know is that s12 and s13 seems to be unfairly handled by the code.

Children
  • we can not now from code that does not contain any comments and does not make use of variable names that actually means something to the reader

    many amateues/beginners post with the assumption "the experts can figure it out"

    in this example, due to the above, and the abscence of a crystal ball, there is no way in hades that "the experts can figure it out"

    also, most of "the experts" are gainfully employed and do not want to take time away from paid time to "figure it out" whereas any "expert" does not need much time to reply when the problem/code is so well documented that there is no need to "figure it out", just a need to spot the problem.

    Erik

  • Thinking...thinking..... on peak point of project..need help from Experts!!

    Well i assume from this post that he may be working on a student project. He may be working for a company which sells complete projects to engineering students.

    I dont understand what is the peak point in this critical project!!
    These guys would not have read datasheets nor designed their codes.