This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

C version of timeout for "busy" adc

8051

Does anyone have a way or a suggestion on how to approach this issue. I don't want my ADC line to lock the code if the busy line never returns, I'd like to add a timeout to ensure that if after X interations of busy not responding that a trappable error can be generated and sent in replacement of the adc data.

This problem has been an issue in the past but I can't get my head around how to do this. The transistion time for EOC is around 9uS but could be longer or shorter depending upon temperature module is in.

Any thoughts or snippet of code that could be modeled?

Thanks

0