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

the val don´t keep the SBUF value

I am testing a routine with serial interrupt and I notice that the value is not transferred from SBUF. I notice this in uVison debug. What's happen?

Please help me.

follow my parcial intr routine


if(RI)
{
   c = SBUF; //<-- here is my problems
   RI = 0;
   if (istart + ILEN != iend)
   {
      inbuf[iend++ & (ILEN-1)] = c;
    }
}

Thanks for your help

Parents
  • I am 83.42% certain that the problem here is not understanding that SBUF is not one buffer.

    I think that's very likely as well.

    Another problem is that some variable names (A, B, C, R0-R7) are overloaded. For example, if you enter A in the command window, the debugger cannot determine whether you mean your variable A or the accumulator. The same goes for B, and C (the carry), and so on.

    Jon

Reply
  • I am 83.42% certain that the problem here is not understanding that SBUF is not one buffer.

    I think that's very likely as well.

    Another problem is that some variable names (A, B, C, R0-R7) are overloaded. For example, if you enter A in the command window, the debugger cannot determine whether you mean your variable A or the accumulator. The same goes for B, and C (the carry), and so on.

    Jon

Children