Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 11:39 11 May 2025 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 : PWM no longer ’ backround ’

Author Message
hitsware
Guru

Joined: 23/11/2012
Location: United States
Posts: 535
Posted: 02:15pm 22 Jun 2014
Copy link to clipboard 
Print this post

CMM

I just upgraded from 4.1 to 4.5 and now
PWM does not stay running
It does work, but only if I put it in a
loop ...... ?????
The change log says something about the
commands have changed, but I see nothing
reflected in the manual ???
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6220
Posted: 02:41pm 22 Jun 2014
Copy link to clipboard 
Print this post

It seems to work OK for me.
I tried a single line
PWM 2000, 10, 50
and
PWM 20000, 10, 50

on a CMM (UBW32) and the main program ran as normal

It looks like the order of CH1 and CH2 were swapped in the change to V4.5 but I can't see any other differences apart from some changes made to make a PWM change in duty cycle less 'jumpy'

What settings are you using?

Jim
VK7JH
MMedit
 
hitsware
Guru

Joined: 23/11/2012
Location: United States
Posts: 535
Posted: 04:29pm 22 Jun 2014
Copy link to clipboard 
Print this post

> I tried a single line
> PWM 2000, 10, 50
> and
> PWM 20000, 10, 50

on a CMM (UBW32) and the main program ran as normal

BUT !

Did you have PWM output !?!?!?
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6220
Posted: 04:52pm 22 Jun 2014
Copy link to clipboard 
Print this post

  hitsware said   >
BUT !

Did you have PWM output !?!?!?

Yes.

The first channel (CH2) was on the right audio out and the second (CH1) was on the left audio out.

I think that the channels have been swapped.

Jim
VK7JH
MMedit
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3269
Posted: 05:27pm 22 Jun 2014
Copy link to clipboard 
Print this post

I don't have the code with me to check but it could be that the PWM output is stopped at the command prompt.

Are you running the PWM command in a program or at the command prompt?

Geoff
Geoff Graham - http://geoffg.net
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6220
Posted: 05:41pm 22 Jun 2014
Copy link to clipboard 
Print this post

The PWM stops when the program stops.
I test with Ctrl-C.

I am not sure what happens when the program stops with an error.

Jim
VK7JH
MMedit
 
hitsware
Guru

Joined: 23/11/2012
Location: United States
Posts: 535
Posted: 04:56am 23 Jun 2014
Copy link to clipboard 
Print this post

Circuit Gizmo ColorMax ..... 4.5

At boot up prompt
PWM 10000,50,50
works ....
If I
LIST
and then
RUN
it kills it ....
OR if I
EDIT
and then
RUN

It won't work again until I do
NEW


I'm sure it was OK with 4.1 because I was using it just before upgrade.
I seem to remember something similar with 4.4, but I'm not sure .....
 
hitsware
Guru

Joined: 23/11/2012
Location: United States
Posts: 535
Posted: 09:07am 23 Jun 2014
Copy link to clipboard 
Print this post

FWIW

4.4 on DuinoMite Mega acts the same

Using line numbers gets rid of problem .
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3269
Posted: 04:43pm 23 Jun 2014
Copy link to clipboard 
Print this post

I am not sure what the problem is. The NEW and RUN commands reset the state of the interpreter. Is this what is concerning you?

Geoff Graham - http://geoffg.net
 
hitsware
Guru

Joined: 23/11/2012
Location: United States
Posts: 535
Posted: 05:58pm 23 Jun 2014
Copy link to clipboard 
Print this post

As I understood the PWM command
( and it seemed to work w/ver 4.1 )
PWM turns on a hardware oscillator
with output parameters that can only
be modified by further PWM commands ...
I.E.........
PWM 1000,50,50
should result in 1kHz squarewaves on
left and right pwm output pins until
another PWM command
As it is now any doings (for lack of a better term)
with the program turns off the free running timers ....
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3269
Posted: 06:18pm 23 Jun 2014
Copy link to clipboard 
Print this post

Well (without going through the source) I don't think that this aspect has changed. And anyway, the PWM command is supposed to be used in a program, so what does it matter if the NEW and RUN commands stop it?

I suspect that this is must be a misunderstanding due to our different customary languages.

Geoff
Geoff Graham - http://geoffg.net
 
hitsware
Guru

Joined: 23/11/2012
Location: United States
Posts: 535
Posted: 01:37pm 24 Jun 2014
Copy link to clipboard 
Print this post

Thank You Geoff ,

Today everything seems fine :) Perhaps I wasn't holding my mouth right .
Besides upgrading the version , I switched back from using a PC terminal
to straight in and out of Maximite board . Gives everything a little differant
' feel '

MegaRegards ,
Michael Miller
 
Print this page


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

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025