News:

;) This forum is the property of Proton software developers

Main Menu

I can`t use 2ccp+2pwm on 18F25K22 but 18F26K22 ok..

Started by Maxi, Sep 07, 2021, 08:41 AM

Previous topic - Next topic

Maxi

yes, problem very clear
is it PPI file mistake?

proton+ and positron same
give ASM error

John Lawton

You don't say what the asm error says!
You could compare the two PPI files to see if there is a relevant difference.

trastikata

The PPI's are indeed different. You can copy the 18F26K22 PPI as 18F25K22 and manually adjust the Memory, RAM and EEPROM sizes since this is the only difference and then try it.

Just for reference:

Quote'18F25K22
FLASH_WRITE=1       ; Whether the device has Self Modifying support. 0=No, 1=Read and Write, 2=Read no Write
MSSP=2              ; 0=None, 1=Single MSSP, 2=Dual MSSP, 3=SSP Only
HPWM=4              ; Amount of PWM channels (supported by the compiler) available
BLOCK=32            ; Size of the Code Memory Write Segment (in Bytes)


Quote'18F26K22
FLASH_WRITE=1       ; Whether the device has Self Modifying support. 0=No, 1=Read and Write, 2=Read no Write
MSSP=2              ; 0=None, 1=Single MSSP, 2=Dual MSSP, 3=SSP Only
HPWM=5              ; Amount of PWM channels (supported by the compiler) available
HPWM_TYPE=2         ; The type of HPWM library to use for the device
BLOCK=64            ; Size of the Code Memory Write Segment (in Bytes)

top204

Trastika is correct. Because Microchip constantly change how peripherals work within the devices, I have had to add extra features to the PPI files so the compiler knows which of its routines to use within its built-in libraries. It is a right nightmare, and I will, sometimes, miss a device because Microchip do not make it known that there are differences.

Adding the line HPWM_TYPE=2 will solve the problem, and I have added it to the 18F25K22.PPI file for future updates.