On 6 Oct 2011, at 12:54 , Matt Schinkel wrote:

I have done more work on TC77 library and sample. My library and sample are completely different from yours except the procedure names. I would like to commit these files to jallib, but do not wish to offend you in any way. Please let me know if the attached files are to your satisfactory.

I have some remarks, but you can commit.

You will see I have clamed the Author field since these are new files & code, and put your library under "Sources"

OK. Feel free to copy as much of my description as you like.

The name of the library file will be different from yours, therefore there will be 2 TC77 libraries (unless someone other then myself removes the old library).

That is very good, so I can keep compiling my old stuff.

<18f4620_temperature_tc77.jal><temperature_tc77_new.jal>

Some remarks:

You have three functions, which return an sbyte, and sword and an sdword. This is all celsius? You just throw away all lower bits behind the decimal point?

If so, then why 3 functions?

If the sdword function returns something else than celsius, don't call it that. Call it xx_hecto_celsius if it returns celsius * 100. Yes, my library has that mistake as well. I can't change that, because then I'd have to change hundreds of files that use my library. But you can.

Most temperature measurement systems will have more sensors, I have PICs that control 32 of them. Incorporating TC77_CS = LOW inside the library makes it impossible to use with several sensors.

You should explain the maximum speed of the sensor in the library and how to set up SPI.

You might want to add a "raw" function, which just returns the raw data from the TC77. I use this function a lot during debugging and when I get very weird temperatures. Converting to a nice floating decimal number on a display is not easy and it helps to know that the hardware is good. If the sensor returns FFFF or 0000, that conveys much more info than a weird Celsius value.


P.S. There is indeed assembler in my TC77 lib, but it is only a single statement. This was hastily ported from JAL 4.60, which had much more assembler (and no 16 bit variables!)


---
ir EE van Andel [email protected]  http://www.fiwihex.nl
Fiwihex B.V. Wierdensestraat 74, NL7604BK Almelo, Netherlands
tel+31-546-491106 fax+31-546-491107


--
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.

Reply via email to