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

Configuration Settings for MPLAB 5.7

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



Joined: 03 Jun 2014
Posts: 5

View user's profile Send private message

Configuration Settings for MPLAB 5.7
PostPosted: Tue Jun 03, 2014 9:27 am     Reply with quote

Hello.
Sorry for my first post to be a question. And for such an old product too.

I'm trying to update a program that has been written some time ago (by someone else who no longer works here) for a PIC 16C57C.

I've managed to make the changes I wanted to the program, and I've used PIC-C to compile it successfully. I'm now trying to program it using a PicStart Plus programmer and MPLAB 5.7 (I've downloaded newer versions of MPLAB but they don't seem to support the 16C57).

Following the FAQ on importing a HEX file into MPLAB I get to the 'Configuration' part of the instructions which tells me to:

Code:
Open the Configuration Bits dialog by selecting Configure -> Configuration Bits from the toolbar. This will open a new dialog window, at the very top of this window you will see a checkbox labeled 'Configuration bits set in code', make sure this checkbox is SET. Failure to do this will cause invalid configuration bits to be written to the device.


My problem is that MPLAB 5 doesn't seem to have this option. Can anyone suggest whether I can manually set the configuration? If not, should I remove any references to them in my code?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Jun 03, 2014 9:42 am     Reply with quote

Quote:
I've downloaded newer versions of MPLAB but they don't seem to support the 16C57C.

MPLAB vs. 8.92 certainly does. Go to the Configure / Select Device menu
and set the Device Family drop-down box for:
Quote:
Baseline 8-bit MCUs (PIC 10/12/16)

Then go to the Device drop-down box and scroll down to PIC16C57C.
It shows programmer support for the PicStart-Plus.

You can download it here:
http://www.microchip.com/pagehandler/en-us/devtools/dev-tools-parts.html

Direct link:
http://ww1.microchip.com/downloads/en/DeviceDoc/MPLAB_IDE_8_92.zip

And vs. 8.92 does have this tickbox:
Quote:
x Configuration bits set in code


If you do install vs. 8.92, it will likely warn you that your PicStart-Plus
firmware is old, etc. I haven't havd vs. 5.70.40 installed for several
years. I don't recall ever having a problem with it picking up the #fuses
settings.

Quote:
Following the FAQ on importing a HEX file into MPLAB I get to the 'Configuration' part of the instructions which tells me to:

This comment of yours is a little odd. I always compiled the CCS file
within MPLAB. That's the standard way of doing it. You don't have to
import the hex file. After you compile, MPLAB has the machine code
and fuse settings within its memory, and it's ready to program the PIC.
Mark Stevenson



Joined: 03 Jun 2014
Posts: 5

View user's profile Send private message

PostPosted: Tue Jun 03, 2014 10:09 am     Reply with quote

PCM programmer wrote:


Direct link:
http://ww1.microchip.com/downloads/en/DeviceDoc/MPLAB_IDE_8_92.zip

And vs. 8.92 does have this tickbox:
Quote:
x Configuration bits set in code


If you do install vs. 8.92, it will likely warn you that your PicStart-Plus
firmware is old, etc. I haven't havd vs. 5.70.40 installed for several
years. I don't recall ever having a problem with it picking up the #fuses
settings.

This comment of yours is a little odd. I always compiled the CCS file
within MPLAB. That's the standard way of doing it. You don't have to
import the hex file. After you compile, MPLAB has the machine code
and fuse settings within its memory, and it's ready to program the PIC.


Thanks for the link. I'll give V8.92 a try.

Sorry, it is no doubt me. I'm having to pick this up as I go along. I tried to compile the program in MPLAB, but it wouldn't. It compiled under PICC so I didn't try to integrate PICC into MPLAB, I have compiled it in PICC and then am trying program it, by any means possible. I read the FAQs and the instructions told me how to do it, but with the confusion over the missing options check box.

Still, I am at last progressing. Thanks for your help.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Jun 03, 2014 1:10 pm     Reply with quote

See the following page for instructions on how to integrate CCS with MPLAB:

How do I get CCS to work inside MPLABĀ® IDE?
http://www.ccsinfo.com/faq.php?page=ccs_mplab
Mark Stevenson



Joined: 03 Jun 2014
Posts: 5

View user's profile Send private message

PostPosted: Wed Jun 04, 2014 2:02 pm     Reply with quote

PCM programmer wrote:
See the following page for instructions on how to integrate CCS with MPLAB:

How do I get CCS to work inside MPLABĀ® IDE?
http://www.ccsinfo.com/faq.php?page=ccs_mplab


Thanks, once I manage to get my PicStart working (properly) I'm going to give this a try. At the moment I've only found one computer that will connect to the PicStart, and that is giving me headaches as it is!

Thanks again.
RF_Developer



Joined: 07 Feb 2011
Posts: 839

View user's profile Send private message

PostPosted: Thu Jun 05, 2014 3:40 am     Reply with quote

Its easy to integrate current and recent versions of CCS C into recent versions of MPLAB, but I am not so sure about "legacy" version of CCS C into new MPLABs. There is now a utility supplied by CCS that sorts out the integration, but I don't know when that came into use, and which CCS versions are compatible with which MPLAB versions.

Mark, you 3.112 is an old CCS version. CCS is now on 5.02something. There may be problems with getting the two to work.

I don't like compiling CCS code in MPLAB. Others like to, but I'm not keen. I prefer the CCS IDE. However the company I work for historically used MPLAB as a production programming tool, partnered with ICD 2 and later ICD 3 programming hardware. So I had to use the hex file import facility in MPLAB. I've never had any problem with it, but I'm using more recent CCS (4.109 onwards) and MPLABs (all version 8.something). There is only one problem, and that's that MPLAB doesn't recognise the PIC type that's coded into CCS hex files, so I have to set the device type manually.

I strongly suspect early MPLABs required more effort, or different means, to get the configuration bytes, the "fuses", set up correctly. For a long time however, this has been done in the hex file and no operator intervention is required. I understand that with CCS C the config "fuses" have always been set in the source code, but it may well be that older MPLABs didn't/couldn't use this data. What I am saying here is that with code and tools that old, there may be gotchas in the tools/IDEs that you need to be aware of.

We've gone over to CCS Load-N-Go programmers in the last year of so. These have proved much more suited to production use - far simpler and more controllable from a quality point of view. And the ops staff like using them. They are easy, don't need a PC or long wires, and can even be sent out to our service centres when field upgrades are required. With these we have the opposite problem: to get Microchip compiler compiled code to work, we have to patch the device type into the hex file.
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