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 support@ccsinfo.com

Analogs on 18F67J60

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



Joined: 18 Nov 2013
Posts: 160

View user's profile Send private message

Analogs on 18F67J60
PostPosted: Tue Feb 18, 2014 11:18 am     Reply with quote

I was hoping to use Ethernet and a couple of analog inputs on the 18F67J60.

Going through the data sheet and CCS libs, it appears that the analog inputs cannot be selectively enabled. I can't use pins AN4, AN6, and AN7
as analog inputs and pins AN0 and AN1 as digital I/O. It seems that if I want to use AN4, AN6, and AN7 as analog, I also have to set all AN0-3 as analog.

Am I understanding that correctly?
Ttelmah



Joined: 11 Mar 2010
Posts: 19383

View user's profile Send private message

PostPosted: Tue Feb 18, 2014 12:47 pm     Reply with quote

A lot of the slightly 'older' PIC's are like this. Instead of having individual analog enables for each pin, they have a number (normally perhaps 16) of specific patterns of pins that can be selected. The key becomes realising this when you lay out the board, and routing the analog signals to the lines that can be enabled together.
As a comment though in many cases there are newer replacement chips that do have individual enables, and are pin compatible or can be setup to be pin compatible (many of the newer chips have relocatable peripherals).
I can't think of a PIC18 offering Ethernet with this, but it'd be worth a search.

Note that on your chip AN0 and AN1, can still function as LED outputs for the Ethernet, when set as analog. If you look at table 11-13, you will see that these two signals take priority over the analog. Generally pins can still act as digital _outputs_ when selected for AD use, but not as digital inputs. So it depends what you want to do with the chip.

Best Wishes
SeeCwriter



Joined: 18 Nov 2013
Posts: 160

View user's profile Send private message

PostPosted: Tue Feb 18, 2014 1:06 pm     Reply with quote

That was very helpful information. I did not read the data sheet close enough.

Thank you.
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