News:

PROTON pic BASIC Compilers for PIC, PIC24, dsPIC33

Main Menu

HSerial2_ChangeBaud

Started by Dave-S, Jan 14, 2023, 12:39 PM

Previous topic - Next topic

Dave-S

Pic 18F47K40 @ 64Mhz
I get an Error when using "HSerial2_ChangeBaud"
ASM error 113    A.S 4710:Symbol not previously defined (SP2BRGLH)
How and where do I set These?

Thanks David

Yasin

I compiled the code in the example. There was no error. Could you have made an edit to your PPI files?
Best regards.

Device 18F47K40
Xtal = 64
Declare Hserial2_Baud = 9600
Dim tt As Byte = 0
Main:
    Select tt
        Case 0
            HSerial2_ChangeBaud 1200
        Case 1
            HSerial2_ChangeBaud 2400
        Case 2
            HSerial2_ChangeBaud 4800
        Case 3
            HSerial2_ChangeBaud 9600
        Case 4
            HSerial2_ChangeBaud 19200
       
    EndSelect
    Inc tt
    If tt > 5 Then tt = 0
    HRSOutLn "test"
GoTo Main

Dompie

Hmmmm

Quote from: Yasin on Jan 14, 2023, 03:14 PM.....
Declare Hserial2_Baud = 9600
.........
    HRSOutLn "test"
.........

I think that the HRSOutLn had to be: HRSOut2Ln

Johan

Dave-S

Thanks for the reply.
I checked the PPI file it Had:
RC2REG EQU 0X0E99
RCREG2 EQU 0X0E99
TX2REG EQU 0X0E9A
TXREG2 EQU 0X0E9A
SP2BRG EQU 0X0E9B
SP2BRGL EQU 0X0E9B
SPBRG2 EQU 0X0E9B
SP2BRGH EQU 0X0E9C
SPBRGLH2 EQU 0X0E9C
SPBRGH2 EQU 0X0E9C
RC2STA EQU 0X0E9D
RCSTA2 EQU 0X0E9D
TX2STA EQU 0X0E9E
TXSTA2 EQU 0X0E9E

the SPBRGLH2 EQU 0X0E9C has the 2 at the end, edit it to match the error  (SP2BRGLH)
now all working thanks.

David