How close is the Swordfish 24F compiler?

Discuss PIC and electronic related things

Moderators: David Barker, Jerry Messina

Francis
Registered User
Registered User
Posts: 314
Joined: Sun Mar 25, 2007 9:40 am
Location: Devon

Post by Francis » Sun Feb 14, 2010 11:55 am

Thanks rmteo.
Yes, that was where I'd looked some time ago.
It was the 24/25/26 family...J50 that were of interest to me.

rmteo
Posts: 237
Joined: Fri Feb 29, 2008 7:02 pm
Location: Colorado, USA

Post by rmteo » Tue Feb 16, 2010 4:57 pm

Much as I hate to move to C, it looks like it may be time to take the plunge. I would rather stay with SF as it is much nicer to use, but like dmtulsa, I cannot wait any longer.

I have also been looking at NXP LPC11xx parts and they look really nice. A 32-bit part that is cheaper than 8-bit PIC devices (as low as $0.65/10,000 for a 8/2kB part). Some basic specs:
# ARM Cortex-M0 processor, running at frequencies of up to 50 MHz
# ARM Cortex-M0 built-in Nested Vectored Interrupt Controller (NVIC)
# 32 kB (LPC1114), 24 kB (LPC1113), 16 kB (LPC1112), or 8 kB (LPC1111) on-chip flash programming memory
# 8 kB, 4 kB, or 2 kB SRAM
# In-System Programming (ISP) and In-Application Programming (IAP) via on-chip bootloader software
# UART with fractional baud rate generation, internal FIFO, and RS-485 support
# Two SPI controllers with SSP features and with FIFO and multi-protocol capabilities (second SPI on LQFP48 and PLCC44 packages only)
# I2C-bus interface supporting full I2C-bus specification and Fast-mode Plus with a data rate of 1 Mbit/s with multiple address recognition and monitor mode
# Up to 42 General Purpose I/O (GPIO) pins with configurable pull-up/pull-down resistors
# Four general purpose 16/32-bit timers/counters with a total of four capture inputs and 13 match/PWM outputs
# Programmable WatchDog Timer (WDT)
# System tick timer
# Serial Wire Debug
# High-current output driver (20 mA) on one pin
# High-current sink drivers (20 mA) on two I2C-bus pins in Fast-mode Plus
# Integrated PMU (Power Management Unit) to minimize power consumption during Sleep, Deep-sleep, and Deep power-down modes
# Three reduced power modes: Sleep, Deep-sleep, and Deep power-down
# Single 3.3 V power supply (1.8 V to 3.6 V)
# 10-bit ADC with input multiplexing among 8 pins
# GPIO pins can be used as edge and level sensitive interrupt sources
# Clock output function with divider that can reflect the system oscillator clock, IRC clock, CPU clock, and the Watchdog clock
# Processor wake-up from Deep-sleep mode via a dedicated start logic using up to 13 of the functional pins
# Brownout detect with four separate thresholds for interrupt and one threshold for forced reset
# Power-On Reset (POR)
# Crystal oscillator with an operating range of 1 MHz to 25 MHz
# 12 MHz internal RC oscillator trimmed to 1 % accuracy that can optionally be used as a system clock
# PLL allows CPU operation up to the maximum CPU rate without the need for a high-frequency crystal. May be run from the main oscillator, the internal RC oscillator, or the watchdog oscillator.
The software dev tools are C based only but come free with the purchase of the $30 LPC1114 LPCXpresso board. With this move, I will also use MPLAB and C18 (and C30) and possibly abandon BASIC altogether.

User avatar
JWinters
Posts: 106
Joined: Mon Feb 04, 2008 4:56 pm
Location: North Carolina, USA
Contact:

Post by JWinters » Tue Feb 16, 2010 5:18 pm

As much as I like the ease of BASIC, I've switched to the C30 compiler for 24 series development. It's been a slow start but I'm getting the hang of it. It's not that C is all that tricky; it still uses the same programming concepts as most other languages. The hard part is learning a new IDE, a new PIC series and C all at the same time! The documentation seems somewhat fragmented and not newbie friendly. Since the IDE is designed for use with many compilers, it's been hard to find good information that steps beginners through C projects. Also, the C libraries seem scattered throughout the installation directories. But the good news is that the compiler is free and actively supported by Microchip.

rmteo
Posts: 237
Joined: Fri Feb 29, 2008 7:02 pm
Location: Colorado, USA

Post by rmteo » Wed Feb 17, 2010 10:51 pm

It wasn't too bad for me. The LPC1114 (32kB FLASH, 8kB RAM) board arrived today and I got the blinky going in about 10 minutes. I did play with the IDE and C compiler for a couple of hours while waiting for the hardware to arrive.

Now on to putting a couple of 2x10 headers on the LPC board to hook it up to the EasyPIC4 board with IDC cables so I can use its peripherals (multiple LEDs/switches, LCD, GLCD, 7-segment LED, RS232, etc.) - just like what was done when working with the PIC24/dsPIC33.

User avatar
octal
Registered User
Registered User
Posts: 586
Joined: Thu Jan 11, 2007 12:49 pm
Location: Paris IDF
Contact:

Post by octal » Mon Feb 22, 2010 2:45 pm

rmteo wrote:Much as I hate to move to C, it looks like it may be time to take the plunge. I would rather stay with SF as it is much nicer to use, but like dmtulsa, I cannot wait any longer.
Cortex-M0 or M3 chips are really very nice and very competitive in price comparing to low 8 bit chips. But I don't think that there would be a any basic compiler for them, as all ARM core is professionnal, and most professionnal users will never go back to basic (for historical reasons). ALL libs for these chips are written in "C", and thus I dont see any basic compiler to change that.
Basic has been pushed a lot by the huge number of bobbists working on PIC or AVR chips. These chips are and will still continue to be used by bobbists because ARM based chips (including cortex core one) does not exists in DIP packages. The only ARM based manufacturer that made DIL package (in SMT if I remmeber) was Luminary (now bought by TI) in 28 Pin package.
Sinc this huge ammount of "Basic" potential users cannot play with these chips, I think ARM based chips will still continue to be professionnal reserved chips.

Regards

normnet
Posts: 55
Joined: Mon Jan 01, 2007 6:32 pm

Post by normnet » Tue Feb 23, 2010 1:07 am

Much as I hate to move to C, it looks like it may be time to take the plunge. I would rather stay with SF as it is much nicer to use, but like dmtulsa, I cannot wait any longer.
I also am moving to C.
The ever expanding Microchip libraries especially for connectivity such as
Ethernet, USB, Can, Wifi and ZigBee are a major draw.
To convert these to C it is almost easier to learn C.

Norm

rmteo
Posts: 237
Joined: Fri Feb 29, 2008 7:02 pm
Location: Colorado, USA

Post by rmteo » Tue Mar 02, 2010 11:02 pm

Well after working with the LPC111x tool chain for about 2 weeks, I have good news and bad news.

First, the good news. The LPC111x hardware is really nice with very powerful and flexible features/peripherals. You basically get PIC32 performance at PIC16 prices - or less. The software is not as easy to use as SF (after all it is C) but at least the IDE with built-in debugger is nice - and it's free.
Image
Now the bad news. Having made the move to C with LPC, I thought I would standardize on C for the PIC. The MPLAB IDE pales in comparison to the LPC IDE and the C18 (and C30) compiler does not have anywhere near the useful modules/drivers that come with SF. Looks like I may have to stay with SF for the time being for the PIC parts - or drop PIC's altogether.

Francis
Registered User
Registered User
Posts: 314
Joined: Sun Mar 25, 2007 9:40 am
Location: Devon

Post by Francis » Wed Mar 03, 2010 9:28 am

Looks nice.

Well, I guess that's one of the SF advantages.

I assume the idea was an 'Open' approach to allow contributors to produce nice modules.
And many excellent ones are available.
Sadly, SF hasn't taken off as I would have expected - I don't know why not.
(I'm basing that on Forum numbers. I'm so pleased that this Forum isn't so cliquey as Proton.)
Good price, great principle, great product.
... but diminishing support and probably no more upgrades. Pity.
I guess now the fledgling is older it has simply been allowed to 'fly free'.

normnet
Posts: 55
Joined: Mon Jan 01, 2007 6:32 pm

Post by normnet » Wed Mar 03, 2010 7:24 pm

The MPLAB IDE pales in comparison to the LPC IDE
I saw a check box allowing an external text editor in MPLAB IDE.
You could possibly use your LPC IDE if you choose although not all of the
features would work with PIC.

I wonder if their are other external editors which would fully support
MPLAB C18 etc?

Norm

rmteo
Posts: 237
Joined: Fri Feb 29, 2008 7:02 pm
Location: Colorado, USA

Post by rmteo » Thu Mar 04, 2010 9:28 pm

It is not just the editor (or IDE). A lot of the new ARM hardware (such as the abovementioned LPC111x) have a much nicer architecture and far more powerful and flexible peripherals. ST has also announced several new Cortex M3 based devices that start at under $1.

Now what would be really nice is a BASIC compiler similar to SF for the ARM cores. However, we have waited almost a year and half for the PIC24 version. I believe though, that a BASIC for ARM is something that may soon happen from another source. Keeping my fingers crossed. :lol: :lol: :lol:

normnet
Posts: 55
Joined: Mon Jan 01, 2007 6:32 pm

Post by normnet » Thu Mar 04, 2010 11:41 pm

a BASIC for ARM is something that may soon happen from another source
I found two companies working on a Basic compiler for Arm both due within a year (2007).
I believe they are still in progress. No small accomplishment.

Having just started in MPLAB C18 I am having difficulty finding C code examples for C18.


Norm

rmteo
Posts: 237
Joined: Fri Feb 29, 2008 7:02 pm
Location: Colorado, USA

Post by rmteo » Thu Mar 04, 2010 11:48 pm


normnet
Posts: 55
Joined: Mon Jan 01, 2007 6:32 pm

Post by normnet » Fri Mar 05, 2010 12:06 am



Coridium is an interpreter not compiled code (slower).
Coridium is a stamp ($$each) not sure about HBBR.

MikroElectonica and Bascom are both slowly working on Arm Basic.
Proton is working on a PIC24 basic version. No release date.

2 books for Basic have been started however not heard from for a while.
Two of four new IDE's for Basic are still in progress and near complete.

Norm

Francis
Registered User
Registered User
Posts: 314
Joined: Sun Mar 25, 2007 9:40 am
Location: Devon

Post by Francis » Fri Mar 05, 2010 11:12 am

Ah, that's interesting.

It seems many , except SF, are developing.
I was hoping for SF structure for 16/32 bit stuff.
I've got so used to it that I find others a chore now.
Would have made converting SF 18F to other-micros a whole lot easier.
Oh David, I wish you come back off holiday.... :)

CharlieM
Registered User
Registered User
Posts: 211
Joined: Wed Oct 10, 2007 12:05 am

Post by CharlieM » Fri Mar 05, 2010 12:35 pm

Proton is working on a PIC24 basic version
Norm do you know this for sure?
I would not hold my breath on that.
Running version 2.2.4.0 ICC 1.2.1.0
Regards CharlieM

Post Reply