| ??? 05/12/09 14:00 Read: times |
#165266 - Sorry Responding to: ???'s previous message |
I am Argentinian and de original code is in Spanish, therefore I translate it so you can understand.
"" was eaten by this forum it is a Null character that I send it as final data to compare and change of state. ...insert code here[/
void serial_int () interrupt 4
{
static char index;
static int State;
if (RI == 1)
{
RI= 0;
switch (Estado)
{
case WAITING:
if ( SBUF == 'X')
{
index = 0;
State = RECEPTION;
}
break;
case RECEPTION:
if ( SBUF != 'Null')
{
Buff_RX[index] = SBUF;
index ++;
}
else
{
Buff_RX [index] = ' ';
FlagCommandProccesor = 1;
State = WAITING;
}
break;
}
}
}]
|



