Hi Guys
I had couple of minutes to investigate the MAX and MIN and ways around them as the syntax seems upside down TO ME. Here is the result.
I know it isn't much of a difference but why use something that is less clear and less efficient?
Printable View
Hi Guys
I had couple of minutes to investigate the MAX and MIN and ways around them as the syntax seems upside down TO ME. Here is the result.
I know it isn't much of a difference but why use something that is less clear and less efficient?
Just understand it as MIN or MAX of the two values ...
BTW ... your use here seems a bit strange ... @ the speed you run Why not make use of a Hardware comparator or an ADC measure ???
the 1.5v trip limit of the inputs is ... not so precise ( absolute value ) ... especially if some capacitive circuitry around ... added to the high slew-rate of your signals, the result is quite predictable ... ;)
The difference in time you see is due to the different working values comparing macros ... just have a look to the produced .asm, and you'll understand that ...
AND .. YES, MIN and MAX commands are slower than IF-THEN ...
Alain