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 1, 2  Next
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
icognito99



Joined: 19 Mar 2014
Posts: 9
Location: switzerland

View user's profile Send private message

Create new device with Device Table Editor
PostPosted: Wed Mar 19, 2014 2:58 am     Reply with quote

I'm trying to set up a new device (18F25K50) on CCS (v.4.134) with the Device Table Editor (v.3.3.0.0). Due to not wanting to buy the newest package of CCS only because I need ONE new component.

I downloaded the Demo Version of the newest CCS on a laptop so I could open the Device Editor on there to copy PIC18F25K50 line by line to the Device Editor on my computer.

To start with, I copied an already existing device (18F2550) and saved it under the device name 18F25K50.
I managed to change most of the configurations in the tabs "MCU Parts" and "ICD Interfaces".

Where my problem starts is, where the Registers are configured. It appears that the PIC18F25K50 has more Memory capacity than the PIC 18F2550, what accures to some addresses missing.

Could anyone tell me if there is a chance I could edit a device by zero, without copying one first or if there's a way to add/edit the addresses in the tab "Registers"?
Ttelmah



Joined: 11 Mar 2010
Posts: 19552

View user's profile Send private message

PostPosted: Wed Mar 19, 2014 4:55 am     Reply with quote

Doing a device from scratch would be terrifying. Too many things to get wrong.
The registers don't change with the memory amount. What changes is the memory amount!. In device editor, middle of the 'device' window, column with 'identification' at the top. 1/3rd the way down, tab 'memory'. Click on the box, and it expands, allowing you to change the ROM size, RAM size etc..

Best Wishes
icognito99



Joined: 19 Mar 2014
Posts: 9
Location: switzerland

View user's profile Send private message

PostPosted: Wed Mar 19, 2014 5:09 am     Reply with quote

First of all, thank you for your answer. Smile

I've already changed everything there is to change in that column. My problem is, that I can't figure out how to edit the addresses/register.

For example: PIC18F25K50s address goes down to F57 and PIC18F2550s only goes down to F66, so there's some missing there.
Ttelmah



Joined: 11 Mar 2010
Posts: 19552

View user's profile Send private message

PostPosted: Wed Mar 19, 2014 5:35 am     Reply with quote

That's all specified in the same place. About ten entries down in the memory tab, you have an entry for where the first SFR resides. However you also have to turn 'on' the extra peripherals involved. Most of the extra stuff in the low addresses only applies to the 45K50, not the 25. About the only peripheral in the lower addresses on your chip is the SR latch, and unless you are using this, you can ignore it.
icognito99



Joined: 19 Mar 2014
Posts: 9
Location: switzerland

View user's profile Send private message

PostPosted: Wed Mar 19, 2014 7:42 am     Reply with quote

It seems like you're really good at this. Can I ask, what would you do if you'd have to change from a PIC18F2550 to a 18F25K50 if it wasn't included in your temporary package?
newguy



Joined: 24 Jun 2004
Posts: 1909

View user's profile Send private message

PostPosted: Wed Mar 19, 2014 8:05 am     Reply with quote

Buy the full compiler. Comparatively speaking, it's very cheap.
icognito99



Joined: 19 Mar 2014
Posts: 9
Location: switzerland

View user's profile Send private message

PostPosted: Wed Mar 19, 2014 8:26 am     Reply with quote

That's relative, I'm a student.
Ttelmah



Joined: 11 Mar 2010
Posts: 19552

View user's profile Send private message

PostPosted: Wed Mar 19, 2014 8:28 am     Reply with quote

Yes, exactly.

I have done this in the past, when working on a couple of 'engineering prototype' chips, which hadn't even been released, but in general, it is a lot less work to let CCS handle it for you. I'd suspect the time to do this, would for any reasonably paid designer, be worth a lot more than the cost of the compiler....
icognito99



Joined: 19 Mar 2014
Posts: 9
Location: switzerland

View user's profile Send private message

PostPosted: Wed Mar 19, 2014 8:50 am     Reply with quote

I've expected posts about how it would be best to just upgrade and buy a up to date compiler. Unfortunately I really don't have the money for that.

Since you're so experienced in doing things like this, could you please let me know how to start working on a new device by scratch? ;)
newguy



Joined: 24 Jun 2004
Posts: 1909

View user's profile Send private message

PostPosted: Wed Mar 19, 2014 8:56 am     Reply with quote

PCH alone is $200. MPLAB is free. Last time I checked, $200 is roughly equal to one textbook.

You can try to manually create a new chip entry for your version of the compiler (which sounds like the student version), but we've been "gently" trying to discourage you from doing so because a) we know how much work is involved, and b) we collectively doubt that you'd be able to pull it off given your level of experience with the compiler and the release you're working with.
Ttelmah



Joined: 11 Mar 2010
Posts: 19552

View user's profile Send private message

PostPosted: Wed Mar 19, 2014 8:59 am     Reply with quote

Since all PIC's are derivatives, I wouldn't.
Instead find a chip that has _more_ features than the one you want, and turn it 'down' to the required specification. On things like the SFR's, "don't bother". Just write the handler yourself to set these registers as required. You can talk to any address with #byte, even if the compiler does not know a SFR is there.
The reason we say 'update', is that unless your time is free, this is cheaper....
temtronic



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

View user's profile Send private message

PostPosted: Wed Mar 19, 2014 9:40 am     Reply with quote

I'm with Mr. T on this. Have to ask What is 'special' about the 18F25K50 that you MUST have?
In the beginning there was one PIC...all the rest are variations on a theme.
If this is a required project for school (you said you were a student) , then the school or prof should upgrade the compiler for you, that only seems fair.
If there's a 'peripheral you specifically need, there probably are 2,3,30+ other PICs that have it or 'outsource' that 'feature' to an external device(I2C,SPI,etc) to do whatever needs to be done.

hth
jay
icognito99



Joined: 19 Mar 2014
Posts: 9
Location: switzerland

View user's profile Send private message

PostPosted: Thu Mar 20, 2014 1:00 am     Reply with quote

First of all, I want to thank everyone for their help.

The 18F25K50 would have been the preferred PIC we'd have liked to use for different kind of experiments. That is because it is faster than the 18F2550 and has a DA converter module. Since there's no possibility to start a device from zero and create the 18F25K50 by hand, we'll just go with the 2550.

I'd still be glad over further ideas how I'd be able to create the 18F25K50 by scratch.

Thank you in advance
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Mar 20, 2014 2:05 am     Reply with quote

You could download the CCS vs. 5 demo, install in a different directory,
and bring up the Device Table editor and look at the 18F25K50. I did this
and I can see why the others say to forget it. There are a very large
number of parameters to set, especially if you include all the register
settings.

But anyway, maybe you can put the demo on a different computer and
put the monitors side by side and compare the 18F2550 to the 18F25K50.
On your original PC, copy the 18F2550 to a new entry, rename it to
18F25K50. Then consult the demo's data and edit your new chip.
icognito99



Joined: 19 Mar 2014
Posts: 9
Location: switzerland

View user's profile Send private message

PostPosted: Thu Mar 20, 2014 4:32 am     Reply with quote

That's exactly what I did.

I've copied everything already, the only thing that is missing
is the information about the addresses.
How do you edit the addresses in the register settings? (amount)
Changing any parameters in the line "Memory" on tab "MCU Parts" doesn't change anything.
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 1, 2  Next
Page 1 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