16F72X fcd files require correcting

Moderator: Benj

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

16F72X fcd files require correcting

Postby medelec35 » Sun Jun 20, 2010 8:18 pm

I was using a target chip of 16F737 ,and that is working great. Then I wanted to change target to a pin equivalent 16F722 which required modifying (thanks Benj for that). but unfortunately that chip has not got enough memory capacity. Ben You said a pin was disconnected, I now know why that is the case.
the 16F72x has not got the correct number of ADC channels. Channel ANA10 and ANA12 are missing. Since 16F737 has correctly got those channels in fcd, when changing target to 16F722/3 then pin automatically gets disconnected since wrongly ANA12 did not exist.
I have edited and attaced a 16F723 to include all ADC channels and IOC (since that part is also missing). I am now using that chip, and have found the analogue part (ANA0 and ANA1) on my simulator is not working. Would someone mind having a look at this file and correcting any problems that could be left outstanding.
Thank you, it would be appreciated . :-)
P.s
Not checked all the 16F72x series, so I can only say 16F722 and 16F723 are not correct.
Attachments
16F723.fcd
(10.62 KiB) Downloaded 120 times
Martin

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

User avatar
Benj
Matrix Staff
Posts: 14130
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4325 times
Been thanked: 4070 times
Contact:

Re: 16F72X fcd files require correcting

Postby Benj » Mon Jun 21, 2010 3:30 pm

Hi Medelec,

I will look into the problem and get back to you.

Many thanks.

User avatar
Benj
Matrix Staff
Posts: 14130
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4325 times
Been thanked: 4070 times
Contact:

Re: 16F72X fcd files require correcting

Postby Benj » Mon Jun 21, 2010 3:57 pm

Hi Medelec.

I have updated the ADC's so they should work on the smaller 16F72x devices. I havwe also added the extra PORTB interrupt to the FCD files as standard.

Let me know if ADC channels 0 and 1 are still misbehaiving and I will look into this further.
Attachments
FCDUpdate.zip
(19.1 KiB) Downloaded 113 times

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

Re: 16F72X fcd files require correcting

Postby medelec35 » Mon Jun 21, 2010 7:26 pm

Hello Ben.
Thank you for the files you posted, appreciated as always.
Unfortunately after some more testing, none of the analog channels are working. That is still the case with the latest definition file you posted.
I have included a test Flowcode, and the generated c file. I would be really grateful for any assistance in solving this.
Thanks again.
Attachments
ADC test using LCD 723.c
(32.24 KiB) Downloaded 94 times
ADC test using LCD 723.fcf
(14 KiB) Downloaded 106 times
Martin

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

User avatar
Benj
Matrix Staff
Posts: 14130
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4325 times
Been thanked: 4070 times
Contact:

Re: 16F72X fcd files require correcting

Postby Benj » Tue Jun 22, 2010 11:05 am

Hi Medelec,

Right I have found the problem. The ADC18 component C file was looking at a static define for the ADC value register address rather then the actual value itself.

Here is the fixed component.
Attachments
PIC_ADC_18.c
(9.78 KiB) Downloaded 139 times

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

Re: 16F72X fcd files require correcting

Postby medelec35 » Tue Jun 22, 2010 11:51 am

That's Great! Thank you Ben, your a star! ADC channels are confirmed to be working now. 8)
Martin

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