News:

Let's find out together what makes a PIC Tick!

Main Menu

Error Code

Started by Murat Atakan, Oct 14, 2026, 01:07 PM

Previous topic - Next topic

Murat Atakan

I am using the 18F4620 processor.
I get the following error after compilation.
A.S 2746:Symbol not previously defined.(_CPLB_5)
I look forward to your assistance.
Thank you.

RGV250

Hi,
If you post the code it would help, also what version of the compiler. I doubt you will get any help without it.

Regards,
Bob

Murat Atakan

Hi RGV250,
Thank you very much for your interest.

that I use Positron version 4.0.6.4-1.1.3.4 

RGV250

Hi,
I do not exactly know what the code is doing so this might not help but if you change dPWR to a Dword it compiles
    Dim dPWR      As SDword
to     
    Dim dPWR      As Dword

Bob

Murat Atakan

Hi,
Actually, it was working on the PIC16F877.
It started showing this error after the processor was changed.
Thank you very much, expert.
Best regards.

Pepe

#5
This is a compiler error that Les should fix; that label (_CPLB__5) does not exist, and it should jump to `lbl 29` instead.


F1_000232 EQU $ ; IN [18F4620.BAS] IF DPWR > 32 THEN
    BTFSC DPWRHHH,7,0
    BRA _LBL__29
    MOVF DPWRH,W,0
    IORWF DPWRHH,W,0
    IORWF DPWRHHH,W,0
    BNZ _CPLB__4
    MOVLW 33
    SUBWF DPWR,W,0
    BNC _LBL__29
_CPLB__4
F1_000233 EQU $ ; IN [18F4620.BAS] IF DPWR < 65535 THEN
    BTFSC DPWRHHH,7
    GOTO _CPLB__5                                ---> BRA _LBL__29
    MOVF DPWRHH,W,0
    IORWF DPWRHHH,W,0
    MOVLB 0X00
    BNZ _LBL__31
    MOVLW 255
    SUBWF DPWR,W,0
    MOVLW 255
    SUBWFB DPWRH,W,0
    BC _LBL__31
F1_000234 EQU $ ; IN [18F4620.BAS] DINTEG = DINTEG + DERR
    MOVF DERR,W,0
    ADDWF DINTEG,F,0
    MOVF DERRH,W,0
    ADDWFC DINTEGH,F,0
    MOVF DERRHH,W,0
    ADDWFC DINTEGHH,F,0
    MOVF DERRHHH,W,0
    ADDWFC DINTEGHHH,F,0
F1_000235 EQU $ ; IN [18F4620.BAS] ENDIF
_LBL__31
F1_000236 EQU $ ; IN [18F4620.BAS] ENDIF
_LBL__29


Change this

QuoteIf 32 < dPWR Then
            If dPWR < 65535 Then
                dInteg = dInteg + dErr
            EndIf
        EndIf

To this

If dPWR > 32 And dPWR < 65535 Then
                dInteg = dInteg + dErr
EndIf


Attached is the corrected program, now ready to compile.

top204

This has now been corrected, and as soon as I have sorted out a few other small problems, I will upload a free update.

The anomaly has been with the 8-bit compiler since I created signed variables in it, around 10 years ago, so it amazes me how it has not been previously detected.

Regards
Les

▲