SF 2.2.3.6 and 18FxxQ84 CONFIG

Coding and general discussion relating to the compiler

Moderators: David Barker, Jerry Messina

Post Reply
Jerry Messina
Swordfish Developer
Posts: 1220
Joined: Fri Jan 30, 2009 6:27 pm
Location: US

SF 2.2.3.6 and 18FxxQ84 CONFIG

Post by Jerry Messina » Tue Nov 24, 2020 1:10 pm

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"

RKP
Registered User
Registered User
Posts: 82
Joined: Mon Oct 22, 2007 3:14 pm
Location: Maryland

Re: SF 2.2.3.6 and 18FxxQ84 CONFIG

Post by RKP » Wed Nov 25, 2020 6:58 pm

Jerry,

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

Jerry Messina
Swordfish Developer
Posts: 1220
Joined: Fri Jan 30, 2009 6:27 pm
Location: US

Re: SF 2.2.3.6 and 18FxxQ84 CONFIG

Post by Jerry Messina » Thu Nov 26, 2020 12:43 pm

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.

Post Reply