24FJ64GA004 Code suddenly not working anymore. Possible cause Clear command

Started by diebobo, Apr 10, 2022, 02:54 PM

Previous topic - Next topic

diebobo

Hi Les,

I got a project which doesn't run anymore with the latest compiler, and with doensn't run anymore i mean that the CPU doesn't even power up correctly. Last compiled +/- 1.5 years ago it still worked.. I managed to delete everthing except the part which makes it not working anymore.. Below the code... If i delete the ISR part ( so bottom 3 line ) OR the Clear command at the top it works just fine.

I have searched the .ASM file and found some differences but i can't determine why or what.

Any thoughts ? Using latest compiler

Device = 24FJ64GA004
Declare Xtal = 32

Config Config1 = JTAGEN_OFF, GCP_OFF, GWRP_OFF, BKBUG_OFF, COE_OFF, ICS_PGx1, FWDTEN_OFF, WINDIS_OFF, FWPSA_PR128, WDTPOST_PS256
Config Config2 = IOL1WAY_OFF, COE_OFF, IESO_OFF, FNOSC_FRCPLL, FCKSM_CSDCMD, OSCIOFNC_ON, POSCMOD_NONE

CLKDIV = 0 ' CPU peripheral clock ratio set to 1:1
OSCCON.Byte1 = %00010000 ' Enable 4 x PLL

Clear
 
Symbol LED = PORTA.8

main:

   Toggle LED
   DelayMS 300

GoTo main

End

 Isr U1RXInterrupt
     
   IFS0bits_U1RXIF = 0

EndIsr 

diebobo

Les, do you have a device of this family so you can test something for yourself ? I know have multiple programs written for a 24FJ64GA004 and they stopped working all together or incorrect after the change with the Clear command. Without the clear command they work correct, except with random / or old ram values and it really drives me crazy..