CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

How to increase Vref to 4.5 Volts in 16F628

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
arunb



Joined: 08 Sep 2003
Posts: 492
Location: India

View user's profile Send private message Send e-mail

How to increase Vref to 4.5 Volts in 16F628
PostPosted: Fri Dec 03, 2004 11:19 am     Reply with quote

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

View user's profile Send private message

PostPosted: Fri Dec 03, 2004 12:39 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Fri Dec 03, 2004 1:00 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Fri Dec 03, 2004 4:30 pm     Reply with quote

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

View user's profile Send private message Send e-mail

RE:
PostPosted: Sun Dec 05, 2004 11:05 am     Reply with quote

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

View user's profile Send private message Send e-mail

Re: RE:
PostPosted: Sun Dec 05, 2004 11:30 am     Reply with quote

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

View user's profile Send private message

PostPosted: Sun Dec 05, 2004 4:00 pm     Reply with quote

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

View user's profile Send private message Send e-mail

RE:
PostPosted: Mon Dec 06, 2004 10:13 am     Reply with quote

Hi,

Thank you Humberto. I will definitely check it out..

cheers
arun
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group