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

read_adc();help

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



Joined: 09 Sep 2010
Posts: 1

View user's profile Send private message

read_adc();help
PostPosted: Thu Sep 09, 2010 8:16 am     Reply with quote

Hello everybody,
I'm trying to program a pic16f877 and I need to use the adc on AN0(RA0) but when I try reading the adc using read_adc(); function, the program blocks there. It seems to be in a never ending loop.
Scoppio



Joined: 08 Sep 2010
Posts: 1

View user's profile Send private message

PostPosted: Thu Sep 09, 2010 8:34 am     Reply with quote

Post that part of the code and the settings of PORTA and ADC
Wayne_



Joined: 10 Oct 2007
Posts: 681

View user's profile Send private message

PostPosted: Thu Sep 09, 2010 8:51 am     Reply with quote

Scoppio wrote:
Post that part of the code and the settings of PORTA and ADC


And the fuses and CCS version info.

Make sure we can compile what you post and it exhibits the fault you have stated.
Ttelmah



Joined: 11 Mar 2010
Posts: 19499

View user's profile Send private message

PostPosted: Thu Sep 09, 2010 8:56 am     Reply with quote

Yes.
The only time I have seen somebody manage to hang read_adc, was where it was being used without a setup_adc line, so no clock was selected....

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