PIC C interrupt using #int_global
-
Hi all, I know this is cheeky in the C++ section but pleeease help me!! I need to shave some time off of the compiler generated interrupt code. In the code below (#int_gobal with compiler generated interrupt code within it) this shoul compile then work the same as it previously did but the compiler stops on '03.5', this is the status register bit 5 so i tryed 'BTFSC STATUS,5' but that didnt work either. Im very confused, please help me. #int_global isr() { // Will be programmed at location 4 #asm BTFSC 03.5 GOTO 00A MOVWF 25 SWAPF 03,W MOVWF 26 GOTO 00F ........ etc .... #endasm } :(( :confused: :(( :(( An Expert is somone who has previously made ALL the Mistakes, I dream of this day. - Lucky
-
Hi all, I know this is cheeky in the C++ section but pleeease help me!! I need to shave some time off of the compiler generated interrupt code. In the code below (#int_gobal with compiler generated interrupt code within it) this shoul compile then work the same as it previously did but the compiler stops on '03.5', this is the status register bit 5 so i tryed 'BTFSC STATUS,5' but that didnt work either. Im very confused, please help me. #int_global isr() { // Will be programmed at location 4 #asm BTFSC 03.5 GOTO 00A MOVWF 25 SWAPF 03,W MOVWF 26 GOTO 00F ........ etc .... #endasm } :(( :confused: :(( :(( An Expert is somone who has previously made ALL the Mistakes, I dream of this day. - Lucky
i duuno much about PICs, but other controlers ... so ... first, why not doing all the stuff in asm ? ... secondly, giving 03 will always work whereas STATUS must be an alias and should be used only if it is defined somewhere as being equal to 03 (like an #include STATUS 03)(check the include files and/or your compiler settings) Could you post the BTFSC description function ?? ~RaGE();