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

Delay between set_adc_channel ( 0 ); and read_adc()

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



Joined: 31 Jan 2009
Posts: 59

View user's profile Send private message

Delay between set_adc_channel ( 0 ); and read_adc()
PostPosted: Tue Jun 21, 2011 2:06 am     Reply with quote

What is the minimum delay between
Code:
set_adc_channel(0)

and
Code:
read_adc()

How is this delay calculated?

I have some app with 18f2550 and 18f8527.
I do believe it is a clock dependent.
For example : 8527 - clock 32Mhz - i have delay 400us .. if i put less than this value, the value is not entirely read,

I use this adc for touch screen and below 400us it doesn't get the right pixel pressed, when put 400 .. the right pixel is then selected/pressed.

Today i tried a simulation in Proteus with 2550 @48mhz, and delay_us 40 and at messages log in Isis i got adc time too small.
temtronic



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

View user's profile Send private message

PostPosted: Tue Jun 21, 2011 6:45 am     Reply with quote

Short answer is 400us in your program....


Long answer is to read the ADC section in the datasheet for the PIC you're using. Evrerything you need to know is clearly spelled out for you including various timings relative to which adc clock you choose.

Your query doesn't have enough info for anyone to properly answer.
However you've setup the adc , it needs 400us...not the fastest it can be though.
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