![]() |
Forum Index : Microcontroller and PC projects : PWM no longer backround
Author | Message | ||||
hitsware Guru ![]() Joined: 23/11/2012 Location: United StatesPosts: 535 |
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: AustraliaPosts: 6220 |
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 StatesPosts: 535 |
> 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: AustraliaPosts: 6220 |
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: AustraliaPosts: 3269 |
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: AustraliaPosts: 6220 |
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 StatesPosts: 535 |
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 StatesPosts: 535 |
FWIW 4.4 on DuinoMite Mega acts the same Using line numbers gets rid of problem . |
||||
Geoffg![]() Guru ![]() Joined: 06/06/2011 Location: AustraliaPosts: 3269 |
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 StatesPosts: 535 |
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: AustraliaPosts: 3269 |
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 StatesPosts: 535 |
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 |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |