Hello everyone
Can I make PWM ouput directly from MIAC Arduino
Type: MI5466 AVR ATmega1281
How can PWM ouput made?
Like a small code eksemple!
The example below does not work in MIAC Arduino.
Attached:
PWM ouput directly from MIAC Arduino
-
- Posts: 484
- Joined: Mon Jul 30, 2012 3:39 pm
- Has thanked: 17 times
- Been thanked: 46 times
- Contact:
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: PWM ouput directly from MIAC Arduino
Hi Monie
Motor 1 (PB7) is an enable signal for outputs A and B
So you also need to set A and/or B.
So just add for example OutputON(1)
Hope that helps,
Leigh
Motor 1 (PB7) is an enable signal for outputs A and B
So you also need to set A and/or B.
So just add for example OutputON(1)
Hope that helps,
Leigh
- Attachments
-
- MIAC PWM TEST.fcfx
- (7.74 KiB) Downloaded 391 times
-
- Posts: 484
- Joined: Mon Jul 30, 2012 3:39 pm
- Has thanked: 17 times
- Been thanked: 46 times
- Contact:
Re: PWM ouput directly from MIAC Arduino
HI LeighM
On the oscilloscope I can not see anything PWM ouput A or B
I use your example!
User Flowcode v7
On the oscilloscope I can not see anything PWM ouput A or B
I use your example!
User Flowcode v7
Best Regard
Monie
Monie
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: PWM ouput directly from MIAC Arduino
Hi Monie,
That is very strange.
Could you post your generated C file "MIAC PWM TEST.c" and I will see if there are any differences with mine.
If you just have a loop with a delay and OutputON(1) delay OutputOFF(1)
and no PWM, does that give an output?
Also could you check the PWM component has a valid prescaler setting on your project.
Thanks
Leigh
That is very strange.
Could you post your generated C file "MIAC PWM TEST.c" and I will see if there are any differences with mine.
If you just have a loop with a delay and OutputON(1) delay OutputOFF(1)
and no PWM, does that give an output?
Also could you check the PWM component has a valid prescaler setting on your project.
Thanks
Leigh
-
- Posts: 484
- Joined: Mon Jul 30, 2012 3:39 pm
- Has thanked: 17 times
- Been thanked: 46 times
- Contact:
Re: PWM ouput directly from MIAC Arduino
HI LeighM
Hendes ER C-fil "MIAC PWM TEST.c".
Attached:
Hendes ER C-fil "MIAC PWM TEST.c".
Attached:
Best Regard
Monie
Monie
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: PWM ouput directly from MIAC Arduino
Hi Monie,
I think the issue is that the default prescaler value for the PWM component is not valid for the ATmega device.
So you need to change it with the drop down list.
Hope that helps,
Leigh
I think the issue is that the default prescaler value for the PWM component is not valid for the ATmega device.
So you need to change it with the drop down list.
Hope that helps,
Leigh
-
- Posts: 484
- Joined: Mon Jul 30, 2012 3:39 pm
- Has thanked: 17 times
- Been thanked: 46 times
- Contact:
Re: PWM ouput directly from MIAC Arduino
HI Leigh
OK with the "default prescaler".
I write prescaler manual.
Thank you very much.
GO'Weekend
OK with the "default prescaler".
I write prescaler manual.
Thank you very much.
GO'Weekend
Best Regard
Monie
Monie