| ??? 01/08/08 09:07 Read: times |
#149117 - Serial Problem |
I use 89c52, and I want to make a pointer in the serial interrupt service routine, the pointer points to an array in which I want the serial data to be saved, but the serial doesn't work at all with the pointer, when I put normal variable it works but I need to put a pointer, how can I do this??
...R_serial () interrupt 4
{
if(RI)
{
serialR = SBUF;
RI=0;
*PtrRx = serialR;
++PtrRx;
} /* wait for receive data */
else
TI = 0;
}
... |



