Search found 1488 matches

by Jerry Messina
Fri Dec 06, 2024 2:24 pm
Forum: Modules
Topic: ISRTimer.bas problems
Replies: 3
Views: 44

Re: ISRTimer.bas problems

check your PM.
by Jerry Messina
Thu Dec 05, 2024 2:09 pm
Forum: Modules
Topic: ISRTimer.bas problems
Replies: 3
Views: 44

Re: ISRTimer.bas problems

is it likely to be some kind of context saving issue ? It could be, depending on if you're trying to format and send the data inside the timer event. I wouldn't recommend that. Also, calling those timer setup routines (timer.initialize, timer,start) inside the timer event isn't a good idea. The eve...
by Jerry Messina
Fri Oct 04, 2024 1:48 pm
Forum: Wiki Announcements
Topic: ConfigGenerator V2
Replies: 0
Views: 149

ConfigGenerator V2

The ConfigGenerator tool has gotten a facelift and some new features. It now allows you to import and export the settings to a file (it can even scan an existing .bas file for current settings). Another new feature is the ability to read the CONFIG settings from an existing .hex file, which can be h...
by Jerry Messina
Thu Oct 03, 2024 10:53 pm
Forum: Wiki Announcements
Topic: SystemConvert V2
Replies: 1
Views: 131

Re: SystemConvert V2

V2.10 released to correct IRQ errors in the DFP files for the Q40 and Q41 families
by Jerry Messina
Thu Oct 03, 2024 10:51 pm
Forum: Modules
Topic: Q40/Q41 Vectored Interrupt Errors in documentation (datasheets and device files)
Replies: 1
Views: 196

Re: Q40/Q41 Vectored Interrupt Errors in documentation (datasheets and device files)

Attached are updated device files for the Q40/Q41 family.
I've also updated the SystemConvert utility to v2.10 which takes care of this error in the DFP files.
by Jerry Messina
Tue Oct 01, 2024 2:47 pm
Forum: Modules
Topic: Q40/Q41 Vectored Interrupt Errors in documentation (datasheets and device files)
Replies: 1
Views: 196

Q40/Q41 Vectored Interrupt Errors in documentation (datasheets and device files)

I just ran across this... There are errors in the current Q40/Q41 datasheets and mplabx DFP device files (which are used to generate the SF device files). The IRQ numbers for interrupt vectors 49-55 are incorrect (PIE6/PIR6/IRP6 show bit 1 is unused, and the IRQ's don't take this into account). The ...
by Jerry Messina
Thu Sep 26, 2024 2:02 pm
Forum: Compiler
Topic: new device files and register bit names
Replies: 0
Views: 104

new device files and register bit names

The device register bit files in SF v2.2.4.1 now contain structure definitions similar to the examples shown in the wiki Using Bitname Structures These files are automatically generated from the MPLABX DFP files by the new SystemConvert V2 utility For example, the file "P18F26Q43.bas" contains // PI...
by Jerry Messina
Thu Sep 26, 2024 1:38 pm
Forum: Announcements
Topic: Online update - 25 SEPT 2024 - v2.2.4.1
Replies: 0
Views: 170

Online update - 25 SEPT 2024 - v2.2.4.1

There is a new compiler update 2.2.4.1 available for registered users. You can use the download function in the IDE under 'Help | About... | Check for Updates" or Download: http://www.mecanique-web.co.uk/downloads/swordfish-si.exe and enter your activation key to install. You can view a list of chan...
by Jerry Messina
Thu Sep 26, 2024 1:11 pm
Forum: Modules
Topic: ADCC - adc module for K and Q families
Replies: 2
Views: 12303

Re: ADCC - adc module for K and Q families

The SetChan() sub uses the channel number setting for the ADC Positive Channel Selection Register, so it'll likely change depending on the device. Consult the datasheet for the ADPCH register settings. For the 26Q43 in the demo program the datasheet section 40.7.8 ADPCH shows: 000000 RA0/ANA0 001000...
by Jerry Messina
Fri Sep 20, 2024 2:01 pm
Forum: Compiler
Topic: Echo back a character and process a string
Replies: 2
Views: 183

Re: Echo back a character and process a string

I always like to use interrupts for handing serial input since it'll buffer incoming chars while you process stuff. Here's a version that gets chars from the isr buffer, echos them, and checks for CR (completely untested) You'd probably want to add a bit more error handling and checking for things l...
by Jerry Messina
Sat Sep 14, 2024 2:02 pm
Forum: Wiki Announcements
Topic: SystemConvert V2
Replies: 1
Views: 131

SystemConvert V2

After a long hiatus, the tools for creating Swordfish device files are available again on the wiki page at SystemConvert

Along with SystemConvert V2, a new InfoGen tool allows you to create the required 8bit_device.info file for adding devices to the MPASMX assembler.
by Jerry Messina
Wed Aug 21, 2024 1:19 pm
Forum: IDE
Topic: osc advice
Replies: 3
Views: 365

Re: osc advice

That config looks correct for an external xtal + pll. You should be able to see what's being used by looking at the COSC and CDIV bits in the OSCCON2 register, and along with OSCSTAT that should show the current osc status. You have the fail-safe clock-switching disabled, so it shouldn't be running ...
by Jerry Messina
Thu Jun 20, 2024 1:16 pm
Forum: Modules
Topic: is there a XV18 version of the NMEA module
Replies: 4
Views: 645

Re: is there a XV18 version of the NMEA module

The attached zip file contains an updated NMEA module (v1.3) that has a few new features: - can use either high or low priority interrupts (set via #option) - context save optimized when used with xv18 devices - NMEA.bas contains aliases for various USARTx routines like SetBaudrate so you don't have...
by Jerry Messina
Thu Jun 06, 2024 12:50 pm
Forum: Modules
Topic: is there a XV18 version of the NMEA module
Replies: 4
Views: 645

Re: is there a XV18 version of the NMEA module

With a few minor changes to NMEA.bas to remove the hardcoded references to the interrupt and RCREG definitions and use the generic ones defined in USART.bas, you should be able to changed the module to work with any device without having to restructure it to use the rx isr. This also adds a new '#op...
by Jerry Messina
Mon Jun 03, 2024 1:22 pm
Forum: Compiler
Topic: Float byte format
Replies: 2
Views: 517

Re: Float byte format

Swordfish uses the same 32-bit floating point format as the old Microchip C compiler, so it's not the same as IEEE-754. Here's some old code I had laying around to convert between the two... I *THINK* this works (but I haven't had another look at it) // SF floats are in 32-bit Microchip format, low:...