PULSE problems on UBW32


Author Message
ernie
Newbie

Joined: 18/03/2012
Location: Australia
Posts: 14
Posted: 05:34am 21 Mar 2012      

From the MMBASIC 3.1 manual:


  Quote  PULSE pin, width

Will generate a pulse on 'pin' with duration of 'width' mS.
'width' can be a fraction. For example, 0.01 is equal to 10 μS This enables the generation of very narrow pulses.
The generated pulse is of the opposite polarity to the state of the I/O pin when the command is executed. For example, if the output is set high the PULSE command will generate a negative going pulse.

Notes: For a pulse of less than 1 mS the accuracy is ± 1 μS. For a pulse of 1 mS or more the accuracy is ± 0.5 mS. A pulse of more than 1 mS will run in the background. 'pin' must be configured as an output.


So if the pulse is 1ms or more, the accuracy drops to ± 0.5 mS as it runs in the background.

That may be your problem.

Try some pulses less than 1mS and see how accurate it is.

Edited by ernie 2012-03-22