On Fri, Jan 14, 2011 at 2:18 PM, Joep Suijs <[email protected]> wrote:
> Hi Vasi, > > 2011/1/14 funlw65(Vasi) <[email protected]>: > > Hi, > > > > I said in the first comment: > > > > "I think I wanted to see how low can be the delay after a > > conversion... > > otherwise I can't remember... " > > > > I know you did. And after that you say you tried again using the > program from your website and it works okay. The program from your > website does not work for me and that might be related to the delay > mentioned. So i'm interested in the answer on: > > What is the delay in convert_18B20() you use? > for the test you just did... > > I worked on the library this evening and rearranged more stuff. I get > a bit confused of all the different functions. Where it boils down to > is: > - you can read the temperature only (crc is not read). > or > - you can read the temperature with crc (actually the full > scratchpad), check if the crc is correct and retry a number of times. > > and > - you can get the temperature as a 'raw' value (a signed fixed point word) > or > - you can get the temperature split in two bytes and a sign > > and > - you can work with an id (multiple devices) > or > - you can work with a single device. > > What would you say if the number of functions is reduced, but the > behaviour of this functions can be controlled with constants? > So you will only have two read functions, one with _s_ and one without. > With constants you can control: > - if just the two tempature bytes are read, or crc is also read and > checked. > - the max nr of times the device is re-read when there is a crc error > - if the return value is raw or 'fixed point decimal' > > And with decimal I mean a word in range from 1280 to -1270, > corresponding from 128.0 degrees to minus 127.0 degrees. This should > be properly handled with format.jal and a good replacement for the > three vars unit, digit and sign that are used now... > even when display on a 7 segment? Vasile -- You received this message because you are subscribed to the Google Groups "jallib" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/jallib?hl=en.
