View previous topic :: View next topic |
Author |
Message |
arunb
Joined: 08 Sep 2003 Posts: 492 Location: India
|
How to increase Vref to 4.5 Volts in 16F628 |
Posted: Fri Dec 03, 2004 11:19 am |
|
|
Hi,
Compiler: PCM
MCU : PIC 16F628
ADC : MCP 3208
I am using the RA2 pin in the PIC 16F628 mcu to generate a Vref voltage for a MCP 3208 ADC.
I tried to increase the voltage level to about 4.5 Volts , but I find that the maximum I could get
was 2 Volts
The settings I used are as follows
setup_comparator(NC_NC_NC_NC);
setup_vref(VREF_HIGH | 0x12 |VREF_A2);
I tried this also
setup_vref(VREF_HIGH | 0x12 |VREF_A2);
I would like to know whether the above technique is OK and also how I can increase the voltage level to 4.5 V
Thanks
arun |
|
|
drh
Joined: 12 Jul 2004 Posts: 192 Location: Hemet, California USA
|
|
Posted: Fri Dec 03, 2004 12:39 pm |
|
|
You probably need to buffer the Vref output. It has limited drive capability. So says the data sheet. _________________ David |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Fri Dec 03, 2004 1:00 pm |
|
|
Quote: | I am using the RA2 pin in the PIC 16F628 mcu to generate a Vref
voltage for a MCP 3208 ADC. |
What's your version of the compiler ? |
|
|
Humberto
Joined: 08 Sep 2003 Posts: 1215 Location: Buenos Aires, La Reina del Plata
|
|
Posted: Fri Dec 03, 2004 4:30 pm |
|
|
Hi arunb,
If you are using the MCP3208 12 bit ADC, what you need is 4.096V
as reference voltage, to get a round step of 1mV in LSB. Not 4.5V
best wishes,
Humberto |
|
|
arunb
Joined: 08 Sep 2003 Posts: 492 Location: India
|
RE: |
Posted: Sun Dec 05, 2004 11:05 am |
|
|
Hi,
Thanks for the help. I realised that a buffer would be needed. I anyway connected an external Vref source to the ADC.
By the way what Vref value is suitable???
thanks
arun |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
Re: RE: |
Posted: Sun Dec 05, 2004 11:30 am |
|
|
arunb wrote: | Hi,
Thanks for the help. I realised that a buffer would be needed. I anyway connected an external Vref source to the ADC.
By the way what Vref value is suitable???
thanks
arun |
I guess that depends on what voltage range you are measuring! |
|
|
Humberto
Joined: 08 Sep 2003 Posts: 1215 Location: Buenos Aires, La Reina del Plata
|
|
Posted: Sun Dec 05, 2004 4:00 pm |
|
|
Quote: |
Thanks for the help. I realised that a buffer would be needed. I anyway connected an external Vref source to the ADC.
By the way what Vref value is suitable???
|
To get full 12Bit advantage of the MCP3208 -wich give you 1mV LSB- you can use the MCP1541 (4.096Volts Vref)
and you don�t need any buffer at all.
If you want to "play" with this ADC, you can use any allowed Vref.
Humberto |
|
|
arunb
Joined: 08 Sep 2003 Posts: 492 Location: India
|
RE: |
Posted: Mon Dec 06, 2004 10:13 am |
|
|
Hi,
Thank you Humberto. I will definitely check it out..
cheers
arun |
|
|
|