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

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

CCP2 alternative pin

Postby DirkB » Fri Feb 06, 2015 9:24 am

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: 1911
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 460 times
Been thanked: 646 times
Contact:

Re: CCP2 alternative pin

Postby LeighM » Fri Feb 06, 2015 4:01 pm

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
These users thanked the author LeighM for the post:
DirkB (Sat Feb 07, 2015 2:09 pm)
Rating: 5.26%
 

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

Re: CCP2 alternative pin

Postby DirkB » Sat Feb 07, 2015 2:29 pm

Hello Leigh,

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

Dirk

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8440
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2412 times
Been thanked: 3450 times
Contact:

Re: CCP2 alternative pin

Postby medelec35 » Sat Feb 07, 2015 10:43 pm

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
These users thanked the author medelec35 for the post:
LeighM (Mon Feb 09, 2015 9:39 am)
Rating: 5.26%
 
Martin

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

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

Re: CCP2 alternative pin

Postby DirkB » Thu Feb 12, 2015 5:04 pm

hello,

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

thanks

Dirk

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8440
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2412 times
Been thanked: 3450 times
Contact:

Re: CCP2 alternative pin

Postby medelec35 » Thu Feb 12, 2015 5:19 pm

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

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

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

Re: CCP2 alternative pin

Postby DirkB » Thu Feb 12, 2015 7:54 pm

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

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8440
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2412 times
Been thanked: 3450 times
Contact:

Re: CCP2 alternative pin

Postby medelec35 » Thu Feb 12, 2015 8:17 pm

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
These users thanked the author medelec35 for the post:
Benj (Tue Feb 17, 2015 10:35 am)
Rating: 5.26%
 
Martin

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