Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 11:55 20 May 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Firewing or VB.net for PIC24HJ

     Page 1 of 4    
Author Message
vasi

Guru

Joined: 23/03/2007
Location: Romania
Posts: 1697
Posted: 08:05am 31 May 2013
Copy link to clipboard 
Print this post

Hi guys,

It is worth checking Firewing site, it is a nice project from David Baker, the author of Swordfish BASIC for PIC18 microcontrollers.

This time, David is copying the model of Amicus18, and come with a PIC24HJ128GP502 based board in Arduino form factor, accompanied by a free, unlimited language, Visual Basic for .Net. The compiled project is uploaded on board via USB,

You have to buy the board, but you can download the compiler and make your own board as everything is available for download (schematic and bootloader sources).

[quote]You can program a Firewing board in pretty much any language that supports 16 bit Microchip devices, but here at the nest we like to use the Firewing language. The language syntax is similar to that used by VB.NET, so it's really easy to use. Don't let the fact that it based on the VB.NET syntax fool you, the Firewing compiler does not generate interpreted code! It's a true compiler, based around the powerful GCC toolsuite. If you have any questions or would like to know more about Firewing, then please get in touch via the forum. If you would like to make a contribution to this site, for example, write and article or post some sample code, then you can find instruction on how to do so here. Any contributions you can make would be most welcome.[/quote]





Hobbit name: Togo Toadfoot of Frogmorton
Elvish name: Mablung Miriel
Beyound Arduino Lang
 
vasi

Guru

Joined: 23/03/2007
Location: Romania
Posts: 1697
Posted: 05:59am 15 Mar 2014
Copy link to clipboard 
Print this post

A language to rule them all? Well, almost. The last beta, apart from providing PIC24 and PIC32 support, it come also with support for PIC18. How neat is that? To all Pickit programmer owners interested in VB.Net for PICs, go get the latest beta 1.0.0.3 (B20) 'cause it is a compiler and if you don't have a bootloader, you will need the programmer.
Hobbit name: Togo Toadfoot of Frogmorton
Elvish name: Mablung Miriel
Beyound Arduino Lang
 
atmega8

Guru

Joined: 19/11/2013
Location: Germany
Posts: 712
Posted: 06:17am 15 Mar 2014
Copy link to clipboard 
Print this post

Vasi,

i own a UBW 32 and a Pickit 3 Programmer.
Is it possible to use this Environment" to Programm the 32 bit Pic in Firewing language??

Witch steps do i have to follow?

THX,

very interesting!!!

Dietmar
 
vasi

Guru

Joined: 23/03/2007
Location: Romania
Posts: 1697
Posted: 07:14am 15 Mar 2014
Copy link to clipboard 
Print this post

The main objective of David Baker is to sponsor his own efforts by selling Firewing boards. Still, Chipkit UNO board is supported off the shelf. For others is possible by changing the microcontroller and installing a Microchip toolchain (the default ones are prepared by David for a certain number of microcontrollers) but you are on your own, unless you support David by buying one of his boards (as his client, he will help you, but don't abuse - you have to become a researcher).

Here is the official support for PIC32MX150F128B and Chipkit UNO.

Anyway, here are instructions for the other pic32 microcontrollers.

Scan his forums and Wiki, you have everything there.


Hobbit name: Togo Toadfoot of Frogmorton
Elvish name: Mablung Miriel
Beyound Arduino Lang
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3678
Posted: 07:37am 15 Mar 2014
Copy link to clipboard 
Print this post

Quick question: is it really VB.net or a look alike? Microsoft's actual code or a re-write?

Which version of VB.net? They keep being mutually incompatible!

John
 
atmega8

Guru

Joined: 19/11/2013
Location: Germany
Posts: 712
Posted: 07:42am 15 Mar 2014
Copy link to clipboard 
Print this post

mhh,

the 32MX795F512L is supported (UBW32 Controller Board) but i was not able to include it...

How to??

Device = 32MX795F512L

But where in the die/code ??

Next step would be to compile it , and then load the code via Pickit 3 ???

Help needed ;-)
 
vasi

Guru

Joined: 23/03/2007
Location: Romania
Posts: 1697
Posted: 07:45am 15 Mar 2014
Copy link to clipboard 
Print this post

Microchip has nothing to do with the project so, you can't talk about any of his versions. Firewing come with VB.Net (man, just browse his website) in the same manner as Great Cow Basic (and FreeBasic) come with QBasic.

Dietmar, I should add that your UWB32 microcontroller is indeed supported by the official Firewing32 (I had to look into his subfolders).
Hobbit name: Togo Toadfoot of Frogmorton
Elvish name: Mablung Miriel
Beyound Arduino Lang
 
vasi

Guru

Joined: 23/03/2007
Location: Romania
Posts: 1697
Posted: 07:53am 15 Mar 2014
Copy link to clipboard 
Print this post

Dietmar, just look for some samples for PIC24 - look inside
c:\ProgramData\Mecanique\Firewing\Samples\ if you have Win7 or bigger.

You should just change the device, adapt the sample to your pins (start with a LED blink) and you should be able to compile. Everything I know now are by browsing the Wiki, the forum, and Firewing folders.




As a last resort, forums are always open (this thing will increase in popularity).Edited by vasi 2014-03-16
Hobbit name: Togo Toadfoot of Frogmorton
Elvish name: Mablung Miriel
Beyound Arduino Lang
 
atmega8

Guru

Joined: 19/11/2013
Location: Germany
Posts: 712
Posted: 08:13am 15 Mar 2014
Copy link to clipboard 
Print this post



one or more Errors ....

But the gives no further datails ;-(((( poor







' import required modules...
Device = 32MX795F512L
Imports OW
Imports DS18B20

' DS18B20 is available flag
Dim DS18B20_Available As Boolean = False

' the event is triggered each time the OW module is asked to
' perform a search - in this example, we are going to be looking
' for an DS18B20 device, which has a family ID of 0x28 (owDS18B20)...
Sub OnDeviceFound(command As Byte, family As Byte, ByRef pROMID() As Byte, ByRef pAbort As Boolean) Handles OW.OnSearch
If command = owSearchROM And family = DS18B20.Family Then
DS18B20_Available = True ' mark as available
DS18B20.ROMID = pROMID ' set the unique ROM id...
pAbort = True ' no more searching required
End If
End Sub

' main entry point...
Sub Main()
' look for a device...
OW.Search(owSearchROM)

' if found, continue...
If DS18B20_Available Then
DS18B20.SetResolution(Resolution.Is10Bit)
While True
DS18B20.Convert()
Console.Write(DS18B20.AsString, " °C", 13, 10)
DelayMS(1000)
End While
End If
End Sub
 
vasi

Guru

Joined: 23/03/2007
Location: Romania
Posts: 1697
Posted: 09:35am 15 Mar 2014
Copy link to clipboard 
Print this post

I get also errors when I set the compiler to Firewing32 and Chipkit MAX32...
For CHipkit UNO is compiling just fine. Then, I looked inside

c:\ProgramData\Mecanique\Firewing\Includes\

You will see that there are no files for the desired microcontroller.
A solution may be here, but I won't pursue it further as I have some problems with my Windows - I will let this for another time (I also have a cold which makes me a little tired).
Edited by vasi 2014-03-16
Hobbit name: Togo Toadfoot of Frogmorton
Elvish name: Mablung Miriel
Beyound Arduino Lang
 
vasi

Guru

Joined: 23/03/2007
Location: Romania
Posts: 1697
Posted: 11:18am 15 Mar 2014
Copy link to clipboard 
Print this post

Solved!

After including the PIC32MX795F512L device .BAS file (generated with sysgen32.exe) in the Include folder, I get the same error as you. Changing the compiler from Firewing32 to Microchip32, the program compiles just fine. The only "error" is that the code size is not displayed correctly but this is an old bug, not sure if it happens only on my PC.
Hobbit name: Togo Toadfoot of Frogmorton
Elvish name: Mablung Miriel
Beyound Arduino Lang
 
JohnL
Senior Member

Joined: 10/01/2014
Location: Seychelles
Posts: 128
Posted: 02:51pm 15 Mar 2014
Copy link to clipboard 
Print this post

Thanks Vasi,

Firewing looks very promising as a modern and complete Basic compiler.
Support for PIC32 variants is absolutely awesome.

How does it compile Basic code?

Have you done any speed benchmark comparisons with C, on the same processor?

Would be interesting to see how fast and efficient in memory usage it is?

Cheers
JohnL
 
JohnL
Senior Member

Joined: 10/01/2014
Location: Seychelles
Posts: 128
Posted: 04:03pm 15 Mar 2014
Copy link to clipboard 
Print this post

Looking at further information on Firewing site and forum, and Microchip data sheets.

Main board from Firewing that includes PIC24HJ128GP502 16bit processor (in DIL socket) is pin compatible with PIC32MX150 28 pin DIP processor as used for micromite.

Have ordered a Firewing main board from Core Electronics to play with.

https://core-electronics.com.au/store/index.php/development- tools/firewing/firewing-board.html

Should be fantastic to have one modern and powerful (VB.Net based) Basic compiler that covers PIC 18, 24 and 32 processors.
 
vasi

Guru

Joined: 23/03/2007
Location: Romania
Posts: 1697
Posted: 02:32am 16 Mar 2014
Copy link to clipboard 
Print this post

Hi JohnL,

You should have mentioned in your order that you want a Firewing R2 board!
About the compilation and program speed, you don't have to worry: the FirewingIDE translate your BASIC code into C language code which is then compiled by one of Microchip compilers. This is true for PIC24 and PIC32. The limitations come from those compilers only.

For PIC18, things are different. You must know that David Barker is the author of Swordfish Basic compiler for PIC18 and that the same mechanism is used here in Firewing to compile code for 4 microcontrollers only: PIC18Fx5K22 and PIC18Fx6K22. The BASIC code is translated into assembler and compiled by the Microchip assembler. Why only 4? Well, David must protect his Swordfish BASIC compiler. Anyway, these 4 microcontrollers are the most recent microcontrollers from Microchip and are set to work at 64MHz, and that means 16MIPS (equal to Arduino).

Keep in mind that this is still a beta product and I strongly advice you to became a member of Firewing forums - unless we can convince David to became a regular of The Back Shed forums as Geoff is.

IMPORTANT! You won't have PIC32 support in an R1 board. Anyway, a PIC24 allows you double the space for your program (yep, you will be able to fit twice as much code) at a still reasonable speed. Edited by vasi 2014-03-17
Hobbit name: Togo Toadfoot of Frogmorton
Elvish name: Mablung Miriel
Beyound Arduino Lang
 
atmega8

Guru

Joined: 19/11/2013
Location: Germany
Posts: 712
Posted: 05:01am 16 Mar 2014
Copy link to clipboard 
Print this post

Yasni,

where did you change from firewing32 to microchip32?

I'can't find this Option,only firewing 8/16 or 32...

THX


  vasi said   Solved!

After including the PIC32MX795F512L device .BAS file (generated with sysgen32.exe) in the Include folder, I get the same error as you. Changing the compiler from Firewing32 to Microchip32, the program compiles just fine. The only "error" is that the code size is not displayed correctly but this is an old bug, not sure if it happens only on my PC.
Edited by atmega8 2014-03-17
 
vasi

Guru

Joined: 23/03/2007
Location: Romania
Posts: 1697
Posted: 05:07am 16 Mar 2014
Copy link to clipboard 
Print this post

First, you have to install Microchip xc32 on your PC - that is the first step.
The second, is to ... but everything is here, in this page. Read carefully!
Hobbit name: Togo Toadfoot of Frogmorton
Elvish name: Mablung Miriel
Beyound Arduino Lang
 
atmega8

Guru

Joined: 19/11/2013
Location: Germany
Posts: 712
Posted: 09:01am 16 Mar 2014
Copy link to clipboard 
Print this post

THX,

it compiles now without Errors.
Next step is to burn it into the UBW32...

Hope to find some Time for it in the next days..


  vasi said   First, you have to install Microchip xc32 on your PC - that is the first step.
The second, is to ... but everything is here, in this page. Read carefully!
 
vasi

Guru

Joined: 23/03/2007
Location: Romania
Posts: 1697
Posted: 09:37am 16 Mar 2014
Copy link to clipboard 
Print this post

  atmega8 said   THX,

it compiles now without Errors.
Next step is to burn it into the UBW32...


Take care Dietmar. Before doing that, you have to have all the answers:
- for what bootloader is that code compiled?
- is there any way to set the code for an arbitrary bootloader?
- we can have the code compiled without considering a bootloader? Then, how we set the configuration bits?

And so on... If I remember right, on the forum were those kind of questions ...
If you learn something new and have positive results, I would really like to read about it! Thank you in advance!

Vasi
Hobbit name: Togo Toadfoot of Frogmorton
Elvish name: Mablung Miriel
Beyound Arduino Lang
 
atmega8

Guru

Joined: 19/11/2013
Location: Germany
Posts: 712
Posted: 10:12am 16 Mar 2014
Copy link to clipboard 
Print this post

Hi Vasi,

i was able to load a compiled (nonsense) Programm via Mplab IPE and Pickit 3.

I'am new to the PIC's, know the AVR's with it's fusebits etc.....

Is it not possible to make a simple Programm that toggle's some LED's on the UBW without a Bootloader?

Do i have to set configuration bit's?
I know nearly nothing about this for now.

Hope this new stuff is not to complicated for me.

If i can toggle some LED's this would be the first step into the new world.
Like i did it "some years ago" with the 6502 an Z80......;-)


Dietmar





  vasi said  
  atmega8 said   THX,

it compiles now without Errors.
Next step is to burn it into the UBW32...


Take care Dietmar. Before doing that, you have to have all the answers:
- for what bootloader is that code compiled?
- is there any way to set the code for an arbitrary bootloader?
- we can have the code compiled without considering a bootloader? Then, how we set the configuration bits?

And so on... If I remember right, on the forum were those kind of questions ...
If you learn something new and have positive results, I would really like to read about it! Thank you in advance!

Vasi
 
vasi

Guru

Joined: 23/03/2007
Location: Romania
Posts: 1697
Posted: 05:54pm 16 Mar 2014
Copy link to clipboard 
Print this post

  atmega8 said   Hi Vasi,

i was able to load a compiled (nonsense) Programm via Mplab IPE and Pickit 3.


Yeah, I think it compiles for the Chipkit MAX32 bootloader...

If you rush into using PIC32 (I would like to hear why you are not going for AVR32 - one reason I think of is that you used BASCOM on AVR) at full capacity using a compiler, right now you have few options:

1. Considering that you have already a UBW32 board, the best option is to use Arduino language in programming it (MPIDE is free) but you have to do the effort in learning a new language (just study the huge amount of examples , tutorials and projects and you will figure it in no time). Anyway, is the best option because MPIDE supports the UBW32 bootloader (you can buy the Chipkit boards who can be used also with Firewing when it will go out of beta).

2. Buy (once for your entire life) the mikroBASIC for PIC32 and you can program your board without bootloader. The advantage is that you have a huge collection of subroutines and functions for all sort of things - the best IDE on the market, a great forum and a libstock of user libraries. You won't have to worry about the new microcontrollers as your compiler is permanently upgraded for free.

3. Either have patience until Firewing will go out of beta and the number of forum members will increase (user support fot unofficial boards), or buy a board officially supported (including Chipkit UNO) and start using the language immediately.

Other options are starting to get more complicated. On the option nr. 2, you will have to learn about configuration bits.
I consider option nr.1 the best if the price is a concern.
Hobbit name: Togo Toadfoot of Frogmorton
Elvish name: Mablung Miriel
Beyound Arduino Lang
 
     Page 1 of 4    
Print this page
© JAQ Software 2024