Become a subscriber (Free)

Join 29,000 other subscribers to receive subscriber sale discounts and other free resources.
:
:
Don't worry -- your e-mail address is totally secure. I promise to use it only to send you MicroZine.

PIC register DAC controls

"

PIC register DAC controls

To find out if you can use the PIC's internal voltage reference DAC just check the data sheet for your device and look for the CVRCON control register.  There should be a control bit labeled CVROE which is the bit that controls whether the  voltage is sent to the output pin (usually on RA2).

Here's part of the 16F88 datasheet:

CVRCON voltage reference output control - 16F88

Here bit 6 controls output of the voltage reference to a pin (For the 16F88 this is the "RA2/AN2/CVREF/VREF-" pin i.e. pin 1).

Note If you can only find a control register labeled VRCON then youcan't output the DAC voltage.

Voltage Reference block diagram

The block diagram of the generator is the internal hardware representation of the system - you can identify each control bit with each functional block so it's not difficult to understand.

16F88 voltage reference block diagram

Voltage reference block diagram 16F88

There is a 16 stage resistor network with each arm selected using an analogue mux (CVR[3..0]- this sends an analogue voltage to the comparator reference input (see the "Comparator Module" in the datasheet for using the reference voltage in the comparator).

To turn on the voltage reference CVREN enables the Fet at the top of the resistor chain.  CVRR changes the total current through the resistor chain so the range of output voltage is controllable (to some extent).

To send the analogue voltage outside the chip CVROE enables an analogue switch sending the voltage to the 'RA2/AN2/CVREF/VREF' pin.


Configuring the PIC pin for voltage output

 

Continue >>>>


New! Comments

Have your say about what you just read! Leave me a comment in the box below.





Privacy Policy | Contact | About Me

Site Map | Terms of Use



Visit our Facebook Page:

   Click Here



Recent Articles

  1. Easily make an IR Pulse Rate Sensor with one opamp, an Arduino, and a matched Infrared phototransistor and LED pair.

    How to make a Pulse Rate Sensor using a simple single opamp circuit with an Arduino and a few other components.

    Read more

  2. 74HC595

    74HC595 : How to add nearly unlimited outputs to any microcontoller.

    Read more

  3. Using the MAX6675 or How to easily measure Extreme temperatures

    How to use the MAX6675 and an Arduino to measure temperatures from 0°C to 1024°C with two components: A chip - the MAX6675, and a Sensor: - a type-K thermocouple.

    Read more



Readers Comments

"I wanted to thank
you so so so much
for all the information
you have provided in
your site it's

SUPERB and FANTASTIC."

- Ranish Pottath

"This site really is
the best and my favorite.
I find here many useful
projects and tips."

- Milan

bursach<at>gmail.com<

"Awesome site,
very, very easy and nice
to navigate!"


- Matt
matt_tr<at>
wolf359.cjb.net


Learn Microcontrollers

"Interested in
Microcontrollers?"

Sign up for The
Free 7 day guide:

FREE GUIDE : CLICK HERE


"I am a newbie to PIC
and I wanted to say
 how great your
site has been for me."


- Dave

de_scott<at>bellsouth.net

"Your site is a great
and perfect work.
congratulations."


- Suresh

integratredinfosys<at>
yahoo.com

"I couldn't find the correct
words to define
yourweb site.

Very useful, uncovered,
honest and clear.

Thanks so much for
your time and works.
Regards."


- Anon