2003-05-09 03:27 AM
2003-05-08 09:06 PM
I find a strange thing.
If i short circuit SCL and SDA together and then, for example, I send the slave address, if i make a wait loop for the end of the operation like this : while(!(I2CSR1 & EVNT_FLG)), it doesn't exit, so the program crash. I think that it could be a problem, because if i have an E2prom like slave i have to load my data and i have to manage all error situation, and a short circuit between SDA and SCL is one of this. If I put SCL or SDA to GND or Vcc everything is ok. I solve the problem using a timeout timer, but it is a workaround more than a solution. I accept help...2003-05-09 03:27 AM
Instead of doing an infinite loop, use the watchdog or a timeout routine for instance waiting for a long time and then if the event does not happen , that means that there is a problem: so a reset can be launched (through the WDG) or a s/w management. can be especially created for this case.