​ ​ ​ ​ Is there any C Compiler (free or paid) for PICAXE ? - Page 2
Page 2 of 2 FirstFirst 1 2
Results 11 to 19 of 19

Thread: Is there any C Compiler (free or paid) for PICAXE ?

  1. #11
    Member
    Join Date
    Apr 2009
    Location
    Georgia USA
    Posts
    81

    Default

    Quote Originally Posted by stan74 View Post
    Why would anyone convert Basic into "C"?........ speed?
    millisecond timing.etal

    Al

  2. #12
    Member
    Join Date
    Apr 2009
    Location
    Georgia USA
    Posts
    81

    Default

    Quote Originally Posted by bpowell View Post

    .....................

    I will say, the PICAXE support community is unmatched out there...when you go on the Microchip forum and ask a question, you'd better gird yourself for some rude (and unhelpful) answers...but again, it forces you to get into the datasheets, and see what makes these chips (and even the PICAXE) tick!
    Second that on the PICAXE support community. If learning C you can also expect to meet some rude ones on the Arduino forum - I sure did - met some helpful folks there also - most of them from AUS.

    Al

  3. #13
    Senior Member
    Join Date
    Dec 2012
    Location
    Out There
    Posts
    267

    Default

    Quote Originally Posted by srnet View Post
    Well maybe, although the author of the video has a poor grasp of basic sums. The examples given that a basic compiler was "3 times, well almost" than an Arduino (C\C++) program. It was actually 2.43 times faster so a little more than two times faster.

    However its been said many times on here that how fast a program runs is often not a significant issue, its ease of use and simplified development that predominates.

    Great Cow Basic does initially sound attractive, its free, a complier so it should be fast, but easy to use ? Well not in my experience. I decided to try and do a complied version of a simple watchdog program I had for a 08M2 (12F1840). I eventually got it working, but it was a struggle and only after I corrected an error in the Great Cow Basic .dat file that was the definition for the particular PIC. Beginners stuff it was not.
    I find GCB to be very easy to use. Their forum is almost as helpful as this one is too. I've converted a number of programs from PicAxe Basic to GCB, some very simple ones, others rather more complex ones with 2-3000 lines of source code.

    Where there are errors, I think there was an error I found in the .DAT files for the 16F1825/9, a post on the forum will get this checked and corrected if needed.

    Not forgetting that GCB is produced by volunteers, for no charge and with no restrictions on use, commercial or otherwise.

    For certain repetitive operations, the speed increase between PicAxe Basic and GCB (compiled) Basic can be enormous. If you need that speed then GCB is a good choice, if you don't then PicAxe Basic is the way to go. I sometimes develop an idea using a 20M2, build a prototype, code it and make sure it works. I then plug in a 16F1829 and convert the code to GCB. That way I get the idea working quickly using the speed of the PicAxe development before taking advantage of the speed increase of the base PIC.

  4. #14
    Senior Member
    Join Date
    Sep 2016
    Location
    United Kingdom
    Posts
    711

    Default

    You said it all tmfkam. Picaxe is fine for most things but lots of repeated calculations like calculating a plot position on a line for graphics or large arrays the speed difference is crucial.
    picaxe forum is more populated than gcb but it's the same songs.
    The difference is the gcb.h include files which are like arduino include files. These are absent in picaxe and it's all roll your own. I'm thinking of stuff on ebay you can connect to a uctlr.
    I messed with a gcb ssd1306 and posted this as a gcb tester and the next lib will have this feature, Feedback is taken into consideration. https://www.youtube.com/watch?v=3RhTwAqYqY4
    PS A uno and usb and gcb is plug and play and the terminal works...a pic needs a board and a usb ttl converter and a tinybootloader...hassle.
    Gcb and a uno board for me is top but a 18f25k22 at 64MHz is a faster option. mega328p is nice chip.
    Last edited by stan74; 27-05-2017 at 20:43.

  5. #15
    Senior Member
    Join Date
    Feb 2010
    Location
    Texas
    Posts
    2,921

    Default

    Quote Originally Posted by srnet View Post
    ...However its been said many times on here that how fast a program runs is often not a significant issue, its ease of use and simplified development that predominates.
    Yes, it is said quite a bit and is generally true ,especially for beginner level educational and hobby projects.

    However it has also been said many times and is equally true, that how fast a program runs often IS a significant issue. It all depends upon the application requirements. Use what works for your application. If a Picaxe is fast enough, use it. If not then find something else that does. GCB, Arduino, MPLAB C, whatever floats your boat.

    I agree that GCB may not be the best choice for rank beginners with zero knowledge of microcontrollers, or for those not willing to look at a datasheet or set up some registers from time to time. I would say it is between Beginner and Intermediate Level with the potential for doing some highly advanced and high speed applications.

  6. #16
    Senior Member
    Join Date
    Sep 2016
    Location
    United Kingdom
    Posts
    711

    Default

    Goeytex "I agree that GCB may not be the best choice for rank beginners with zero knowledge of microcontrollers, or for those not willing to look at a datasheet or set up some registers from time to time. I would say it is between Beginner and Intermediate Level with the potential for doing some highly advanced and high speed applications."
    I must reply that if you look at forum posts there's much low level stuff that shouldn't be basic like no dim (array). This results in @bptr peek/poke stuff that basic is supposed to dumb down but picaxe make an issue. OK most people don't use arrays?
    I don't see picaxe changing/improving. Gcb is changing/improving daily...a team of little people like me. It's open source.

  7. #17
    Senior Member
    Join Date
    Sep 2016
    Location
    United Kingdom
    Posts
    711

    Default

    Quote Originally Posted by tmfkam View Post
    I find GCB to be very easy to use. Their forum is almost as helpful as this one is too. I've converted a number of programs from PicAxe Basic to GCB, some very simple ones, others rather more complex ones with 2-3000 lines of source code.

    Where there are errors, I think there was an error I found in the .DAT files for the 16F1825/9, a post on the forum will get this checked and corrected if needed.

    Not forgetting that GCB is produced by volunteers, for no charge and with no restrictions on use, commercial or otherwise.

    For certain repetitive operations, the speed increase between PicAxe Basic and GCB (compiled) Basic can be enormous. If you need that speed then GCB is a good choice, if you don't then PicAxe Basic is the way to go. I sometimes develop an idea using a 20M2, build a prototype, code it and make sure it works. I then plug in a 16F1829 and convert the code to GCB. That way I get the idea working quickly using the speed of the PicAxe development before taking advantage of the speed increase of the base PIC.
    To me that makes no sense. The syntax differences and changing say the picaxe servo command to a timer1 uno or pic interrupt is not trivial so not like re writing the hitch hikers guide to the galaxy in 34 languages. Why not just test it in gcb...with a £3 uno off ebay...not a pic and make a dev board and in circuit programmer . uno usb is so nice from gcb. you un rem a batch file and say which com port
    I should add my intent is to get arduino users that find c hard but basic easy to try gcb as the thread was c compiler for picaxe (basic?)
    Last edited by stan74; 27-05-2017 at 22:03.

  8. #18
    Senior Member
    Join Date
    Dec 2012
    Location
    Out There
    Posts
    267

    Default

    At the risk of veering further away from the original question regarding a C compiler for PicAxe I just wanted to address some of the comments made in the responses above.

    While PicAxe basic doesn't have the .h include files directly, they are there to a degree, just hidden. Calls to PWMOUT and such are replaced with code for the PWM functions, which hides the complexities of initialising the PWM hardware on chip. This is similar to an include file and has the same end result. As do the SPI, and I2C commands. PicAxe Basic taking (hiding?) away all the hard work again.

    I don't find it too difficult to convert a PicAxe program to GCB. A copy-paste-convert process doesn't work too well, the syntactical differences lead to too many obvious and a few hard to spot errors, but a printout of the PicAxe program and re-type of the GCB program doesn't take much longer and is more reliable. Why bother? The PicAxe simulator is too good...

    I've never needed any of the servo commands so haven't tried moving these from PicAxe to GCB.

  9. #19
    Senior Member
    Join Date
    Jan 1970
    Location
    Nova Scotia, Canada
    Posts
    2,608

    Default

    Quote Originally Posted by tmfkam View Post
    While PicAxe basic doesn't have the .h include files directly, they are there to a degree, just hidden
    ...
    The PicAxe simulator is too good...
    +1

    Picaxe ease-of-use is invaluable--if what you are wishing to do is within the scope of what the picaxe firmware allows.

    Hiding complexity is a good thing, as long as you don't need features beyond what is provided. If you do, then "horses for courses", to quote the long-absent Dippy.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •