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

Create new device with Device Table Editor
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Thu Mar 20, 2014 6:10 am     Reply with quote

I think I understand your problem with the Register settings tab: in the lower address range some lines are missing. No matter what I tried by changing the 'first SFR address' setting in the MCU tab, the number of address lines in the Register tab remains the same.

A few comments:
- How important are these missing memory lines? I didn't look into them, but according to Ttelmah chances are low you would use these features.
- Chipedit can only configure options already present in the compiler. If a feature is missing from all other chips in your compiler version then Chipedit can't add it.
- Like Ttelmah said, the easiest option would be to find a more enhanced processor than the 18F25K50 and then disable the features not present in your chip. For example the 18F25K22 is one of the few PICs with a DAC and is slightly older so perhaps present in your compiler (I don't have your version to check this).
- CCS has a special compiler version for students on their website. It supports one chip of your choice for $50.
- Hack: What happens when you copy the ChipEdit database file from the new demo version to your old compiler? No guarantees but worth a try if time is less important than money. Like said before, it will not add extra features to your compiler but the 25K50 is present in my v4.141, close to your 4.134 so chances are it only requires configuration data to get your chip working.
temtronic



Joined: 01 Jul 2010
Posts: 9246
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Thu Mar 20, 2014 6:42 am     Reply with quote

hmm..have you looked at the 18F46K22? It does have the DAC, reasonably fast, kind of the 'Swiss Army Knife' of PICs. I've used it for projects for the past couple of years and while 'overkill' for most of them, it's always nice to have a few extra pins and peripherals!
Your compiler may have it already in the 'database'?

cheers
jay
icognito99



Joined: 19 Mar 2014
Posts: 9
Location: switzerland

View user's profile Send private message

PostPosted: Fri Mar 21, 2014 12:51 am     Reply with quote

@ ckielstra

My compiler unfortunately doesn't support the 1825K22 either :( .

@temtronic

The point is, that the new PIC I'm going to be using (18F25[K]50) needs to have the same PIN assignmet as the old one I've been using until now(16F876A). So regrettably, I neither can use that one.
Ttelmah



Joined: 11 Mar 2010
Posts: 19552

View user's profile Send private message

PostPosted: Fri Mar 21, 2014 1:31 am     Reply with quote

Most of the later PIC's, can be programmed to have the same effective pin assignments as the old 16F676 or A.

If you look at the 25K22, it can be programmed to give exactly the same pin behaviour as the 676, but with dozens of extra features also available on the pins.

Now the fact your compiler lacks these later chips illustrates the big problem.
It is relatively easy to 'remove' features from a chip with the chip editor, but it can't _add_ features, that the compiler doesn't support. As chips get later, more and more peripherals have been added. On your 50, you found that there are a number of peripherals in this, that your compiler can't support. It'd still be perfectly possible to add the basic chip (ROM/RAM etc.), to a DIY entry in the device table, but every extra feature, that the compiler doesn't support, will require you to add 'DIY' code to handle it. Again 'doable', but of increasing complexity.

So if a new version of a particular part of the chip 'family' comes along, identical to an existing chip, but with just a few changes to the RAM, ROM, and another peripheral that is already supported in another chip, this can be done with the chip editor. However for the scale of changes you need, this becomes impractical, and even worse, the chip you want to use has parts that were not supported on your current compiler. For these latter features, you would have to write your own drivers...

The K22, is a 'jack of all trades' chip, but actually is closer to being a 'master' than this might be expected to imply. There are few older chips in the same package, that it can't be used to replace. Smile

This is the fundamental problem here. The 'chip editor', is a bit like a manufacturer's configuration program to chose a model of car. You can change the wheels & tyres, or the paint colour, even possibly select between a saloon or an estate. However if a 'hybrid' model is not available in the program, no amount of fiddling will make it appear, except buying a standard model, and then going completely 'DIY', and adding your own power train....

Best Wishes
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Fri Mar 21, 2014 6:22 am     Reply with quote

My final attempt to shine some light on this issue because I received a PM from Incognito:

The closest CCS version I have to v4.131 is v4.137.
In v4.137 the 18F25K50 is in the device list, but .... the header file is missing and the DAC is configured as not present, in the available options the required F7C address option is missing.

Just for testing purposes I copied the Chipedit.exe, devices4.dat and 18F25K50.h files from 4.141 to the 4.137 directory.

But even then the following simple program failed to compile with an internal error:
Code:
#include <18F25K50.h>

void main()
{
   dac_write(0x12);
}


Conclusion: no matter how much fiddling you will do in Chipedit, your v4.131 is not going to support the 18F25K50 because essential code for the new features is missing.
I'm not surprised as this is how the CCS business model works; for new processor support you have to write your own code or buy the new compiler upgrade (hey, these people have to make a living too).

So we are back at the point where this whole thread started. For PIC18F25K50 support you have the following options:
- Buy a compiler upgrade ($50 when you are a student and for 1 processor type only).
- Or copy one of the processors that looks similar to the 25K50 features. Modify it in Chipedit to your needs. For new features like DAC you'll have to write your own functions (not too difficult and we can help you with that).

Just a final note on the Register Tab in the ChipEdit tool: this page is for convenience only, it can generate a header file with all chip addresses for you. It is not used by the compiler itself and whatever changes you make here are not saved.
icognito99



Joined: 19 Mar 2014
Posts: 9
Location: switzerland

View user's profile Send private message

PostPosted: Fri Mar 21, 2014 7:27 am     Reply with quote

It looks like I'm 100% going to have to go with the 18F2550. Thank you guys for all your advices. I definitely learned more about Devices... And I hope no one else is gonna try what I've tried. :P
I've just got the PIC18F2550 and I'll try it out right now Smile
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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