View previous topic :: View next topic |
Author |
Message |
tu
Joined: 23 Aug 2005 Posts: 4
|
PIC18F452 and PIC18F4520 |
Posted: Tue Aug 23, 2005 11:59 am |
|
|
Hi, I`m a student and I`m using here the ccs-university-version limited to the PIC 18F452. Now I figured out that the 18F452 is obsolete and the successor is the PIC 18F4520.
Can I use the ccs also for the successor or are there limitations or reasons why this is not possible ? |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
|
StuartH
Joined: 19 Aug 2005 Posts: 14 Location: W. Midlands, UK
|
|
Posted: Tue Aug 23, 2005 2:04 pm |
|
|
The 452 might be technically obsolete, but if you've got a stock of the things then keep using them in preference to the 4520. At the moment the 4520 (and 2520) is a nightmare.
The thread referenced by PCM Programmer was about I2C master mode on the 4520. I'll say here that slave mode on a 2520 is just as badly messed up - the buffer full bit of SSPSTAT seems to be permanently set under all receive conditions (using the same code that works fine on a 252) - can anyone confirm this? It's not mentioned in the errata.
My advice to anyone wanting to use these chips: wait until the silicon gets sorted out, then they'll be worth using. |
|
|
tu
Joined: 23 Aug 2005 Posts: 4
|
|
Posted: Tue Aug 23, 2005 11:29 pm |
|
|
ok - it seems tht it's better to grab some of the old parts and stick to them for the near future.
anyway : am i right that i can port my program to the 18f4520 with my limited 18f452-student-version-ccs-compiler when i use a header file with direct adressing of the relevant registers and staying away for the most part from nice ccs functions ? |
|
|
StuartH
Joined: 19 Aug 2005 Posts: 14 Location: W. Midlands, UK
|
|
Posted: Wed Aug 24, 2005 4:46 am |
|
|
I suspect that when Microchip get the bugs out of the silicon the 4520 will become a very popular chip - and, as the replacement for the 452, I would expect CCS to provide support for it in a future version of the student compiler. It's already supported in the standard PCH.
As it stands though, there are major differences in the fuses and the watchdog timer, plus the addition of things like comparators, which would make a direct port quite difficult, although if you were sufficiently motivated you could get around most of the problems by editing the HEX file... I wouldn't bother - it's bad enough when the compiler DOES support the chip! |
|
|
|