If moving PICs how much change in firmware i.e. PIC18F2580 to PIC18LF2580

Status
Not open for further replies.

TokTok12

Junior Member level 2
Joined
May 6, 2014
Messages
20
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
281
Hi all,

I'm being advised by my boardhouse a change in firmware might occur and I would like to cross check this on the forum.

Essentially the situation is in order to enable the running of my PIC18F2580 on +3.3V I need to switch to the PIC18LF2580 which operates between ranges of 2.0v TO 5.5V unlike the PIC18F2580 which operates between 4.2 to 5.5v. In terms of a hardware design change not much changes will be done if I were to switch to the PIC18LF2580 as the pinouts between the both PICs are the same.

My question esssentially is if moving from the PIC18F2580 to the PIC18LF2580 will there be a significant change in firmware or will the only change be the very first line of code i.e.

Code:
#include<18F2580.h>

changing to

Code:
#include<18LF2580.h>

Regards,
TokTok
 

Running a PIC LF series at a lower voltage typically limits the maximum Fosc of the device, which can and will effect a whole range of factors, code, peripherals, etc.

In the case of the PIC18LF2580 the maximum Fosc is determined by the following formula:

FMAX= (16.36 MHz/V) (VDDAPPMIN– 2.0V) + 4 MHz

Reference: PIC18F2480/2580/4480/4580 Datasheet, Section: FIGURE 28-2: PIC18LF2480/2580/4480/4580 VOLTAGE-FREQUENCY GRAPH (INDUSTRIAL), Page:422

Operating the device at 3.3v limits the maximum Fosc to approximately 25.268MHz, down from 40MHz.

Therefore if there is a change in Fosc, you will need to review the code and make appropriate modifications based on the new Fosc.


BigDog
 

They are the same except for voltages. Due to the lower voltage you cannot go as fast. With that said you will be able to re-use all of your original code. The pinouts, peripherals and registers are the same.
 

With that said you will be able to re-use all of your original code.

Not necessarily.

Without reviewing the OP's code, such a statement should not be made with such certainty.

A change in the system clock (Fosc) can significantly affect viable synthesizable UART/CAN/LIN data rates, hard/soft delays, required timer values, etc.

Depending on the original contents of the OP's code, the end result of a Fosc change could be quite significant, typically some modification of values will be required at the very least.


BigDog
 

The code will compile and run. UART will not work, true. But most will not be affected aside from really bad performance. Those changes are minor, rather than moving to completely new family of PIC. In this case the code may not even compile. If the code is running below 25 MHz there is no changes needed at all.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…