Possable PWM Issue ?

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 7.

Moderator: Benj

Post Reply
User avatar
Steve001
Valued Contributor
Valued Contributor
Posts: 1142
Joined: Wed Dec 31, 2008 3:37 pm
Contact:

Possable PWM Issue ?

Post by Steve001 »

Hi I am using a PIC16F1828

With the Example PWM & ADC
https://www.matrixtsl.com/wikiv7/index. ... )#Examples

The only change I have made is to use the internal osc. as per this post

viewtopic.php?f=63&t=21754&p=98648

The output is floating around 1 V any idea's ? tried all 4 outputs they the same

I am waiting till next week, will add some to a RS order in case of a faulty device as I only have one.

Steve
Success always occurs in private and failure in full view.

User avatar
LeighM
Matrix Staff
Posts: 2043
Joined: Tue Jan 17, 2012 10:07 am
Contact:

Re: Possable PWM Issue ?

Post by LeighM »

Hi Steve,
It's probably worth adding a toggle of a pin/LED in the loop, just to check that the program is running (and at correct speed).
e.g. with two 500mS delays

User avatar
Steve001
Valued Contributor
Valued Contributor
Posts: 1142
Joined: Wed Dec 31, 2008 3:37 pm
Contact:

Re: Possable PWM Issue ?

Post by Steve001 »

Hi Leigh

Will try that and get back to you - (the timer i used in the post that i asked for config advice runs ok although i have not accurately checked the timings)

Steve
Success always occurs in private and failure in full view.

User avatar
Steve001
Valued Contributor
Valued Contributor
Posts: 1142
Joined: Wed Dec 31, 2008 3:37 pm
Contact:

Re: Possable PWM Issue ?

Post by Steve001 »

Hi Leigh,

Had a quick play at the weekend, didn't have much time. Still not working yet
Did notice that PWM2 is mappable between 2 pins how do you change this ? in control the panel

Do you have to use the "APFCON Register code" . do I just use a c code icon before the PWM enable ?

Steve
Success always occurs in private and failure in full view.

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8874
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Contact:

Re: Possable PWM Issue ?

Post by medelec35 »

Hi Steve,
Looking at the datasheet, only CCP2 can be on an alternate pin as you have stated.
Just change Channel to Channel 2, Then you should be allowed to change Alternative from No to Yes.
If after that still not working then C code may be required.
If not already done so, you will need to make sure you are up-to date with the latest updates from here
Martin

If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.

Post Reply