Page 1 of 1

DAC output not appearing on alternate pin RB7

Posted: Fri Feb 23, 2024 10:44 am
by Maverick
Hi

The attached code for PIC16F1789 (written under V9) is setup to direct DACoutput1 to port RB7 instead of RA2.
The code worked last time it was compiled on version 9. V10 simulator shows the correct value but a programmed chip does not. DAC Voltage is set at 3.1V, I measure 1.6V on RB7 (pin40) and 3.2V on RA2 (pin 4) which I am using as an input. I haven't clarified it but RA0 (pin 2) might not be working as an input as well. I have tried several micros including new parts ordered from RS this week.
Please advise solution

Re: DAC output not appearing on alternate pin RB7

Posted: Fri Feb 23, 2024 12:32 pm
by BenR
Many thanks for letting us know.

It seems the DAC alt pin code was a late addition in v9 and had not made it into the code for v10 so it's now been added in for you via a library update.

Re: DAC output not appearing on alternate pin RB7

Posted: Fri Feb 23, 2024 3:17 pm
by Maverick
Thanks Ben, worked fine