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 CCS Technical Support

mcp3202 output

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
glk.c.93



Joined: 27 Jun 2012
Posts: 9
Location: India

View user's profile Send private message

mcp3202 output
PostPosted: Tue Jul 10, 2012 4:25 am     Reply with quote

hi...
I am trying to use ADC through MCP3202 and pic16F877A by SPI comm.
I am getting 4095 at around 4 volts
From 4v to 5v i am getting the same value.
Hence i am unable to identify the value of voltage in between 4-5v and display it on a lcd.
I had given the reference voltage as 5v.

what might the problem be? Question
Is there any thing to be done for measuring 4to5v range too?
what does the pin VREF do?
What difference do we see if we vary the value of VREF?
temtronic



Joined: 01 Jul 2010
Posts: 9255
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Tue Jul 10, 2012 5:53 am     Reply with quote

Without seeing your code or schematic it is very,very difficult to tell you exactly where the problem is..
...you should supply us with more information.

hardware...although you say you're getting the correct values from 0 -4 VDC there might be an issue...

software...I don't use that chip but is it 8 bit,10 bit,12 bit ADC ?
What is the ADC result variable declared as?
If >8bit do you correctly read both high and low bytes of data,then 'make' into the proper word.
Perhaps you're not setting up the ADC chip right, slecting 8 bit mode when you want 12 bit mode?
Display of data may be formatted wrong..

Again, without seeing your code it is hard to say what your error is.

hth
jay
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