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

12F683 compiler

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



Joined: 10 Oct 2004
Posts: 21
Location: UK

View user's profile Send private message Yahoo Messenger MSN Messenger

12F683 compiler
PostPosted: Mon Feb 07, 2005 2:49 pm     Reply with quote

Hi i an running version 3.127 of the ccs compiler and was wondering if there is any way i can compile for a 12F683 by creating a headder file for the chip and/or creating the device in the chip editor or am i going to have to buy a new copy of the compiler which would be ideal but there must be another way

Regards

Michael Dale
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Feb 07, 2005 6:23 pm     Reply with quote

I don't have PCWH and no one else has responded yet, so I'll
try to answer this anyway.

I looked at the data sheets for 12F675 and 12F683. The 12F683 has
double the memory that the 12F675 has (ROM, RAM and EEPROM).

Maybe, you could use the 12F675 data as a base and modify it to use
the larger memory size. The RAM map for the 12F683 has 16 bytes
of common RAM at the top of each bank. Does the device editor have
a way to indicate that ?

You will also have to modify the Config Word, since it's different.

The 12F683 has new peripherals that the 12F675 doesn't have, such
as the CCP. If the CCP is in any way non-standard, the built-in CCS
functions won't work for it. You'd have to write your own. In fact,
when CCS comes out with a new chip, it's very common for the built-in
functions to not work. CCS can only put so much in the Device Editor.
There's still a lot of custom code for each chip in the PCM.DLL file.
I haven't looked at all the functions for the 12F683 to see if they work.
Conceivably, you could buy the latest version of the compiler and some
of them might not work yet.
mjdale2003



Joined: 10 Oct 2004
Posts: 21
Location: UK

View user's profile Send private message Yahoo Messenger MSN Messenger

osc freq
PostPosted: Wed Feb 09, 2005 8:39 am     Reply with quote

thanks but how can i setup the clock to work at 8mhz without using the setup_osc function
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Feb 09, 2005 3:09 pm     Reply with quote

The easiest way is to write directly to the OSCCON register.
You need to study the data sheet and decide on the proper
settings for the OSCCON register bits. The set it to that value.

Example:

// Define the address of the OSCCON register in the 12F683.
// This address comes from the SFR table in the data sheet.
#byte OSCCON = 0x8F

main()
{
OSCCON = 0x71; // Setup for 8 MHz with internal oscillator

// Put your other setup code here, such as comparators, analog
// or digital i/o configuration for the pins, etc.

// Put your main program here, after the setup code.

while(1);
}
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