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.
PWM Timer And CANBus PIN
Moderator: Benj
-
- Posts: 18
- Joined: Tue Aug 23, 2016 8:03 am
- Has thanked: 3 times
- Been thanked: 2 times
- Contact:
- 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
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.
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.
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
-
- 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
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.
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.
-
- 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
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.
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.