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

Reading values greater than resolution from analog channel

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



Joined: 07 Jan 2009
Posts: 1

View user's profile Send private message

Reading values greater than resolution from analog channel
PostPosted: Wed Jan 07, 2009 3:41 am     Reply with quote

I'am using 16F886. In my program, I'm trying to check 3 different analog channels continuesly. I'm also using timer1 interrupt with two different starting point successivly. First interrupt cycle ranges from 0,4 ms to 9,6 ms and successive interrupt cycle from 9,6 to 0,4 ms as you see I'm trying to generate a PWM signal with different duty in 50HZ to generate a voltage at different levels.

I'm trying to check voltage level from one of my analog channel. In low level voltage values (150V-200v)there is no problem with adc but when voltage level is getting bigger(>200v -300v) I'cant read correct values from adc. Returning values are greater than 1023 (16F886 has 10 bit resolution adc) in high voltage levels.

If you have any suggestion I'll be glad.
Foppie



Joined: 16 Sep 2005
Posts: 138
Location: The Netherlands

View user's profile Send private message Send e-mail Visit poster's website MSN Messenger

PostPosted: Wed Jan 07, 2009 4:20 am     Reply with quote

I would say: look at your voltage divider.
What sort of hardware do you use to get these high voltages to the low voltages the PIC accepts?

If this PIC however supports high voltages (I'm unaware, but haven't worked with that PIC before) then have a look at the datasheet.

Jos
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