View previous topic :: View next topic |
Author |
Message |
MotoDan
Joined: 30 Dec 2011 Posts: 55
|
PIC18F2550 Compatibility |
Posted: Tue Oct 31, 2017 12:35 pm |
|
|
I have a legacy product that uses the '2550 and would like to migrate it to the newer '25K50. I only have the hex file and am wondering if there's anything that can be done to program the '25K50 part with the older file? |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9244 Location: Greensville,Ontario
|
|
Posted: Tue Oct 31, 2017 12:47 pm |
|
|
The obvious answer is to just burn and test. Be sure to test EVERY function !!
Having just the hex file, it doesn't make sense to change the PIC..
though depending on how good an assmbelr guy you are, the program can be changed.
It's best to download both datasheets and compare pinouts AND all registers/bits. Also look at the clock structure for any minor changes...
You won't hve any compiler issues...just need a burner program.
Jay |
|
|
MotoDan
Joined: 30 Dec 2011 Posts: 55
|
|
Posted: Tue Oct 31, 2017 1:15 pm |
|
|
I understand your point, but the '25K50 cost is almost half that of the '2550 and the $2 difference starts to add up when you're making enough quantities.
So far, the datasheets comparison looks very compatible, but I still need to look them over more closely. The oscillator section has changed some and may be an issue. I will be attempting to burn a '25K50 as soon as the parts arrive just to see if it will work. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19541
|
|
Posted: Tue Oct 31, 2017 2:49 pm |
|
|
Almost certainly no.
There are huge differences in the oscillator.
It will depend on what setup the older chip uses. If it doesn't use USB, and just uses the crystal directly, it might work, but the PLL control is very different. If you look at the 'crystals supported for USB' table, the older chip actually supports far more options.
If you can change the crystal to 12or 16MHz, and the code was written for 8, 16, 24 or 48MHz, then just alter the fuses to HS with *4 or *3 PLL, and the right divider.
Load the old code into MPLAB, and it'll tell you what fuse pattern it has. Then look at the crystal and you should be able to calculate what frequency the code was written for. Then change the device settings to the newer chip and setup the correct fuse patterns to give the same frequency (and change the crystal if it is 4, or 8Mhz).
It might then work. |
|
|
|