I2C again...
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2003-05-09 3:27 AM
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2003-05-08 9:06 PM
Posted on May 09, 2003 at 06:06
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...Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2003-05-09 3:27 AM
Posted on May 09, 2003 at 12:27
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.
