Getting started with programming pics in Basic

Post here to discuss programming with swordfish basic

Moderators: Chuckt, Garth, bitfogav

User avatar
brad
Site Admin
Site Admin
Posts: 2578
Joined: Fri Mar 26, 2010 10:30 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Getting started with programming pics in Basic

Post by brad » Sat Jun 12, 2010 8:30 am

Hi there everyone!

I'm quite excited to be venturing into basic programming. I have been working with assembly language since 2007 and feel it is time to learn another language.

Basic is a higher level language than assembly and as such, it makes it easier to achieve a set task. Given that I have two kids now, I really am finding it hard to get time to work on my projects - I figure if I can build a project and base it around assembly language, then I shouldn't have to spend so much time on it.

Why is it easier you ask?

There are loads and loads of include files out there that you can freely download. These files have been written by other basic programmers who kindly release them for all to use.

So lets say I wanted to use one of those 16x2 lcd displays (16 characters x 2 lines) and I wanted to write "Hello" on the display.

The assembly code for such a task would be:

Code: Select all

;  Myke Predko
;  99.03.13
;
  LIST P=16C84, R=DEC          ;  16C84 Runs at 4 MHz
  errorlevel 0,-305
  INCLUDE "p16c84.inc"


;  Register Usage
 CBLOCK 0x00C                   ;  Start Registers at End of the Values
Dlay                            ;  8 Bit Delay Variable
Temp				;  Temporary Value Used When Sending Out Data
NOTemp				;  Temporary Value to "NybbleOutput"
 ENDC


;  Define Inforation
#DEFINE Data PORTA,0
#DEFINE Clock PORTA, 1


;  Macros
ClockStrobe MACRO		;  Strobe the Data Bit
  bsf	 Clock
  bcf	 Clock
 ENDM

EStrobe MACRO			;  Strobe the "E" Bit
  bsf	 Data
  bcf	 Data
 ENDM


 PAGE
 __CONFIG _CP_OFF & _XT_OSC & _PWRTE_ON  & _WDT_OFF
                                ;  Note that the WatchDog Timer is OFF
;  Demo Code, Loop Forever Toggling PA0 (Flashing the LED)

  org    0

  clrf   PORTA

  movlw  0x01C                  ;  Enable PA0 & PA1 for Output
  bsf    STATUS, RP0
  movwf  TRISA ^ 0x080
  bcf    STATUS, RP0

  call   Dlay5                  ;  Wait 20 msecs before Reset
  call   Dlay5
  call   Dlay5
  call   Dlay5

  bcf    STATUS, C              ;  Clear Carry (Instruction Out)
  movlw  0x03                   ;  Reset Command
  call   NybbleOut              ;  Send the Nybble
  call	 Dlay5			;  Wait 5 msecs before Sending Again

  EStrobe
  call	 Dlay160		;  Wait 160 usecs before Sending the Third Time

  EStrobe
  call	 Dlay160		;  Wait 160 usecs before Sending the Third Time

  bcf    STATUS, C              
  movlw  0x02                   ;  Set 4 Bit Mode
  call   NybbleOut              
  call	 Dlay160		

  movlw	 0x028			;  Note that it is a 2 Line Display
  call	 SendINS

  movlw	 0x008			;  Turn off the Display
  call	 SendINS

  movlw	 0x001			;  Clear the Display RAM
  call	 SendINS
  call	 Dlay5			;  Note, Can take up to 4.1 msecs

  movlw	 0x006			;  Enable Cursor Move Direction
  call	 SendINS

  movlw	 0x00C			;  Turn the LCD Back On
  call	 SendINS

  clrf	 FSR			;  Output the Message
OutLoop
  movf	 FSR, w			;  Get the Offset to Output
  incf	 FSR
  call	 Message
  iorlw	 0			;  At the End of the Message?
  btfsc	 STATUS, Z
   goto	 Loop			;  Yes - Equal to Zero
  call	 SendCHAR		;  Output the ASCII Character
  goto	 OutLoop

Loop				;  Loop Forever when Done
  goto   Loop


;  Subroutines
Message				;  Message to Output
  addwf	 PCL			;  Output the Characters
  dt	 "Hello", 0

SendCHAR			;  Send the Character to the LCD
  movwf	 Temp			;  Save the Temporary Value

  swapf	 Temp, w		;  Send the High Nybble
  bsf	 STATUS, C		;  RS = 1
  call	 NybbleOut

  movf	 Temp, w		;  Send the Low Nybble
  bsf	 STATUS, C
  call	 NybbleOut

  return

SendINS				;  Send the Instruction to the LCD
  movwf	 Temp			;  Save the Temporary Value

  swapf	 Temp, w		;  Send the High Nybble
  bcf	 STATUS, C		;  RS = 0
  call	 NybbleOut

  movf	 Temp, w		;  Send the Low Nybble
  bcf	 STATUS, C
  call	 NybbleOut

  return

NybbleOut			;  Send a Nybble to the LCD

  movwf	 NOTemp			;  Save the Nybble to Shift Out
  swapf	 NOTemp			;  Setup to Output to the High Part of the Byte

  movlw	 6			;  Clear the Shift Register
  movwf	 Dlay
NOLoop1
  ClockStrobe
  decfsz Dlay
   goto	 NOLoop1

  bsf	 Data			;  Put out the Gate Bit
  ClockStrobe
  bcf	 Data			;  Put out the RS Bit
  rlf	 PORTA
  ClockStrobe
  movlw	 4			;  Now, Shift out the Data
  movwf	 Dlay
NOLoop2
  rlf	 NOTemp			;  Shift Through the Nybble to Output
  bcf	 Data			;  Clear the Data Bit (which is the Clock)
  rlf	 PORTA			;  Shift the Carry into the Shift Register
  ClockStrobe
  decfsz Dlay
   goto	 NOLoop2

  EStrobe			;  Strobe out the LCD Data

  return


Dlay160                         ;  Delay 160 usecs

  movlw  256 - ( 160 / 4 )      ;  Loop Until Carry Set
  addlw  1
  btfss  STATUS, C
   goto  $-2

  return

Dlay5                           ;  Delay 5 msecs

  movlw  4                      ;  Set up the Delay
  movwf  Dlay
  movlw  256 - 0x0E8
  addlw  1
  btfsc  STATUS, Z
   decfsz Dlay
    goto $-3

  return


  end
However, if I wanted to do the same thing in assembly, I would just include the lcd.bas file by placing this line at the top of my code:

Code: Select all

Include "LCD.bas"
Then anytime I want to write on the display I put this little instruction:

Code: Select all

LCD.WriteAt(1,1,"Hello")
Basically LCD.WriteAt is an instruction within the lcd.bas file. This instruction takes care of writing whatever we want to the display. in this case we are saying "I want to display the word Hello on the display on the first line, from the first character" (this is what the 1,1 is telling us)

I am finding ALOT of useful information at http://www.digital-diy.com

This is another guy from Australia and knows alot about all sorts of programming languages. I was actually also in the Airforce with him a while back.

The program I am using to code is named SWORDFISH

You can download a free version, the only limit is that you can only have a maximum of 200 variables which really is ALOT of variables. None of my projects have used that much.

You can download swordfish from this link:
http://www.sfcompiler.co.uk/downloads/SwordfishSE.exe

You can also download the reference manual here (very handy!)
http://www.sfcompiler.co.uk/downloads/SFManual.pdf

Well that is all for now!

Mitchy
decided to stick around...
decided to stick around...
Posts: 30
Joined: Sun Jul 04, 2010 10:44 am
Location: Australia
Contact:

Post by Mitchy » Sun Jul 04, 2010 6:55 pm

Glad to see your steam rolling straight into SF Brad! All those years of Assembly will make the whole process much much easier.

I recently trimmed down down the PIC Tetris game that I made so that it will compile with the free version of Swordfish - that's a pretty good feat (169 bytes of RAM)

Image

User avatar
brad
Site Admin
Site Admin
Posts: 2578
Joined: Fri Mar 26, 2010 10:30 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Post by brad » Mon Jul 05, 2010 7:55 pm

Welcome to this humble forum :)

SF Basic is going great, I have just been experimenting here in the background when I get a little bit of time.

As always, I am using an LED matrix display with my current little project. I am actually working on my own version of pacman.

I still cannot get over the ease of use when coding in Basic! it is alot more fun than assembly.

Actually, in just a couple of hours I went from nothing, to having a mostly working engine for the pacman game. What I mean by that is, I have a system in place whereby you press up, down, left or right and your character (one led) moves one space in the desired direction. If the character reaches the middle of the screen and you want to keep moving in the same direction, it is then the screen that starts to move to reveal more of the level. Once the screen reaches the other extreme of the level, it is then the character that moves again.

So this allows me to have a 16x16 or 32x32 etc... game board and display it all on an 8x8 LED matrix.

I think it will be a fun game once completed and will have loads of levels, bad guys and of course pelets to munch up.

The one thing that will be interesting, is figuring out the artificial intelligence for the bad guys...

A youtube video will follow once I have it to a certain stage.

Thanks for all your help over in your forum and for the tutorials on your site :)

User avatar
nicolo86
semi-newbie
semi-newbie
Posts: 22
Joined: Fri Jul 02, 2010 4:54 am
Location: Switzerland
Contact:

Post by nicolo86 » Thu Jul 08, 2010 7:08 pm

Ok now that the basics are told, how do you make a small game for example the tetris Mitchy made ???

User avatar
brad
Site Admin
Site Admin
Posts: 2578
Joined: Fri Mar 26, 2010 10:30 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Post by brad » Thu Jul 08, 2010 11:23 pm

nicolo86 wrote:Ok now that the basics are told, how do you make a small game for example the tetris Mitchy made ???
here is the sourcecode (so far) for the pacman game I am working on. So far I have one level which is 32 x 32 pixels large. It displays the level 8 x 8 pixels at a time and you can move through the level using four push buttons. (up, down, left and right)

Code: Select all

Device = 18F4685         // Tell the compiler what chip we are using
Clock = 8                // Tell the compiler what we will be setting the clock to (Mhz)           
Config OSC = IRCIO67     // This tells the microcontroller to use the internal clock 

Include "utils.bas"      // we are including an extra file here which allows us to use shortcuts
                         // like "SetAllDigital" Which will take care of making all ports digital ports.                      

Const graphic_data(32) As LongWord = (%11111111111111111111111111111111, %10000000000000000000000000000001, %10111001110011100111001110011101, %10100000000000100100000000000101, %10100001000000100100000010000101, %10000101000000100100000010100001, %10000001000000000000000010000001, %10101111000011111111000011110101, %10100000000000000000000000000101, %10100000000000000000000000000101, %10100000000111100111100000000101, %10100000100000000000000100000101, %10000000100000000000000100000001, %10000000100100100100100100000001, %10000000100100100100100100000001, %10100000100100100100100100000101, %10111110000100111100100001111101, %10100000100100000000100100000101, %10000000100000000000000100000001, %10000000100000000000000100000001, %10000000100111100111100100000001, %10100000100000000000000100000101, %10100000000000000000000000000101, %10100000000000000000000000000101, %10101110000011111111000001110101, %10000010000000000000000001000001, %10001010000000100100000001010001, %10100010000000100100000001000101, 
%10100000000000100100000000000101, %10111001110011100111001110011101, %10000000000000000000000000000001, %11111111111111111111111111111111)                        
Const anodes(8) As Byte = (%00000001,%00000010,%00000100,%00001000,%00010000,%00100000,%01000000,%10000000) 

// variable declaration
Dim x As Byte
Dim current_graphic_byte As Byte
Dim old_graphic_byte As Byte
Dim frame_counter As Byte
Dim button_debounce As Byte
Dim car_data As Byte
Dim game_over As Byte
Dim crash_result As Byte
Dim shift_register As LongWord
Dim shift As Byte
Dim character_x As Byte
Dim character_y As Byte
Dim character_x_position As Byte
Dim wall_data As Byte
Dim wall_data_above As Byte
Dim wall_data_below As Byte
Dim wall_flags As Byte
Dim wall_up As wall_flags.0
Dim wall_down As wall_flags.1
Dim wall_left As wall_flags.2
Dim wall_right As wall_flags.3

// Port Setup
Dim up As PORTA.0
Dim down As PORTA.1
Dim left As PORTA.2
Dim right As PORTA.3

Dim common_anodes As PORTD
Dim green_cathodes As PORTB
Dim red_cathodes As PORTC

// Sub Routines
Sub draw_graphics()
    For x = 0 To 7
        common_anodes = anodes(x)
        shift_register = graphic_data(current_graphic_byte)
        Select shift
            Case 1
                shift_register = shift_register >> 1
            Case 2
                shift_register = shift_register >> 2
            Case 3
                shift_register = shift_register >> 3
            Case 4
                shift_register = shift_register >> 4
            Case 5
                shift_register = shift_register >> 5
            Case 6
                shift_register = shift_register >> 6
            Case 7
                shift_register = shift_register >> 7
            Case 8
                shift_register = shift_register >> 8
            Case 9
                shift_register = shift_register >> 9
            Case 10
                shift_register = shift_register >> 10
            Case 11
                shift_register = shift_register >> 11
            Case 12
                shift_register = shift_register >> 12
            Case 13
                shift_register = shift_register >> 13
            Case 14
                shift_register = shift_register >> 14
            Case 15
                shift_register = shift_register >> 15
            Case 16
                shift_register = shift_register >> 16
            Case 17
                shift_register = shift_register >> 17
            Case 18
                shift_register = shift_register >> 18
            Case 19
                shift_register = shift_register >> 19
            Case 20
                shift_register = shift_register >> 20
            Case 21
                shift_register = shift_register >> 21
            Case 22
                shift_register = shift_register >> 22
            Case 23
                shift_register = shift_register >> 23
            Case 24
                shift_register = shift_register >> 24
        End Select
        shift_register = shift_register Xor %11111111   // need to invert the data since we are using common cathodes
        green_cathodes = shift_register
        shift_register = shift_register Xor %11111111   // invert back to aid in checking for walls
        If x = character_y Then
            wall_data = shift_register                  // once we have found what data is in the same row as us, save it for later.
            red_cathodes = character_x
        ElseIf x = character_y + 1 Then
            wall_data_above = shift_register
        ElseIf x = character_y - 1 Then
            wall_data_below = shift_register            
        EndIf
        DelayMS(1)
        red_cathodes = %11111111
        green_cathodes = %11111111                               // clear the video ram before changing columns
        Inc(current_graphic_byte)
        If x = 7 Then                                            // reset back to the first column in this frame
            current_graphic_byte = old_graphic_byte
        EndIf
    Next          
End Sub  

Sub update_character()
    Select character_x_position
        Case 0
            character_x = %11111110
        Case 1
            character_x = %11111101
        Case 2
            character_x = %11111011
        Case 3
            character_x = %11110111
        Case 4
            character_x = %11101111
        Case 5
            character_x = %11011111
        Case 6
            character_x = %10111111
        Case 7
            character_x = %01111111
    End Select
End Sub

Sub check_buttons()
    If button_debounce = 0 And left = 0 And character_x_position < 3 And shift = 0 And wall_left = 0 Then
        Inc(character_x_position)
        button_debounce = 15
    ElseIf button_debounce = 0 And left = 0 And character_x_position > 3 And shift < 24 And shift > 0 And wall_left = 0 Then
        Inc(shift)
        button_debounce = 15
    ElseIf button_debounce = 0 And left = 0 And shift = 24 And character_x_position > 2  And character_x_position < 6 And wall_left = 0 Then
        Inc(character_x_position)
        button_debounce = 15
    ElseIf button_debounce = 0 And left = 0 And character_x_position = 3 And shift <> 24 And wall_left = 0 Then
        Inc(shift)
        button_debounce = 15
    ElseIf button_debounce = 0 And left = 0 And character_x_position = 4 And shift <> 24 And wall_left = 0 Then
        Inc(shift)
        button_debounce = 15
    EndIf
    

    If button_debounce = 0 And right = 0 And character_x_position > 4 And shift = 24 And wall_right = 0 Then
        Dec(character_x_position)
        button_debounce = 15
    ElseIf button_debounce = 0 And right = 0 And character_x_position < 4 And shift < 24 And shift > 0 And wall_right = 0 Then
        Dec(shift)
        button_debounce = 15
    ElseIf button_debounce = 0 And right = 0 And shift = 0 And character_x_position < 5 And character_x_position > 1 And wall_right = 0 Then
        Dec(character_x_position)
        button_debounce = 15
    ElseIf button_debounce = 0 And right = 0 And character_x_position = 4 And shift <> 0 And wall_right = 0 Then
        Dec(shift)
        button_debounce = 15
    ElseIf button_debounce = 0 And right = 0 And character_x_position = 3 And shift <> 0 And wall_right = 0 Then
        Dec(shift)
        button_debounce = 15
    EndIf     
    
    If button_debounce = 0 And up = 0 And character_y < 3 And current_graphic_byte = 0 And wall_up = 0 Then
        Inc(character_y)
        button_debounce = 15
    ElseIf button_debounce = 0 And up = 0 And character_y > 3 And current_graphic_byte < 24 And current_graphic_byte > 0 And wall_up = 0 Then
        Inc(current_graphic_byte)
        Inc(old_graphic_byte)
        button_debounce = 15
    ElseIf button_debounce = 0 And up = 0 And current_graphic_byte = 24 And character_y > 2  And character_y < 6 And wall_up = 0 Then
        Inc(character_y)
        button_debounce = 15
    ElseIf button_debounce = 0 And up = 0 And character_y = 3 And current_graphic_byte <> 24 And wall_up = 0 Then
        Inc(current_graphic_byte)
        Inc(old_graphic_byte)
        button_debounce = 15
    ElseIf button_debounce = 0 And up = 0 And character_y = 4 And current_graphic_byte <> 24 And wall_up = 0 Then
        Inc(current_graphic_byte)
        Inc(old_graphic_byte)
        button_debounce = 15
    EndIf
    
    If button_debounce = 0 And down = 0 And character_y > 4 And current_graphic_byte = 24 And wall_down = 0 Then
        Dec(character_y)
        button_debounce = 15
    ElseIf button_debounce = 0 And down = 0 And character_y < 4 And current_graphic_byte < 24 And current_graphic_byte > 0 And wall_down = 0 Then
        Dec(current_graphic_byte)
        Dec(old_graphic_byte)
        button_debounce = 15
    ElseIf button_debounce = 0 And down = 0 And current_graphic_byte = 0 And character_y < 5  And character_y > 1 And wall_down = 0 Then
        Dec(character_y)
        button_debounce = 15
    ElseIf button_debounce = 0 And down = 0 And character_y = 4 And current_graphic_byte <> 0 And wall_down = 0 Then
        Dec(current_graphic_byte)
        Dec(old_graphic_byte)
        button_debounce = 15
    ElseIf button_debounce = 0 And down = 0 And character_y = 3 And current_graphic_byte <> 0 And wall_down = 0 Then
        Dec(current_graphic_byte)
        Dec(old_graphic_byte)
        button_debounce = 15
    EndIf             
End Sub

Sub debounce_buttons()
    If button_debounce <> 0 Then
        Dec(button_debounce)
    EndIf
End Sub

Sub check_for_walls()
    For x = 0 To 7 
        If character_x_position = x Then
            If wall_data_above.bits(x) = 1 Then
                wall_up = 1
            ElseIf wall_data_above.bits(x) = 0 Then
                wall_up = 0
            EndIf
            If wall_data_below.bits(x) = 1 Then
                wall_down = 1
            ElseIf wall_data_below.bits(x) = 0 Then
                wall_down = 0
            EndIf
        EndIf
    Next
                    
    For x = 0 To 6
        If character_x_position = (x) And wall_data.bits(x + 1) = 1 Then           // these first two check for
            wall_left = 1                                                               // walls to the left
        ElseIf character_x_position = (x) And wall_data.bits(x + 1) = 0 Then                                              
            wall_left = 0
        ElseIf character_x_position = (x + 1) And wall_data.bits(x) = 1 Then       // these next two check for walls
            wall_right = 1                                                              // to the right
        ElseIf character_x_position = (x + 1) And wall_data.bits(x) = 0 Then
            wall_right = 0
        EndIf
    Next
End Sub 

// Start Of Program...
OSCCON = %01111111                  // Sets the internal oscillator for 8Mhz
SetAllDigital                       // Make all Pins digital I/O's
TRISD = %00000000                   // Make all PORTB pins outputs (even though we only need PORTB, 0)
TRISB = %00000000
TRISA = %11111111
TRISC = %00000000

character_x_position = 1
character_y = 1
green_cathodes = %11111111
red_cathodes = %11111111
current_graphic_byte = 0
old_graphic_byte = current_graphic_byte
frame_counter = 20
button_debounce = 20
car_data = %00001000
game_over = 0
shift = 0
wall_flags = 0

// Main Loop
While True()                        // This creates an infinite loop
    draw_graphics
    update_character
    check_buttons
    debounce_buttons
    check_for_walls
Wend                                  // Loop back to the while loop as long as we havent finished.

User avatar
nicolo86
semi-newbie
semi-newbie
Posts: 22
Joined: Fri Jul 02, 2010 4:54 am
Location: Switzerland
Contact:

Post by nicolo86 » Fri Jul 09, 2010 2:39 am

Is the Pac Man project for the LEDBOY?

User avatar
brad
Site Admin
Site Admin
Posts: 2578
Joined: Fri Mar 26, 2010 10:30 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Post by brad » Fri Jul 09, 2010 8:24 pm

It will certainly work on the LEDBOY.

I am actually modifying the LEDBOY to make it simpler. I am just waiting on the parts.

User avatar
nicolo86
semi-newbie
semi-newbie
Posts: 22
Joined: Fri Jul 02, 2010 4:54 am
Location: Switzerland
Contact:

Post by nicolo86 » Fri Jul 09, 2010 9:15 pm

Cool.

User avatar
bitfogav
Moderator
Moderator
Posts: 915
Joined: Sun Mar 28, 2010 9:03 pm
Location: United Kingdom
Contact:

Post by bitfogav » Wed Jul 14, 2010 3:48 am

Hey Brad looks like you have learnt alot already of the new pic basic language, How have you learnt the new language? reading books or just what you can find on the internet?? :)

User avatar
brad
Site Admin
Site Admin
Posts: 2578
Joined: Fri Mar 26, 2010 10:30 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Post by brad » Thu Jul 15, 2010 7:42 am

The good people over at http://www.digital-diy.com have been an amazing help.

They have some really good code examples / tutorials and a great forum.

The thing is, since I already knew a programming language already, it is a very straight forward transition. I just needed to find out what words to use and in what format etc...

But once I spent a few days looking into the intricacies of the new language - I was then off and racing. I really am doing things now that I really would have no clue of how to do in assembly. It is a really fun language to program in!

FreeThinker
decided to stick around...
decided to stick around...
Posts: 25
Joined: Mon Aug 02, 2010 1:13 am
Location: UK
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Post by FreeThinker » Tue Aug 10, 2010 8:58 pm

Hi Brad
Just downloaded SF and gave it a run out, nice! Did you know that it supports an isis (Proteus) plugin?Compile your code and it loads it into Isis and runs it all from a single click.You can use the predefined development boards or make your own.Shame it only supports 18f series, still very nice.
P.S. Mechanique the developers are only about 20 miles from where I live...small world :o
Machines were mice and men were Lions once upon a time........But now that it's the opposite its twice upon a time. MooNDoG

User avatar
brad
Site Admin
Site Admin
Posts: 2578
Joined: Fri Mar 26, 2010 10:30 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Post by brad » Tue Aug 10, 2010 10:06 pm

FreeThinker wrote:Hi Brad
Just downloaded SF and gave it a run out, nice! Did you know that it supports an isis (Proteus) plugin?Compile your code and it loads it into Isis and runs it all from a single click.You can use the predefined development boards or make your own.Shame it only supports 18f series, still very nice.
P.S. Mechanique the developers are only about 20 miles from where I live...small world :o
It's a nice piece of software isnt it!

It's quite straight forward to use and basic is such a nice language.

I had no idea about the plugin - where is that located / how do you access it?

Apparently they are developing a 24f series compiler but unsure of the release date.

User avatar
bitfogav
Moderator
Moderator
Posts: 915
Joined: Sun Mar 28, 2010 9:03 pm
Location: United Kingdom
Contact:

Post by bitfogav » Wed Aug 11, 2010 4:08 am

I purchased the full version of SF as I liked it that much :)

Its alot easier than assembly once you've learnt the syntax.

User avatar
brad
Site Admin
Site Admin
Posts: 2578
Joined: Fri Mar 26, 2010 10:30 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Post by brad » Wed Aug 11, 2010 6:02 am

bitfogav wrote:I purchased the full version of SF as I liked it that much :)

Its alot easier than assembly once you've learnt the syntax.
How much did that cost? I have been planning on buying the full version because I want to use SD cards with my projects and it requires a buffer or 512 bytes. (the free version limits you to 200) which is still heaps!

Maybe using SD cards on your 24 x 24 matrix would be an option?

User avatar
bitfogav
Moderator
Moderator
Posts: 915
Joined: Sun Mar 28, 2010 9:03 pm
Location: United Kingdom
Contact:

Post by bitfogav » Wed Aug 11, 2010 8:58 am

Well it cost me quite abit £100 (170 Aus dollars) it was either that or I was thinking of getting that Proteus simulation software, but decided to go for swordfish :), as you get free updates through the software and then there is the additional modules

MMC/SD cards

USB

(both of which is what I want to look into and maybe add both to my 24x24 matrix)

And then theres also no limits to the RAM available during compilation.
You get a little usb stick which is some sort of security device which needs to be in your PC or Laptop before it will allow swordfish to run.

Heres a link for the swordfish plugins
http://www.sfcompiler.co.uk/wiki/pmwiki ... er.Plugins

Post Reply
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Who is online

Users browsing this forum: No registered users and 2 guests