Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 15:33 25 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : PULSE problems on UBW32

Author Message
Dave Everett
Regular Member

Joined: 24/06/2011
Location: Australia
Posts: 43
Posted: 04:47am 21 Mar 2012
Copy link to clipboard 
Print this post

I have MM3.1 loaded onto a UBW32 and have been testing the PULSE command and found it varies greatly.

I am using pin 20 for all my tests and a Saleae
logic analyser to measure the pulses.

Pulse 20,2 gives varying pulse widths anywhere from 1ms to 1.5ms.

If someone else has a UBW32, could they check and see if they are getting similar variability.

Thanks,
Dave


 
ernie
Newbie

Joined: 18/03/2012
Location: Australia
Posts: 14
Posted: 05:34am 21 Mar 2012
Copy link to clipboard 
Print this post

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
 
Dave Everett
Regular Member

Joined: 24/06/2011
Location: Australia
Posts: 43
Posted: 05:56am 21 Mar 2012
Copy link to clipboard 
Print this post

I totally missed that Ernie. I read it as 0.5us not ms, but you're right, the accuracy drops significantly.

I'll run some tests next week.

Dave
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024