PWM Timer And CANBus PIN

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

Moderator: Benj

Post Reply
msahin1976
Posts: 18
Joined: Tue Aug 23, 2016 8:03 am
Has thanked: 3 times
Been thanked: 2 times
Contact:

PWM Timer And CANBus PIN

Post by msahin1976 »

Hello Everyone,
I'm using PIC18F45K80 and PIC18F46K80 at my projects and I face a problem when tried to adjust at FlowCode 6.

I can't select Timer 4 at PIC18F46K80 microcontroller for PWM.

I can't select second CANBus pins (CANTX C6, CANRX C7) at PIC18F46K80 and PIC18F45K80.

User avatar
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: PWM Timer And CANBus PIN

Post by Benj »

Hello,

I beleive both of these features are currently available in Flowcode 8.

You can use the 30-day trial to find out if version 8 is more suitable for your requirements.

msahin1976
Posts: 18
Joined: Tue Aug 23, 2016 8:03 am
Has thanked: 3 times
Been thanked: 2 times
Contact:

Re: PWM Timer And CANBus PIN

Post by msahin1976 »

Hi Benj,
I checked Flowcode 8 for this issue as you told me. But it has the same problem.

Also, I prefer Flowcode 6 which should be already doing these stuff.

msahin1976
Posts: 18
Joined: Tue Aug 23, 2016 8:03 am
Has thanked: 3 times
Been thanked: 2 times
Contact:

Re: PWM Timer And CANBus PIN

Post by msahin1976 »

Hi Benj,
I was able to select TMR4 for PWM by writing to the registers. I have written down codes for those who interested.

"
#define TMR4PRESCALE 1
pr4 = (32000000 / (5000 x 4 x TMR4 PRESCALE)) -1;
ccptmrs = ccptmrs | 0b00000010;
ccp4con = ccp4con | 0b00001100;
t4con = t4con | 0b00000101;
trisc = trisc | 0b00000100; "

I was wrong about the CANBus alternative pins. Choosing alternative pins for CANBus was about configuring the microcontroller. It worked correctly when configured.

Post Reply