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; } }
If you do this //code up to here //c=SBUF; c = iend; //rest of code what does your buffer look like after execution? does it make sense? If you run the simulator then execute this command SIN = 0xAA then stop what does your buffer look like?
I am 83.42% certain that the problem here is not understanding that SBUF is not one buffer. That is why I refer to "the bible" Erik
Ok, Erik! Thank you
View all questions in Keil forum