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

read_adc modes?

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







read_adc modes?
PostPosted: Wed Jun 11, 2003 7:23 am     Reply with quote

Hi, Has anyone used the read_adc(); function with the additional modes [ADC_START_ONLY], [ADC_READ_ONLY] or [ADC_START_AND_READ] ??
I can't compile with these modes being utilised. hmm...?

Any help would be appreciated.
___________________________
This message was ported from CCS's old forum
Original Post ID: 144515157
R.J.Hamlett
Guest







Re: read_adc modes?
PostPosted: Wed Jun 11, 2003 8:01 am     Reply with quote

:=Hi, Has anyone used the read_adc(); function with the additional modes [ADC_START_ONLY], [ADC_READ_ONLY] or [ADC_START_AND_READ] ??
:=I can't compile with these modes being utilised. hmm...?
:=
:=Any help would be appreciated.
What compiler version?.
Have worked OK for me. I have a 'tick' interrupt, where I select the channel on the first 'tick', then on the next loop, trigger a read, without returning the value, with:
read_adc(ADC_START_ONLY);

Then on the third loop, I read the value with:
read_adc(ADC_READ_ONLY);

This way the code in the tick code is kept short. This works with 3.148, and more recently with 3.160.

Best Wishes
___________________________
This message was ported from CCS's old forum
Original Post ID: 144515159
bill
Guest







Re: read_adc modes?
PostPosted: Wed Jun 11, 2003 6:59 pm     Reply with quote

:=:=Hi, Has anyone used the read_adc(); function with the additional modes [ADC_START_ONLY], [ADC_READ_ONLY] or [ADC_START_AND_READ] ??
:=:=I can't compile with these modes being utilised. hmm...?
:=:=
:=:=Any help would be appreciated.
:=What compiler version?.
:=Have worked OK for me. I have a 'tick' interrupt, where I select the channel on the first 'tick', then on the next loop, trigger a read, without returning the value, with:
:=read_adc(ADC_START_ONLY);
:=
:=Then on the third loop, I read the value with:
:=read_adc(ADC_READ_ONLY);
:=
:=This way the code in the tick code is kept short. This works with 3.148, and more recently with 3.160.
:=
:=Best Wishes

Thanks,
After looking at the version history it seems these options only appear after v3.148, I have 3.094.
Solved problem by setting ADCON register bit manually.
___________________________
This message was ported from CCS's old forum
Original Post ID: 144515163
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