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

ADC parameter in #DEVICE directive

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



Joined: 19 Nov 2003
Posts: 22

View user's profile Send private message

ADC parameter in #DEVICE directive
PostPosted: Thu Jan 15, 2004 3:19 am     Reply with quote

I'm programming the PIC 18F452

1) If I don't specify (with ADC= X in the #DEVICE directive) the number of bits I want read_adc() return, how many bits are returned by default?

2) With the PIC 18F452, is the following instruction essential?

#DEVICE *=16 ADC=10

Thanks,

Imanol
Ttelmah
Guest







Re: ADC parameter in #DEVICE directive
PostPosted: Thu Jan 15, 2004 8:01 am     Reply with quote

ibg wrote:
I'm programming the PIC 18F452

1) If I don't specify (with ADC= X in the #DEVICE directive) the number of bits I want read_adc() return, how many bits are returned by default?

2) With the PIC 18F452, is the following instruction essential?

#DEVICE *=16 ADC=10

Thanks,

Imanol

The 'ADC=10', is necessary of you want a 10bit return. The default is normally 8bits. The *=16, is not necessary on the 18 family chips, they permanantly will address RAM using 16bit pointers, but it costs nothing to add it...

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