Fixed Voltage Reference in pic16f1825

Discussion on projects that are created by users and posted on mikroElektronika website.
Post Reply
Author
Message
y0g1
Posts: 5
Joined: 03 Oct 2016 09:43

Fixed Voltage Reference in pic16f1825

#1 Post by y0g1 » 03 Oct 2016 12:36

hi
i am using pic16f1825 and wants to generate vref 4.096V as output on pin 13. The settings of registers by me are:
OSCCON = 0x7a;
ANSELA = 0x11;
FVRCON = 0x8c ;
delay_ms(1);
FVRCON.FVRRDY = 1;
DACCON0 = 0X68;
DACCON1 = 0B11111;
i got output something 1.37V. can anybody tell me why does i got the 1/3rd output of the actual voltage?
How does i set up the controller to get the vref as 4.096V.
Please help me out. :wink: :?:

User avatar
lana.arsic
mikroElektronika team
Posts: 1715
Joined: 15 Jan 2016 12:50

Re: Fixed Voltage Reference in pic16f1825

#2 Post by lana.arsic » 04 Oct 2016 17:08

Hi y0g1,

Welcome to the MikroE forum.

As regards registers, you can take a look in datasheet of used MCU,
also you may find this example useful:

http://forum.mikroe.com/viewtopic.php?f ... 32#p205585

Best regards,
Lana

y0g1
Posts: 5
Joined: 03 Oct 2016 09:43

Re: Fixed Voltage Reference in pic16f1825

#3 Post by y0g1 » 05 Oct 2016 08:09

I have resolved the error thanks for the reply. The actual reason is that the PIN(13) named DACOUT is the same pin as used as CSPDAT with PICKIT 3. So it is connected with a circuit of PICKIT 3 due to which the porblem is exits. When i remove PICKIT 3 connection after programming the controller the problem is resolved. Thanks for the help.

Post Reply

Return to “User Projects”