How to do Pwm off and on in flowcode??

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Post Reply
kg300
Posts: 31
Joined: Thu May 31, 2018 6:25 am
Has thanked: 5 times
Been thanked: 1 time
Contact:

How to do Pwm off and on in flowcode??

Post by kg300 »

This is c code
// Send 9ms burst
pwm_on();
delay_ms(9);
// Send 4.5ms space
pwm_off();
delay_us(4500);

How can i do this in flowcode?. Desiable pwm component madule for 9ms and enable it again or there is another way??

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: How to do Pwm off and on in flowcode??

Post by medelec35 »

You can set the duty to 0 for PWM off.
No need to disable then:
PWM Burst.png
PWM Burst.png (45.39 KiB) Viewed 6861 times
Martin

kg300
Posts: 31
Joined: Thu May 31, 2018 6:25 am
Has thanked: 5 times
Been thanked: 1 time
Contact:

Re: How to do Pwm off and on in flowcode??

Post by kg300 »

medelec35 wrote:
Wed Dec 15, 2021 3:54 pm
You can set the duty to 0 for PWM off.
No need to disable then:
PWM Burst.png
Thanks :D

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: How to do Pwm off and on in flowcode??

Post by medelec35 »

You're welcome.
It has been found that with some devices that PWM duty does not completely go to 0.
If that is the same as your target device, then Disable and Enable will be required.
Hopefully, that is not the case, but I thought I would make you aware of a possibility.
Martin

electron67
Posts: 311
Joined: Sat Jan 12, 2008 2:08 am
Has thanked: 104 times
Been thanked: 47 times
Contact:

Re: How to do Pwm off and on in flowcode??

Post by electron67 »

Hello, Martin

I know it has nothing with the question; I have been in the Matrix forum (Flowcode 3) since 2008, I was taking a look at the topics, I see that Martin (Medelec) is now part of the Matrix Staff, I CONGRATULATE You !!!
You are one of the people who is contributing with your knowledge to many of us in the forum, EXCELLENT :D
I'm glad to see that you belong to the staff de Matrix 8)

That we all have a good year 2022 ( My English is good :?: )

Enrique

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: How to do Pwm off and on in flowcode??

Post by medelec35 »

Hi Enrique.
Happy new year & thank you.
It's really nice what you said, I appreciate it. :D
electron67 wrote:
Wed Jan 05, 2022 11:46 pm
My English is good
Very good, well done. :)
Martin

siliconchip
Posts: 392
Joined: Wed Jan 05, 2011 11:24 am
Has thanked: 101 times
Been thanked: 24 times
Contact:

Re: How to do Pwm off and on in flowcode??

Post by siliconchip »

hi
i would also like to mention i too noticed martin (medelec)is matrix staff and over the years martin has helped and guided me as i tried and still do get to grips with flowcode programming and microcontrollers, matrix should be immensely proud of your contributions and about time your officially part of their team im sure you will be a great asset thank you martin (medelec)

bob

User avatar
Steve
Matrix Staff
Posts: 3418
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Re: How to do Pwm off and on in flowcode??

Post by Steve »

Some great comments in this thread about @medelec35! We're very happy and feel fortunate to have Martin as part of our team here at Matrix.

But thanks and recognition also to our VCs and wider community of users who continue to provide help and support on our forums.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: How to do Pwm off and on in flowcode??

Post by medelec35 »

Thank you, Bob for the lovely comments.
I really appreciate them.
I do try and help as much as I can

Thank you, Steve, that means a lot to me as well do all the lovely comments been made.
You are right, of course, but also a must to be included are the rest of matrix staff.
Without them, Flowcode would not be a wonderful product as it is.
Martin

siliconchip
Posts: 392
Joined: Wed Jan 05, 2011 11:24 am
Has thanked: 101 times
Been thanked: 24 times
Contact:

Re: How to do Pwm off and on in flowcode??

Post by siliconchip »

Hi
Couldnt agree more thanks everyone at matrix for a brilliant product and thanks to other users who help people like myself when we are banging our heads on a brick wall apologies for not adding this in my previous comments

Bob

Post Reply