PIC16F877A-PWM Output x 2
Moderator: Benj
-
- Flowcode v5 User
- Posts: 25
- Joined: Sun Feb 01, 2009 5:32 pm
- Location: Albox, Almeria, Spain.
- Has thanked: 4 times
- Contact:
PIC16F877A-PWM Output x 2
I require 2 PWM outputs from my 16F877A. I can simulate OK but the chip only outputs to PWM-1 I realize that you can assign the PWM outputs to the pins require but I just cant understand how? In properties I can highlight the pwm_pin and nothing comes up to confirm the pin? Also can expose but again it doesn't seem to do anything? It's driving me bonkers. I thought that enabling each PWM it would output to both PWM pins. However, although simulating OK it only outputs to the one PWM outhttp://www.matrixtsl.com/mmforums/download/fil ... d=28363put (CCP1)?
- Attachments
-
- PWM_fader16F877A O&C.fcfx
- (15.82 KiB) Downloaded 278 times
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: PIC16F877A-PWM Output x 2
Hello,
The Channel property allows you to map the peripheral the component will use the generate the PWM signal. The pin propery simply shows the pin used by the selected peripheral. If only one channel exists then your target device only has one PWM peripheral on-board.
You can use software to generate PWM using for example a timer interrupt if you do not have enough hadware channels on your device.
The Channel property allows you to map the peripheral the component will use the generate the PWM signal. The pin propery simply shows the pin used by the selected peripheral. If only one channel exists then your target device only has one PWM peripheral on-board.
You can use software to generate PWM using for example a timer interrupt if you do not have enough hadware channels on your device.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- 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: PIC16F877A-PWM Output x 2
Hi KrisJeff,
If you look at the properties of the PWM components on 2D panel: You can see that PWMs are both set to Channel1 and frequencies are different.
Also, You can see in the properties the pin PWM output should appear on.
You need to set PWM2 to Channel2: and make sure the period overflow and prescaler are matching on both channels.
If you look at the properties of the PWM components on 2D panel: You can see that PWMs are both set to Channel1 and frequencies are different.
Also, You can see in the properties the pin PWM output should appear on.
You need to set PWM2 to Channel2: and make sure the period overflow and prescaler are matching on both channels.
Martin
-
- Flowcode v5 User
- Posts: 25
- Joined: Sun Feb 01, 2009 5:32 pm
- Location: Albox, Almeria, Spain.
- Has thanked: 4 times
- Contact:
Re: PIC16F877A-PWM Output x 2
Dear medelec,
Thank you. I'm new to version 8. My properties panel was not set wide enough so I could only see the left column? What a plonker?
Thank you so much.
Thank you. I'm new to version 8. My properties panel was not set wide enough so I could only see the left column? What a plonker?
Thank you so much.
-
- 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: PIC16F877A-PWM Output x 2
You have not used Flowcode before so an easy mistake to make.
Within the Learning Centre You will find a useful Introduction to Microcontroller Programming course.
Although created using V7, It should be compatible with V8.
There are plenty of training videos as well.
Thanks for letting us know issue is resolved.
Within the Learning Centre You will find a useful Introduction to Microcontroller Programming course.
Although created using V7, It should be compatible with V8.
There are plenty of training videos as well.
Thanks for letting us know issue is resolved.
Martin