PWM outputs on 18F4431

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

Moderator: Benj

Post Reply
User avatar
Crenwick
Posts: 127
Joined: Sun Aug 07, 2011 1:40 pm
Location: Belgium
Has thanked: 7 times
Been thanked: 21 times
Contact:

PWM outputs on 18F4431

Post by Crenwick »

Hi,

How can I configure the PWM outputs on port B ? When I use the PWM component I'm only able to configure the channels 1 & 2 on port C.
18f4431.jpg
(83.81 KiB) Downloaded 322 times
Bernard

Flowcode 6 / EB006-V9

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: PWM outputs on 18F4431

Post by LeighM »

Hi

It looks like we need to do some further work on the fcd 18F4431.fcdx for this chip.

The PWM section should look more like this ...

Code: Select all

    <pwm >
        <prescaler >
            <option name='1' value='1' />
            <option name='4' value='4' />
            <option name='16' value='16' />
        </prescaler>
        <out port='1' pin='0' />
        <out port='1' pin='1' />
        <out port='1' pin='2' />
        <out port='1' pin='3' />
        <out port='1' pin='5' />
        <out port='1' pin='4' />
        <out port='3' pin='6' />
        <out port='3' pin='7' />
    </pwm>
If you want to edit your version and try it?
I notice that the PWM names start at zero, whereas our Channel list starts at one, so just watch out for that too.
I suspect we might have further work.

Regards,
Leigh

User avatar
Crenwick
Posts: 127
Joined: Sun Aug 07, 2011 1:40 pm
Location: Belgium
Has thanked: 7 times
Been thanked: 21 times
Contact:

Re: PWM outputs on 18F4431

Post by Crenwick »

Just added those lines, and channels are now visible.

Have just to wait my ordered PIC to test on HW :wink:

Regards,
Bernard

Flowcode 6 / EB006-V9

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: PWM outputs on 18F4431

Post by LeighM »

Hi
Now I have had chance to have a more detailed look at the datasheet for this device, it has become apparent that the original fcd is correct

Code: Select all

    <pwm >
        <prescaler >
            <option name='1' value='1' />
            <option name='4' value='4' />
            <option name='16' value='16' />
        </prescaler>
        <out port='2' pin='2' />
        <out port='2' pin='1' />
    </pwm>
The “PWM” channels are the CCP based PWM, on Port C Pin 2 and Pin 1
We do not yet have drop in support in Flowcode for the Power Control PWM Module of this device.

Regards,
Leigh

User avatar
Crenwick
Posts: 127
Joined: Sun Aug 07, 2011 1:40 pm
Location: Belgium
Has thanked: 7 times
Been thanked: 21 times
Contact:

Re: PWM outputs on 18F4431

Post by Crenwick »

Hi Leigh,

Thanks for the feedback, will look further in the datasheet how to use these Power control PWM modules :wink:

Regards,
Bernard

Flowcode 6 / EB006-V9

Post Reply