Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

readTempC does not wait until TB in status register is cleared #3

Open
GoogleCodeExporter opened this issue Sep 23, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link


The readTempC() function now does a delay(20) after requesting a new 
temperature. Accorfing to the datasheet one should wait until the TB flag is 
cleared in the status register.

see discussion @ http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1289330809/0

[code]
  // wait until TB register clears, see page 15/29 datasheet
  // iso delay(20);
  boolean ready = false;
  while (!ready)
  {
     //copy data from eeprom to scratchpad & read scratchpad
    _readMem(_scratchPad);
    ready = ( _scratchPad[STATUS]  & 0x10) == 0x00;
    delay(10);  // wait before reread of the scratchpad
  }
  // TB is cleared so conversion is ready
[/code]

Same is possibly true for the other readings, did not look after that.



What steps will reproduce the problem?


What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?


Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 10 Nov 2010 at 8:23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant