First Thing to Do In Swordfish
Moderators: David Barker, Jerry Messina
-
- Posts: 19
- Joined: Sun Apr 09, 2017 7:07 pm
First Thing to Do In Swordfish
I've heard 'look at the samples and you'll figure it out.'
Well. I have done that with a couple languages/compilers and
haven't figured much out.
That might be for someone who already know another language.
What's one thing I can do in Swordfish that will 'move me along'?
Write the device line?
Thanks!
Well. I have done that with a couple languages/compilers and
haven't figured much out.
That might be for someone who already know another language.
What's one thing I can do in Swordfish that will 'move me along'?
Write the device line?
Thanks!
Last edited by swordfishuser on Thu May 04, 2017 7:24 am, edited 1 time in total.
Re: First Thing to Do In Swordfish
Have you checked out the Swordfish Language Guide?
http://www.sfcompiler.co.uk/downloads/SFManual.pdf
http://www.sfcompiler.co.uk/downloads/SFManual.pdf
-
- Posts: 19
- Joined: Sun Apr 09, 2017 7:07 pm
Re: First Thing to Do In Swordfish
That new post button could be in a better spot.
I wrote a nice reply for nothing.
Do I open a new source file or start a project to get started please?
I wrote a nice reply for nothing.
Do I open a new source file or start a project to get started please?
Re: First Thing to Do In Swordfish
Neither, You just click on the "New" tab or press CTRL+N to get started. That will start you with a clean fresh page to write you're code.swordfishuser wrote:Do I open a new source file or start a project to get started please?
-
- Posts: 19
- Joined: Sun Apr 09, 2017 7:07 pm
Re: First Thing to Do In Swordfish
Thank you.
Goal is simplest program that will compile.
In Basic Stamp it is 'End'.
That command only.
What next to do that please?
Goal is simplest program that will compile.
In Basic Stamp it is 'End'.
That command only.
What next to do that please?
-
- Swordfish Developer
- Posts: 1473
- Joined: Fri Jan 30, 2009 6:27 pm
- Location: US
Re: First Thing to Do In Swordfish
Try the IDE Help menu and under topics select 'Creating and Using Programs' in the 'Language Reference' section.
After that it's up to you!
After that it's up to you!
And here's the simplest program that will compile in Swordfish:Goal is simplest program that will compile.
In Basic Stamp it is 'End'.
That command only.
Code: Select all
-
- Posts: 19
- Joined: Sun Apr 09, 2017 7:07 pm
Re: First Thing to Do In Swordfish
Great!
Thank you!
Have to go.
Will be back in a couple hours.
Thank you!
Have to go.
Will be back in a couple hours.
-
- Posts: 19
- Joined: Sun Apr 09, 2017 7:07 pm
Re: First Thing to Do In Swordfish
bitfogav and Jerry
How do you 'Debug' to terminal.
Example: Debug "Hello World".
"Killing two bird with one stone"
See if there ins terminal program in Swordfish and
coding and compiling first lines of code.
Bob
How do you 'Debug' to terminal.
Example: Debug "Hello World".
"Killing two bird with one stone"
See if there ins terminal program in Swordfish and
coding and compiling first lines of code.
Bob
-
- Swordfish Developer
- Posts: 1473
- Joined: Fri Jan 30, 2009 6:27 pm
- Location: US
Re: First Thing to Do In Swordfish
There's no 'debug' terminal. You can use the pic uart to send stuff to a pc.
Here's a simple example based on the echo.bas program from the Samples folder
There's a simple serial terminal in the IDE... main menu 'Plugin | IDE Serial Communicator'
Here's a simple example based on the echo.bas program from the Samples folder
Code: Select all
// if device and clock are omitted, then the compiler defaults to
// 18F4520 @ 20MHz - they are just used here for clarity...
device = 18F4520
clock = 20
// import usart module...
include "usart.bas"
usart.SetBaudrate(br19200)
usart.Write("Hello World")
// read in characters and echo to screen...
while true
WriteByte(ReadByte)
wend
-
- Posts: 19
- Joined: Sun Apr 09, 2017 7:07 pm
Re: First Thing to Do In Swordfish
Jerry
Thank you. That's a five star anwer. *****.
Looks like 'Learn By Doing' works.
Get back to you in a couple of hours.
Bob
Thank you. That's a five star anwer. *****.
Looks like 'Learn By Doing' works.
Get back to you in a couple of hours.
Bob
-
- Posts: 19
- Joined: Sun Apr 09, 2017 7:07 pm
Re: First Thing to Do In Swordfish
Will be ready to go with development board and 18F25K22 in a couple of days.
Looking forward to seeing what Swordfish is like.
Need to add communication interface to board. I think.
Looking forward to seeing what Swordfish is like.
Need to add communication interface to board. I think.