|
|
View previous topic :: View next topic |
Author |
Message |
Bill Guest
|
read_adc modes? |
Posted: Wed Jun 11, 2003 7:23 am |
|
|
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? |
Posted: Wed Jun 11, 2003 8:01 am |
|
|
:=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? |
Posted: Wed Jun 11, 2003 6:59 pm |
|
|
:=:=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 |
|
|
|
|
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
|