??? 05/13/05 01:59 Read: times |
#93365 - INT 4 C51 DOES'NT WANT TO EXIT |
Hi,
Please some one have a look and fix my following code. msg interrupt 4 (void) { unsigned char j,xchar; unsigned int xaddress; xchar=rec_232(); // waiting for a correct command xaddress=0x0000; if (xchar==0x40) // fills blank for 64 byte in the eeprom { for (j=0x00; j<0x40; j++) { write_eeprom(xaddress,0x00); xaddress++; } } send_rs232(0x39); //sending a request do { //writing data into eeprom xchar=rec232(); //waiting for data write_eeprom(xaddress,xchar); xaddress++; } while (xchar != 0x38); // until a sentinel come } // int end The problem after a signal for intterupt: The second loop exit after 50 bytes data transfer, BUT not exit because the sentinel char 0x38 arrived. It just exit some how, then the program start doing the first loop then do the second loop for the second times and after 50 bytes data transfer again the second loop exit not because the sentinel data 0x38 arrived, but still not EXIT from the INTERRUPT routine. The chip like Hang. Any comments will be appreaciated, and thank you in advance. Kurnia Brahmana |
Topic | Author | Date |
INT 4 C51 DOES'NT WANT TO EXIT | 01/01/70 00:00 | |
yes well | 01/01/70 00:00 | |
Why would it | 01/01/70 00:00 | |
I'm wondering... | 01/01/70 00:00 | |
Problem solved | 01/01/70 00:00 | |
You're welcome...![]() | 01/01/70 00:00 |