Page 1 of 1

SF 2.2.3.6 and 18FxxQ84 CONFIG

Posted: Tue Nov 24, 2020 1:10 pm
by Jerry Messina
The recent v2.2.3.6 update includes support for a number of new devices, including the Q83/Q84 families.

Just a heads up - these devices have some quirks with their CONFIG settings...
they have more config registers than mpasmx can handle (it's limited to 16 registers... past that and it blows up).

The device files for the Q83/Q84 have '#variable' definitions that can be used along with the config_Q84.bas module to allow accessing these extended config registers. Luckily, most of these have to do with CRC checks, so they can be left out if not required.

The file config_Q84.bas shows an example of setting a few of the extended config registers...
basically you just override the default '#variable' definitions from the device file and include config_Q84.
"Regular" config settings work as they normally do.

Code: Select all

device = 18F27Q84

// normal config setting
config RSTOSC = HFINTOSC_64MHZ

// extended config
#variable CRC_CONFIG = BOOTSCEN and BOOTPOR
#variable BCRCPOLT  = $AD
#variable BCRCPOLU  = $BE
#variable BCRCPOLH  = $EF
#variable BCRCSEEDU = 85
#variable CRCERESL  = $AA       // last reg
include "config_Q84.bas"

Re: SF 2.2.3.6 and 18FxxQ84 CONFIG

Posted: Wed Nov 25, 2020 6:58 pm
by RKP
Jerry,

Thanks for your continuing effort to keep the Swordfish Compiler updated for the use of the newer Microchip parts.

Re: SF 2.2.3.6 and 18FxxQ84 CONFIG

Posted: Thu Nov 26, 2020 12:43 pm
by Jerry Messina
Thanks. I was glad to see that it could be done.

I think SF may be the first (perhaps only!) third-party BASIC compiler to support these new parts.