PDA

View Full Version : Pulse measure



Acetronics2
- 10th August 2004, 19:02
Hi Mel ...

Just a ( very ) little challenge for you ...

and what about using Pulsin Portx, 1, ...just followed with a RCTime Portx,0, ...
you can measure all in only 1 cycle !!!

Goes well ...and solution tested at 4 and 20 Mhz !!!

Best regards,
Alain

Melanie
- 11th August 2004, 02:36
Now this depends on your definition of a 'Cycle', and whether it matches my definition.

If by a 'Cycle' you mean ONE increment of the Program Counter (1uS with a 4MHz PIC), then you can't actually do anything meaningful as PICBasics PULSIN takes more than one cycle to execute and exit, let alone follow it with an RCTime.

Therefore your definition of 'Cycle' must be something different... like the INPUT PULSE CYCLE perhaps, in which case yes then your definition will hold water since...

Pulsin Portx,1,...

...meaures the HIGH state of the Input 'Cycle', whilst...

RCTime Portx,0,...

...will measure the LOW state of the 'Cycle'. So technically it's still the same 'cycle'.

Acetronics2
- 11th August 2004, 06:14
Hi, Mel

Of course, the definition is applied to the input signal !!!

have a nice day

Alain