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

PIC16F628A and PCW 3.190

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



Joined: 25 May 2004
Posts: 25

View user's profile Send private message

PIC16F628A and PCW 3.190
PostPosted: Wed Feb 23, 2005 12:35 am     Reply with quote

I'm trying to program a PIC16F628A. Looking at the datasheet, the 628A has an internal oscillator and analog ports, however pic16f628a.h doesn't include a setup_oscillator command nor does it have any defines for the analog setup. Is there a new .h file? Do I have to edit the part to make it work?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Feb 23, 2005 8:49 am     Reply with quote

The 16F628A has the basic oscillator selections which are set in the
Config Word. CCS lets you set them in the #fuses statement.
Look at the top of the 16F628A.H file for the allowable settings.
These will be HS, XT, etc. Look in the data sheet, in the section
on "Special Features of the CPU", at the chart for "Register 14-1".
This will show the settings that the .H file refers to.

The setup_oscillator() function is only used with chips that have
a more complex oscillator module. It may allow different clock
speeds or switching between internal and external clocks, etc.
The data sheets for this type of PIC will have an entire section
on the Oscillator. It won't be just part of "Special Features".
Look at the 16F88 for an example.

With regard to the analog section, the 16F628A doesn't have an
A/D converter. It does have analog pins, but they're for use with
the built-in comparator. You should use the setup_comparator()
function to configure it.
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