Search found 1237 matches

by Jerry Messina
Fri Jul 17, 2020 1:32 pm
Forum: IDE
Topic: PicKit4 as a programmer in IDE
Replies: 17
Views: 1667

Re: PicKit4 as a programmer in IDE

Then that sounds like it's just the Pickit3 doing that on its own...
I can't think of any way to stop that until you run the program and have it release reset.

Maybe run the commandline programmer at startup and tell it to release reset?
No idea if that would work or not.
by Jerry Messina
Fri Jul 17, 2020 9:14 am
Forum: IDE
Topic: PicKit4 as a programmer in IDE
Replies: 17
Views: 1667

Re: PicKit4 as a programmer in IDE

Haven't really looked for it.

So the problem is if the PC is restarted then the pickit3 will hold the MCLR line low after the PC reboots?
by Jerry Messina
Sat Jul 11, 2020 9:49 am
Forum: Compiler
Topic: Is it possible to store Pin ref in a structure field
Replies: 4
Views: 767

Re: Is it possible to store Pin ref in a structure field

I couldn't really find a clean way to avoid it to make things hardware independant. You can't really make it truly hardware independent. The problem is that the PORTx, LATx, and TRISx registers change offsets depending on the device, so once you compile it for one device another device won't work. ...
by Jerry Messina
Fri Jul 10, 2020 11:46 pm
Forum: Compiler
Topic: Is it possible to store Pin ref in a structure field
Replies: 4
Views: 767

Re: Is it possible to store Pin ref in a structure field

The library module shift.bas shows the definitions and usage of programmable pins... // a pin structure... structure TPin PortAddr as word // PORT addr (input), LAT addr (output) TrisAddr as word // TRIS addr Pin as byte PinMask as byte end structure The SetInput() and SetOutput() routines show how ...
by Jerry Messina
Fri Jul 03, 2020 3:28 pm
Forum: Compiler
Topic: Default Variable Assignment
Replies: 27
Views: 2310

Re: Default Variable Assignment

also, you can't use 'bound()'

Code: Select all

dim bdata() as byte = (10,20,30)

// 'symbol not expected'
dim bsize as byte = bound(bdata)
'sizeof()' works however

EDIT: Thanks to David the fix for bound() and addressof() will be included in the next update (likely 2.2.3.5)
by Jerry Messina
Fri Jul 03, 2020 2:42 pm
Forum: Compiler
Topic: Default Variable Assignment
Replies: 27
Views: 2310

Re: Default Variable Assignment

It seems that one thing you can't do in 2.2.3.4 is initialize a variable using '@' or 'addressof()'

Code: Select all

const cdata() as byte = (1,2,3,4,5,6,7,8)
dim bdata() as byte = (10,20,30)

// both of these produce 'symbol not expected'
dim caddr as longword = @cdata
dim baddr as word = addressof(bdata)
by Jerry Messina
Sun Jun 28, 2020 11:26 am
Forum: Compiler
Topic: Default Variable Assignment
Replies: 27
Views: 2310

Re: Default Variable Assignment

I'm still looking at ways to make Swordfish more Firewing like in this regard
How about adding static variables?

Code: Select all

	Sub MySub()
	  Static index As Byte = 0
	  index += 1
	  Console.Write("Index = ", CStr(index),13,10)
	End Sub
by Jerry Messina
Sun Jun 28, 2020 11:11 am
Forum: Compiler
Topic: Default Variable Assignment
Replies: 27
Views: 2310

Re: Default Variable Assignment

I'm not sure I really see much of an advantage one way or the other, unless you were going to allow forward references.

Couldn't you always just use a template like this?

Code: Select all

program myprog

inline sub main()
	// main program goes here
end sub

main
end program
What does requiring 'main' get you?
by Jerry Messina
Sun Jun 28, 2020 9:39 am
Forum: General
Topic: problems with wiki access??
Replies: 4
Views: 931

Re: problems with wiki access??

Must have been... it's working fine this morning.

Thanks for taking a look though.
by Jerry Messina
Sat Jun 27, 2020 4:05 pm
Forum: General
Topic: problems with wiki access??
Replies: 4
Views: 931

problems with wiki access??

I've already asked David, but Is it just me or is anyone else having problems accessing the wiki pages? If I try to browse anything under https://www.sfcompiler.co.uk/wiki, the pages take forever to load and when they finally do there's no formatting to them. Tried IE11, firefox54, and chrome 75. Th...
by Jerry Messina
Sat Jun 27, 2020 3:41 pm
Forum: Compiler
Topic: Default Variable Assignment
Replies: 27
Views: 2310

Re: Default Variable Assignment

... so in your case that would be Dim value As Word = multiply(2,4) USART.SetBaudrate(br19200) Swap(x,i) You can have initializers setup local variables inside sub/functions too: sub mysub() dim x as byte = 1 ... end sub The declarations have to be before any executable code, just as before without ...
by Jerry Messina
Sat Jun 27, 2020 3:31 pm
Forum: General
Topic: 18FxxQ43 SRAM silicon errata B0
Replies: 6
Views: 978

Re: 18FxxQ43 SRAM silicon errata B0

I'm hoping that errata reads "we really screwed up on this one and while we fix it we thought you should know..."

Otherwise they can't be serious, can they?
by Jerry Messina
Sat Jun 27, 2020 11:06 am
Forum: General
Topic: 18FxxQ43 SRAM silicon errata B0
Replies: 6
Views: 978

18FxxQ43 SRAM silicon errata B0

Just a heads up to anyone looking at using the Q43... There's a nasty silicon errata just published that basically makes the chips unusable! 18FxxQ43 errata issue 1.4.1 silicon rev B0 SRAM Readback ------------- Following a device power up sequence, there is a possibility that some SRAM locations wi...
by Jerry Messina
Tue Jun 23, 2020 2:29 pm
Forum: Compiler
Topic: SF can't launch plugins in Win 7 professional
Replies: 8
Views: 2271

Re: SF can't launch plugins in Win 7 professional

Can't help with the backup plugin (I've never used it), but to delete a plugin that isn't in the plugin "Uninstall" list you can just delete the folder for the plugin you want to get rid of under the "Plugin" folder. Here are some of the places to look at (win7 x64): C:\Users\<user-name>\AppData\Roa...
by Jerry Messina
Tue Jun 23, 2020 10:23 am
Forum: Announcements
Topic: Online update - 22-06-2020
Replies: 0
Views: 1539

Online update - 22-06-2020

There is a new compiler update (2.2.3.4) available for registered users. Download: http://www.mecanique-web.co.uk/downloads/swordfish-si.exe and enter your activation key to install. You can view a list of changes here: https://www.sfcompiler.co.uk/wiki/pmwiki.php?n=Swordfish.VersionHistory For SE v...