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

How to configure RG6 for ADC input?

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



Joined: 13 Apr 2011
Posts: 417

View user's profile Send private message

How to configure RG6 for ADC input?
PostPosted: Wed Sep 25, 2019 12:58 pm     Reply with quote

On file 24FJ1024GB606.h there's no RG6 pin in the ADC sector but in the datasheet says that is an analog pin, so how I must to do to configure RG6 and RB15 as analog channels?

Also I can't find in the datasheet a table with channel vs. port pin.
_________________
Electric Blue
Ttelmah



Joined: 11 Mar 2010
Posts: 19549

View user's profile Send private message

PostPosted: Wed Sep 25, 2019 1:40 pm     Reply with quote

You don't. It is not an ADC analog input on the 24FJ1024GB606.

If you check the pin function tables, for this chip it gives:

C1IND/RP21/ICM1/OCM1A/PMA5/RG6

So the pin gives the RG6 I/O function, PMA5, The comparator 1 input D,
the MCCP1 input capture 1, and the MCCP1 output A. No ADC input.
The only analog function is the comparator input.

On the 610 versions of the chip, it does give AN17. Not on the 606
though.

For your chip it is table3.

On the 610, instead you see:

AN17/C1IND/RP21/ICM1/OCM1A/PMA5/RG6
E_Blue



Joined: 13 Apr 2011
Posts: 417

View user's profile Send private message

PostPosted: Thu Sep 26, 2019 12:36 pm     Reply with quote

You are right, I think, but it's a bit tricky, on page 153 of PDF file 30010074e.pdf ANSE have a note.

"ANSE9 is not available on 64-pin devices."

There's no note for ANSG register, that's why I assumed that can be an analog pin.
_________________
Electric Blue
Ttelmah



Joined: 11 Mar 2010
Posts: 19549

View user's profile Send private message

PostPosted: Thu Sep 26, 2019 1:00 pm     Reply with quote

Yes. The reason there is no note, is the pin does still have an analog
function as the comparator input. RE9 doesn't even exist on the smaller
chips hence the bit is missing for this.
E_Blue



Joined: 13 Apr 2011
Posts: 417

View user's profile Send private message

PostPosted: Thu Sep 26, 2019 1:05 pm     Reply with quote

As RUN DMC song says, It's tricky Rolling Eyes
_________________
Electric Blue
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