16F72X fcd files require correcting

Moderator: Benj

Post Reply
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:

16F72X fcd files require correcting

Post by medelec35 »

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.25 KiB) Downloaded 314 times
Martin

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: 16F72X fcd files require correcting

Post by Benj »

Hi Medelec,

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

Many thanks.

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: 16F72X fcd files require correcting

Post by Benj »

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 313 times

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: 16F72X fcd files require correcting

Post by medelec35 »

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
(30.84 KiB) Downloaded 278 times
ADC test using LCD 723.fcf
(14 KiB) Downloaded 305 times
Martin

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: 16F72X fcd files require correcting

Post by Benj »

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.39 KiB) Downloaded 309 times

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: 16F72X fcd files require correcting

Post by medelec35 »

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

Post Reply