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

Detect when A/D occurs.

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



Joined: 25 Aug 2005
Posts: 65
Location: Huntington Beach, CA

View user's profile Send private message

Detect when A/D occurs.
PostPosted: Thu Mar 09, 2006 1:22 am     Reply with quote

Is there a way to monitor when exactly an A/D conversion starts or ends?
Ttelmah
Guest







PostPosted: Thu Mar 09, 2006 3:28 am     Reply with quote

An A/D conversion, starts when you tell it to start. It finishes when the ADIF interrupt bit gets set. The default code (read_adc()), starts the conversion when you call it, and does not return till this flag gets set.
If you want to do other things during the conversion, define ADIF yourself, with the #bit statement, and then use 'read_adc(ADC_START_ONLY)', which will start the conversion, and not wait for the completion, then just monitor 'ADIF', and when it goes true, the conversion has finished (remember to clear it yourself, before using it again).

Best Wishes
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