Page 1 of 1

PWM1 --- Causes Pulses

Posted: Thu Jul 27, 2017 5:17 am
by JLeith
Not sure what might be going on

I have 2 projects and Team Pitch Count Receiver and I was able to get the PWM working 100% with the excellent help from Martin.

Now I went to my Pitch Count Transmitter and used the same Port E0 as the other project and soon as the PIC is loaded my Pezio rang load and for every.

I placed my digital scope and sure enough the setting of Enabled cause the port to active.

I have 2 pictures and the Program enclosed. I have looked to see I can see Port E0 being activated. When I watch the CHIP I never see it light I even put a LED on the flowcode and it never triggered.

The siginal is low but the Piezo activates full volume.

John

Re: PWM1 --- Causes Pulses

Posted: Thu Jul 27, 2017 4:59 pm
by medelec35
hi John,
I'm not following what the issue is?

Can you go in to more details please?

Martin

Re: PWM1 --- Causes Pulses

Posted: Thu Jul 27, 2017 10:07 pm
by Docara
Hi,


Sorry but I don't understand what your asking :(

But looking at your scope screen, if I'm reading it right, you look like you have pulses of 5mV (20mV per division) and you are asking use why you don't get an LED to work yes/no?

Matt

Re: PWM1 --- Causes Pulses

Posted: Thu Jul 27, 2017 11:33 pm
by Kenrix2
Maybe set the pin the piezo is on to output low at the beginning of your main? A pull down resistor might help too.

Re: PWM1 --- Causes Pulses

Posted: Fri Jul 28, 2017 5:55 am
by JLeith
Hello

I have the current program attatched.

When I have the piezo connected and I "Enable" the PWM port E0 has a signal that activates the Piezo.

I was able to capture 2 screen images
1. Port E0 with PWM "Disabled" ----- Clean Port
2. Port E0 with PWM " Enabled ---- Port has a pulse.....

I did not have to add the Actions for the PWM just making it Enabled cause the action. I can't figure why the Port E0 would produce a Pulse just by Enable the unit.

I guess it is hard to follow with out a PIC to load and see.

John

Re: PWM1 --- Causes Pulses

Posted: Fri Jul 28, 2017 8:38 am
by LeighM
Hi

That's what the PWM component does, it outputs the pulses when you enable it. Based on the properties that you set for it.
(You have set Channel 3, Port E.0)

Hope that helps.
Leigh

Re: PWM1 --- Causes Pulses

Posted: Fri Jul 28, 2017 8:51 am
by medelec35
What you could to is after PWM1 Enable,
place a SetDutyCycle with a duty of 0 then buzzer will only work when a SetDutyCycle of suggested 62 is reached.

Martin