Re: Hey, what is all this 'off topic' posting?



In article <pan.2005.09.04.15.39.36.685094@xxxxxxxxxx>,
keith <krw@xxxxxxxxxx> wrote:
[...]
>> With asm you know you will need 10 times more time to deliver 1/10th
>> of the functionality.
>
>Only if you've never heard of a macro.

You missed an obvious argument. I spend at least as much time on
designing the system as typing in code. If coding in C was infinitely
fast, it could only save me about half the time.

Example:

How do I store temperature?

The ADC input gives me an LSB of 0.43 degrees C.

I have to be able to display the value easily so I select, 0.1C
increments.

The highest temperature I need to deal with is 100C. That is 1000, 0.1C
increments.

I get zero from the ADC for all temperatures below 0C, so positive values
are all I need.

As a result, a 16 bit unsigned will work for temperature.

Now given the ADC input, what is the fastest way to turn the raw number
into my units?

the LSB from the converter is worth 4.3 in my numbering system.

The 4 part is easy. The 0.3 part is ging to take a little thinking.

..... etc ....

BTW: a table look up is the way to go if you've got the space.

--
--
kensmith@xxxxxxxxx forging knowledge

.



Relevant Pages

  • Re: Hey, what is all this off topic posting?
    ... > The ADC input gives me an LSB of 0.43 degrees C. ... > increments. ... a 16 bit unsigned will work for temperature. ... > the LSB from the converter is worth 4.3 in my numbering system. ...
    (sci.electronics.design)
  • Re: Hey, what is all this off topic posting?
    ... >The ADC input gives me an LSB of 0.43 degrees C. ... >increments. ... a 16 bit unsigned will work for temperature. ... >the LSB from the converter is worth 4.3 in my numbering system. ...
    (sci.electronics.design)
  • Re: Momentarily verbal
    ... The Alan Braggins entity posted thusly: ... For temperature, I don't have to pretend. ... more increments per integer ...
    (rec.arts.sf.fandom)
  • Re: Tracking Down a Computer Power Failure
    ... > size of a match box and will report the temperature in various increments ... I could put it on the circuit board somewhere or just inside the ...
    (comp.os.linux.hardware)