Author Topic: 18F4580 is it compatible with 18F458?  (Read 1143 times)

0 Members and 1 Guest are viewing this topic.

Online ChrissTopic starter

  • Frequent Contributor
  • **
  • Posts: 534
  • Country: 00
18F4580 is it compatible with 18F458?
« on: October 16, 2019, 08:34:37 pm »
Hi!
I have to change a bad PIC 18F458 but the fastest delivery time I can get a PIC 18F4580.
I have to program a firmware what I actually have wich is for the old PIC 18F458.

I checked in datasheet and compared these two PIC and I can see they should be compatible,
but I have only the compiled hex file what I have to program into the new PIC.

Could this work if I interchange the old burned PIC 18F458 with the new type PIC 18F4580 and upload the firmware what I have
from the 18F458?

Does somebody have any experience with this kind of mixing?

Thank you very much.
My best regards.
 

Offline 1Ghz

  • Supporter
  • ****
  • Posts: 93
  • Country: kr
Re: 18F4580 is it compatible with 18F458?
« Reply #1 on: October 16, 2019, 08:46:58 pm »
PIC18F458 to PIC18F4580 Migration Document http://ww1.microchip.com/downloads/en/DeviceDoc/39661a.pdf
 
The following users thanked this post: Chriss

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12860
Re: 18F4580 is it compatible with 18F458?
« Reply #2 on: October 16, 2019, 09:16:31 pm »
TLDR:
Pin compatible - Yes
Binary code compatible - No, for anything much more complex than 'blink a LED', even if you patch the CONFIG, due to the many SFR and hardware peripheral module differences.


OTOH if you've got full sourcecode + the corrct compiler to rebuild it, you are in with a chance of porting it sucessfully if you carefully work through the code, referring to the migration document 1GHz linked, and the two device datasheets, and all the PIC 18F4580 errata, adapting the code as required.
« Last Edit: October 16, 2019, 09:23:05 pm by Ian.M »
 
The following users thanked this post: Chriss

Offline jackthomson41

  • Regular Contributor
  • *
  • Posts: 53
  • Country: us
Re: 18F4580 is it compatible with 18F458?
« Reply #3 on: October 19, 2019, 02:11:12 pm »
It would be wise to use PIC18F458 but if you have to replace it then you need to change the configuration bits of your code i.e. change microcontroller name in your compiler and upload the hex file in your new microcontrollers i.e. PIC 18F4580.

But if you just have the hex file and not the code then it's impossible to replace.
« Last Edit: March 10, 2021, 01:17:37 am by jackthomson41 »
 
The following users thanked this post: Chriss

Online ChrissTopic starter

  • Frequent Contributor
  • **
  • Posts: 534
  • Country: 00
Re: 18F4580 is it compatible with 18F458?
« Reply #4 on: October 19, 2019, 07:17:17 pm »
Thank you guys, you helped me really to make a decision.
Thanks.

My best regards.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf