Swordfish board for Arduino - work in progress
Moderators: Chuckt, Garth, bitfogav
Swordfish board for Arduino - work in progress
Hi guys,
I've been working on a Swordfish board with an Arduino footprint, so it should work with Arduino/Firewing shields and DigiPixel
It is still a work in progress so it might take a few versions to get it right.
I'm thinking of using a Swordfish version bootloader, which will make it easier to programme the board via HID usb and using Microchips HID bootloader software..
I've been working on a Swordfish board with an Arduino footprint, so it should work with Arduino/Firewing shields and DigiPixel
It is still a work in progress so it might take a few versions to get it right.
I'm thinking of using a Swordfish version bootloader, which will make it easier to programme the board via HID usb and using Microchips HID bootloader software..
- Attachments
-
- Swordfish board
- SF_Arduino_3D.jpg (43.6 KiB) Viewed 26945 times
If you don't know what Voltage your country is using, you shouldn't be doing electronics
- brad
- 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
Re: Swordfish board for Arduino - work in progress
I should have logged in and seen this earlier!
This is fantastic Gav! I want one! Do you think it would be worth while me getting a quote from my manufacturer to get maybe 50 or 100 of these things made? Swordfish is an amazing IDE. I have been using it for my power meter project and man it is nice, it flows so beautifully and I know I said that I like Arduino, but I guess that's because I got used to it. Swordfish is the best. But it's kind of bitter sweet because I know that I am using a piece of software that is 'almost' dead.
What Microcontroller have you got planned for this board?
This is fantastic Gav! I want one! Do you think it would be worth while me getting a quote from my manufacturer to get maybe 50 or 100 of these things made? Swordfish is an amazing IDE. I have been using it for my power meter project and man it is nice, it flows so beautifully and I know I said that I like Arduino, but I guess that's because I got used to it. Swordfish is the best. But it's kind of bitter sweet because I know that I am using a piece of software that is 'almost' dead.
What Microcontroller have you got planned for this board?
Re: Swordfish board for Arduino - work in progress
Yes indeed I have had a few people already interested in getting one! And I think Swordfish needs an easy to use development board. I don't think Arduino is going anywhere for awhile with the amount of add-on boards on the market so this sort of thing with the Arduino footprint should be a great tool!..
Thank you for the offer of getting a quote from your manufacturer, that maybe something we could look into, dependsing what direction this board ends up in..
The Microcontroller I looked at using was the 18F46J50, it's a 3.3v device with USB and it has PPS (Peripheral Pin Select)
which would make arranging the board pins easier, the only problem with this is that not all pins are 5v tolerant.
So I've decided for this first prototype to use a 5v Microcontroller and my favourite 18F4550 I may even make the board optional for a 3.3v or 5v device and include some solder tags which would allow the user to select which Microcontroller they wanted to use?.
Well the board design has been sent to be manufactured, so I shall be receiving them soon. the next part will be the best part, the software
Thank you for the offer of getting a quote from your manufacturer, that maybe something we could look into, dependsing what direction this board ends up in..
The Microcontroller I looked at using was the 18F46J50, it's a 3.3v device with USB and it has PPS (Peripheral Pin Select)
which would make arranging the board pins easier, the only problem with this is that not all pins are 5v tolerant.
So I've decided for this first prototype to use a 5v Microcontroller and my favourite 18F4550 I may even make the board optional for a 3.3v or 5v device and include some solder tags which would allow the user to select which Microcontroller they wanted to use?.
Well the board design has been sent to be manufactured, so I shall be receiving them soon. the next part will be the best part, the software
If you don't know what Voltage your country is using, you shouldn't be doing electronics
- brad
- 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
Re: Swordfish board for Arduino - work in progress
Nice work Gav, keep me updated on not only the PCB but the software
I know on Arduino's (or some of them at least) there are jumpers on the board that allow you to select between 3.3v and 5v. But I have to admit, I am a little bit 'old school' and much prefer to use 5v devices. USB is 5v and there are loads of TTL chips that I like to interface to my projects, so 5v is nice and easy. Having said that. I am pretty sure the electronics community will probably shift over to 3.3v / 3.6v eventually...
By the way - the 18f4550 is one of my favourite chip too!
I know on Arduino's (or some of them at least) there are jumpers on the board that allow you to select between 3.3v and 5v. But I have to admit, I am a little bit 'old school' and much prefer to use 5v devices. USB is 5v and there are loads of TTL chips that I like to interface to my projects, so 5v is nice and easy. Having said that. I am pretty sure the electronics community will probably shift over to 3.3v / 3.6v eventually...
By the way - the 18f4550 is one of my favourite chip too!
Re: Swordfish board for Arduino - work in progress
Well it's been a few weeks and I thought I would share what I have so far with this prototype board..
The pcb board arrived last week from iTeadstudio.com, and I couldn't wait to get one made up and get on with some programming and testing!.
Some example images of the board: I have a working Swordfish bootloader firmware on the board, which makes it so easy to upload new programmes to the board via USB.
The board contains several leds to indicate if the board is in Bootloader mode and the good old arduino D13 led and a button.
The pcb board arrived last week from iTeadstudio.com, and I couldn't wait to get one made up and get on with some programming and testing!.
Some example images of the board: I have a working Swordfish bootloader firmware on the board, which makes it so easy to upload new programmes to the board via USB.
The board contains several leds to indicate if the board is in Bootloader mode and the good old arduino D13 led and a button.
If you don't know what Voltage your country is using, you shouldn't be doing electronics
Re: Swordfish board for Arduino - work in progress
Heres an example of the first led flash programme running on the board with the bootloader uploaded.
And I have also put together a DigiPixel swordfish library and I have DigiPixel running on this prototype board
Code: Select all
// bitfogav sf board hardware
Device = 18F4550
Clock = 48
Config
FOSC = HSPLL_HS, ' External 20MHz xtal
PLLDIV = 5,
CPUDIV = OSC1_PLL2, ' 48MHz cpu clock
USBDIV = 2, ' 48MHz usb clock
FCMEN = OFF,
IESO = OFF,
PWRT = ON,
BOR = OFF,
BORV = 2,
VREGEN = ON,
WDT = OFF,
MCLRE = ON
' include module for sf board...
Include "SFBoard.bas"
' build for bootloader operation
#option org_reset = $001000
' note: include system.bas first before any other files
' this is VERY important if you're using a bootloader (requires system.bas V1.4 or later)
' be sure to set any system.bas WDT options prior to including the file
Include "system.bas"
' init_pic() - setup IO pins...
Sub init_pic()
TRISA = %00000000 ' all outputs
TRISB = %00000000 ' all outputs
TRISC = %00110100 ' D+ and D- are inputs
TRISD = %00111100 ' leds and PB_SWITCH input
ADCON1 = %00001111 ' all digital (disable A/D on all pins)
CMCON = %00000000 ' disable comparators
CVRCON = $00 ' and turn off reference
PORTA = $00 ' PORTA outputs Low
PORTB = $00 ' PORTB outputs Low
PORTC = $00 ' PORTC outputs Low
PORTD = $00
End Sub
' main entry point
init_pic()
' main program loop...
While (true)
Toggle(D13)
DelayMS(500)
End While
And I have also put together a DigiPixel swordfish library and I have DigiPixel running on this prototype board
If you don't know what Voltage your country is using, you shouldn't be doing electronics
- brad
- 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
Re: Swordfish board for Arduino - work in progress
Sorry to be late back here Gav.
But now that I'm back, this is all looking good!
I'm just trying to get my head around the boot loader. Do you load the pic with the boot loader via a pickit2 (or similar) and then what software do you use to upload hex files to the device?
But now that I'm back, this is all looking good!
I'm just trying to get my head around the boot loader. Do you load the pic with the boot loader via a pickit2 (or similar) and then what software do you use to upload hex files to the device?
Re: Swordfish board for Arduino - work in progress
Yes you load the bootloader onto the chip via the icsp (pickit2), connect up a usb to the micro usb connector and then put the board into "programme mode" by resetting the board using the on board pgm button & reset button.brad wrote:I'm just trying to get my head around the boot loader. Do you load the pic with the boot loader via a pickit2 (or similar) and then what software do you use to upload hex files to the device?
You can now use microchips HID bootloader software to load your hex file onto the board.
So basically you could supply the board with the bootloader installed and the user doesn't need a pickit2 to programme the device. I hope that makes a bit more sense?.
The microchip software looks like this:
If you don't know what Voltage your country is using, you shouldn't be doing electronics
- brad
- 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
Re: Swordfish board for Arduino - work in progress
I like it! Im going to have to test this thing out. Any chance you could post some links to downloads?
Also is there any other way of putting it in boot loader mode or do you have to press the buttons? I.e. could it detect a USB connection upon the microcontroller starting up?
Also is there any other way of putting it in boot loader mode or do you have to press the buttons? I.e. could it detect a USB connection upon the microcontroller starting up?
Re: Swordfish board for Arduino - work in progress
The best thing to do is download Swordfish USB Library v1.4.2 that Jerry has done here. It includes microchips HID App (inc C# source), and you can also find Jerry's examples for USB, And ported Swordfish bootloader within the download file..brad wrote:Any chance you could post some links to downloads?
Note: there are a few bugs in the usb version v1.4.2 that can be easily fixed here.
Not that I know of?, maybe you could modify the bootloader to wait for a period of time for any USB packets. If not, the bootloader times out and runs the user code?.brad wrote:Also is there any other way of putting it in boot loader mode or do you have to press the buttons? I.e. could it detect a USB connection upon the microcontroller starting up?
Or Have the bootloader check for reset, more info here.
It would be a lot easier to use a RS232 chip, as I'm sure you know like the PicNDuino boards?.
If you don't know what Voltage your country is using, you shouldn't be doing electronics
- brad
- 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
Re: Swordfish board for Arduino - work in progress
Thanks again Gav!
I'll add it to my ever increasing list of projects to-do!
I'll add it to my ever increasing list of projects to-do!
Re: Swordfish board for Arduino - work in progress
That must be a BIG list by now!! haha....brad wrote:I'll add it to my ever increasing list of projects to-do!
If you don't know what Voltage your country is using, you shouldn't be doing electronics
- brad
- 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
Re: Swordfish board for Arduino - work in progress
Yes, yes it is...
In fact, I just received an order of tiny little OLED displays from buy display.com (they are so cheap!) and I also bought a couple of touch screens too. I really have no project to use them in but it's on the list of to-dos as well!
In fact, I just received an order of tiny little OLED displays from buy display.com (they are so cheap!) and I also bought a couple of touch screens too. I really have no project to use them in but it's on the list of to-dos as well!
Re: Swordfish board for Arduino - work in progress
I do the same Brad, I see something that looks great and I buy it!. then when it comes it gets put into my box of things to do!!brad wrote:In fact, I just received an order of tiny little OLED displays from buy display.com (they are so cheap!) and I also bought a couple of touch screens too. I really have no project to use them in but it's on the list of to-dos as well!
I just wanted to add a bit more info on your question above Brad, this is a quote that I have read from DD about detecting a USB connection.brad wrote:Also is there any other way of putting it in boot loader mode or do you have to press the buttons? I.e. could it detect a USB connection upon the microcontroller starting up?
So if you use the USB connection, you could detect it and run bootloader mode?, this sounds like a good idea and I might have to test this out!If you're self-powered, you should connect the +5V from the USB connector to an input pin so you can monitor when the USB cable gets plugged/unplugged from the host. I usually use a simple voltage divider (for protection), plus it pulls the pin low when you're not connected so it doesn't float.
If you don't know what Voltage your country is using, you shouldn't be doing electronics
- brad
- 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
Re: Swordfish board for Arduino - work in progress
Thanks for the update Gav.
I'm just wondering though - isn't the +5V from the USB port just shorted straight to the +5V of the onboard regulator. If this is the case, how would the circuit know that it is the USB port providing power or something else?
I'm just wondering though - isn't the +5V from the USB port just shorted straight to the +5V of the onboard regulator. If this is the case, how would the circuit know that it is the USB port providing power or something else?
Who is online
Users browsing this forum: Google [Bot] and 14 guests