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

WHY?SELECTING CLOCK BITS FROM ADCON0 & ADCON1

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



Joined: 27 May 2015
Posts: 8

View user's profile Send private message

WHY?SELECTING CLOCK BITS FROM ADCON0 & ADCON1
PostPosted: Mon Jun 08, 2015 3:55 am     Reply with quote

why do we need to select the both clock bits from ADCON0 & ADCON1 in pic16?
What will happen when we select either?
Ttelmah



Joined: 11 Mar 2010
Posts: 19499

View user's profile Send private message

PostPosted: Mon Jun 08, 2015 4:13 am     Reply with quote

1) What chip.
2) Don't. Let CCS handle the selections for you. For 99.9% of things you never need to touch a register in CCS.
3) Normally on the PIC16, the clock selection is entirely done using ADCON1. Loop back to 1.....

Normally ADCON0 controls which channel is selected from the multiplexer, and triggers the actual conversion. ADCON1 sets the clock, voltage reference, and data format. ADCON2 allows the ADC to be started by a 'trigger'.

A few old chips like the 87xA, have the clock selection bits split into 1 in ADCON1 and 2 in ADCON0. The bit in ADCON1 in these actually does nothing. So back to '1'....
madhura027



Joined: 27 May 2015
Posts: 8

View user's profile Send private message

PostPosted: Mon Jun 08, 2015 4:15 am     Reply with quote

yes..am using 16f877a
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