CCP2 alternative pin

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 5.
To post in this forum you must have a registered copy of Flowcode 5 or higher.

Moderator: Benj

Post Reply
DirkB
Posts: 116
Joined: Wed Feb 08, 2012 2:45 pm
Has thanked: 7 times
Been thanked: 11 times
Contact:

CCP2 alternative pin

Post by DirkB »

Hello,
i am using PIC16F1825 and need all pins. I use only one CCP and all other pins are in use.
How to enable CCP2 on alternative pin A5? i have checked box "use alternative pin", but
it doesn't works. Is this a bug or a feature.

thanks

Dirk

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: CCP2 alternative pin

Post by LeighM »

Hi Dirk,

Looks like the alternative pin is not fully supported in V5.

Try adding the following C code

Code: Select all

	apfcon1 |= 1;
you will still also need to check the box "use alternative pin"

Regards,
Leigh

DirkB
Posts: 116
Joined: Wed Feb 08, 2012 2:45 pm
Has thanked: 7 times
Been thanked: 11 times
Contact:

Re: CCP2 alternative pin

Post by DirkB »

Hello Leigh,

thanks, but still doesn't works. Alternative pin is checked.

Dirk

medelec35
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: CCP2 alternative pin

Post by medelec35 »

Hi Dirk,
I have tried with FC5 setting up CCP2 alternative pin on 16F1824 since it uses the same RA5 and also requires same bit (0)of alternative pin function register apfcon1 to be set before it will work.
I can confirm it works.
If you are having trouble getting it to work, perhaps you can toggle RA5 high and low with outputs to see if connections are OK.

If you're still having problems after, then posting flowchart could help.

Martin
Martin

DirkB
Posts: 116
Joined: Wed Feb 08, 2012 2:45 pm
Has thanked: 7 times
Been thanked: 11 times
Contact:

Re: CCP2 alternative pin

Post by DirkB »

hello,

you are right. Alternative pin works.
But with timer1 in flowchart it in my
case doesn't!

thanks

Dirk

medelec35
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: CCP2 alternative pin

Post by medelec35 »

I have just check on the data sheet, and the issue you described is probably caused by the timer1 bug.
I posted a fix here

Martin
Martin

DirkB
Posts: 116
Joined: Wed Feb 08, 2012 2:45 pm
Has thanked: 7 times
Been thanked: 11 times
Contact:

Re: CCP2 alternative pin

Post by DirkB »

Hello Martin,

it's the same with 16F1825? I try it an report you. I think
before matrix give up V5 there a lot of bug-fixes and should
documentation these.

In Flowcode V6 midi doesn't works correct. In V5 there is
no problem with midi. In V6 are a lot more midi component-makros
without any documentation. I have a big project with midi. After
importing from v5 to v6 midi doesn't work. This project had a lot
(six month) of work. That's the reason i will work with Flowcode V5
at the moment.

thanks a lot

Dirk

medelec35
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: CCP2 alternative pin

Post by medelec35 »

Hi Dirk,
I believe This bug has been present since the beginning of Flowcode.
But since with the earlier chips people would have not noticed the bug, then it's not been reported.

As far as i'm aware the bug has been fixed in FC6 which is now much better since the last update.

I have both Flowcode 5 and Flowcode 6 professional.
Because of the improvements sic the last V6 update i have switch from using V5 to V6 in all my latest projects.

With Flowcode V6 are now working like a charm.

Did the fix solve the issue?

Martin
Martin

Post Reply