Author Topic: From the Picaxe to - what?  (Read 8397 times)

0 Members and 1 Guest are viewing this topic.

Offline Jakob2803

  • Contributor
  • Posts: 10
  • Country: dk
From the Picaxe to - what?
« on: March 18, 2013, 06:20:50 pm »
Hello, I've used the Picaxe for some time, starting in school and then using them at home. I would like to move on to something more advanced, like the Arduino or PIC MCUs.
So... which one is better for me? >inb4 shitstorm
With both of them I will have to program in C (or C#??), so that is the same.
How about speed-wise? The arduino has a bootloader, but wouldn't the Pic have that too, if I was going to use an ICSP? Which one of these would be the fastest? The difference is probably small but nice to know anyway.
What I am looking for is a small board, with just the necessities for programming the MCU, and some pinheaders for connecting to stuff off-board.
The Duemilanove seems like the cheapest Arduino at 15 Euros. What would be the cheapest solution, for PIC?
 

Offline Plecharts

  • Contributor
  • Posts: 10
  • Country: cz
Re: From the Picaxe to - what?
« Reply #1 on: March 18, 2013, 07:40:11 pm »
I cannot say much about PICs, but most of the time it works the same. I would recommend you to get an Arduino, not a Duemilanove, but one of the new models, Leonardo or Uno. Arduino has really great user base, so if you encounter a problem, you can get your question answered in a few minutes on the official forums. All Arduino boards are programmed in something between C and C++, I think you can do the same with PICs.

Speed-wise, both of the platforms are more or less the same, while there are so many chips that offer so many different configurations you will surely be able to get the one you need. When using the board for development, you will probably use a bootloader, but that only adds a delay when you power-up the chip. With Arduino you can use ICSP to program the chip without using a bootloader, but it is slower and does not add that many advantages as you would think.
 

Offline Jakob2803

  • Contributor
  • Posts: 10
  • Country: dk
Re: From the Picaxe to - what?
« Reply #2 on: March 18, 2013, 08:18:30 pm »
I cannot say much about PICs, but most of the time it works the same. I would recommend you to get an Arduino, not a Duemilanove, but one of the new models, Leonardo or Uno. Arduino has really great user base, so if you encounter a problem, you can get your question answered in a few minutes on the official forums. All Arduino boards are programmed in something between C and C++, I think you can do the same with PICs.

Speed-wise, both of the platforms are more or less the same, while there are so many chips that offer so many different configurations you will surely be able to get the one you need. When using the board for development, you will probably use a bootloader, but that only adds a delay when you power-up the chip. With Arduino you can use ICSP to program the chip without using a bootloader, but it is slower and does not add that many advantages as you would think.
Thanks for the input! :) I am looking around for some PIC boards in the same price range. Does anyone know of a PIC solution at a similar price and set-up difficulty?
 

Offline AndyC_772

  • Super Contributor
  • ***
  • Posts: 3998
  • Country: gb
  • Professional design engineer
    • Cawte Engineering | Reliable Electronics
Re: From the Picaxe to - what?
« Reply #3 on: March 18, 2013, 08:19:20 pm »
Given the choice, I'd say go for the PIC every time.

The simple reason is that you can embed a PIC into any project you like. It's just a chip, and they come in all kinds of packages and pin counts. But with any kind of "...uino", you're stuck buying a complete pre-assembled board, and that's an extra cost and a load of extra space you have to find on every project you ever do with one.

The basic circuit to get a PIC up and running is literally just a power supply, the chip itself, one pull-up resistor (between MCLR and VCC - don't forget it!), a decoupling capacitor or two, and a 6 pin programming header. That's it, you can build it on a breadboard in a couple of minutes. Once you're done breadboarding, the same chip fits straight into a piece of stripboard, or you can go for as small a surface mount package as you can handle and put it on a PCB.

Offline AndyC_772

  • Super Contributor
  • ***
  • Posts: 3998
  • Country: gb
  • Professional design engineer
    • Cawte Engineering | Reliable Electronics
Re: From the Picaxe to - what?
« Reply #4 on: March 18, 2013, 08:20:39 pm »
Thanks for the input! :) I am looking around for some PIC boards in the same price range. Does anyone know of a PIC solution at a similar price and set-up difficulty?

Get yourself a PICKIT 3 Debug Express and follow the tutorials. Gooligum Electronics also have some great training packages.

Offline RjSa

  • Contributor
  • Posts: 21
  • Country: ve
Re: From the Picaxe to - what?
« Reply #5 on: March 18, 2013, 08:24:02 pm »
As Plechart said, both microcontrollers are pretty much the same and selecting an Atmel or a PIC should be based merely on the application.

As you want to know which step to take after a PICAXE I would recommend going for an Arduino because I believe there is a lot more information and a bunch more add-on boards for arduino on the internet.

After you learn to program and use one microcontroller, wether is a PIC or an Atmel, using the other one should be almost the same.

 

Offline ve7xen

  • Super Contributor
  • ***
  • Posts: 1118
  • Country: ca
    • VE7XEN Blog
Re: From the Picaxe to - what?
« Reply #6 on: March 18, 2013, 08:34:18 pm »
I would say get anything BUT the PIC unless you're targeting mass production. The architecture is wacky and difficult to use, the free C compilers suck, they're relatively slow compared to AVR or ARM. For hobby work I'd say they have two real selling points - the cheap USB-enabled chips and the cheap Ethernet-enabled chips, otherwise choose something easier to work with. PIC32, and to a lesser extent, dsPIC excepted, of course.

Arudino is nice because, like PICAXE, it's easy to get going with. Unlike PICAXE though you can actually move on to more advanced techniques in a piecewise manner until you're not tied to the Arduino environment at all anymore. The hardware is really just a bog-standard ATmega development board with a bootloader preloaded, so you can use it for more traditional AVR development if you want. I'd probably stick with AVR for now just because the toolchain is really easy to use, and because the community is huge. If you find you want more power, there are low-friction paths to ARM or PIC32.
73 de VE7XEN
He/Him
 

Offline Jakob2803

  • Contributor
  • Posts: 10
  • Country: dk
Re: From the Picaxe to - what?
« Reply #7 on: March 18, 2013, 09:03:12 pm »
Thanks for the input! :) I am looking around for some PIC boards in the same price range. Does anyone know of a PIC solution at a similar price and set-up difficulty?

Get yourself a PICKIT 3 Debug Express and follow the tutorials. Gooligum Electronics also have some great training packages.
This one? :) http://www.microchipdirect.com/ProductSearch.aspx?Keywords=DV164131
Damn, that's expensive! :O

As Plechart said, both microcontrollers are pretty much the same and selecting an Atmel or a PIC should be based merely on the application.

As you want to know which step to take after a PICAXE I would recommend going for an Arduino because I believe there is a lot more information and a bunch more add-on boards for arduino on the internet.

After you learn to program and use one microcontroller, wether is a PIC or an Atmel, using the other one should be almost the same.
Yes the arduino community seems to be very good. I don't care much for the shields though. Might as well breadboard something. :)

I would say get anything BUT the PIC unless you're targeting mass production. The architecture is wacky and difficult to use, the free C compilers suck, they're relatively slow compared to AVR or ARM. For hobby work I'd say they have two real selling points - the cheap USB-enabled chips and the cheap Ethernet-enabled chips, otherwise choose something easier to work with. PIC32, and to a lesser extent, dsPIC excepted, of course.

Arudino is nice because, like PICAXE, it's easy to get going with. Unlike PICAXE though you can actually move on to more advanced techniques in a piecewise manner until you're not tied to the Arduino environment at all anymore. The hardware is really just a bog-standard ATmega development board with a bootloader preloaded, so you can use it for more traditional AVR development if you want. I'd probably stick with AVR for now just because the toolchain is really easy to use, and because the community is huge. If you find you want more power, there are low-friction paths to ARM or PIC32.
What about MPLAB? It's free and coming from the chip manufacturer it must be good. :)
Yes, the more I read, the better Arduino seems.
« Last Edit: March 18, 2013, 09:08:33 pm by Jakob2803 »
 

Offline ve7xen

  • Super Contributor
  • ***
  • Posts: 1118
  • Country: ca
    • VE7XEN Blog
Re: From the Picaxe to - what?
« Reply #8 on: March 18, 2013, 09:15:21 pm »
What about MPLAB? It's free and coming from the chip manufacturer it must be good. :)
Yes, the more I read, the better Arduino seems.
As I understand it, the free version of Microchip's PIC (8-bit anyway) compiler doesn't allow code optimization. I'd count that as sucking, since the biggest complaint about the open-source compiler (SDCC) is that it doesn't generate very efficient code. I haven't used either in years though, abandoned the PIC arch ages ago, so YMMV, maybe SDCC has improved.
73 de VE7XEN
He/Him
 

Offline AndyC_772

  • Super Contributor
  • ***
  • Posts: 3998
  • Country: gb
  • Professional design engineer
    • Cawte Engineering | Reliable Electronics
Re: From the Picaxe to - what?
« Reply #9 on: March 18, 2013, 09:19:38 pm »
That's the package.

MPLAB (actually MPLAB X) is the devlopment environment, the C compiler is installed separately but is fully integrated.

It's true that the free version lacks the optimisation features found in the commercial version - but although some people complain that 'it sucks' or similar, I've yet to see anyone present any real-world benchmarks for code size or speed to back that up. I've also yet to find that lack of optimisation actually prevents me from being able to develop an application with it.

Offline westfw

  • Super Contributor
  • ***
  • Posts: 3839
  • Country: us
Re: From the Picaxe to - what?
« Reply #10 on: March 19, 2013, 03:18:55 am »
Quote
But with any kind of "...uino", you're stuck buying a complete pre-assembled board
completely untrue.  You can go out an buy $1 ATmega8 chips, put arduino code on them, and put  them on a board that is otherwise of your own design.

Quote
I've yet to see anyone present any real-world benchmarks for code size
I've seen some example of code generation that are pretty shocking.
http://www.piclist.com/techref/postbot.asp?by=thread&id=Is+Hitech+C+deliberately+slugging+code+in+the+free&w=body&tgt=post
Maybe it's irrelevant give that its fast enough and a bigger PIC is cheap anyway, but it strikes me as dangerously reinforcing the notion that "compilers produced code that is significantly worse than I could do in assembler."
 

Offline Jon Chandler

  • Frequent Contributor
  • **
  • Posts: 545
    • Throw Away PIC
Re: From the Picaxe to - what?
« Reply #11 on: March 19, 2013, 08:10:17 am »
Coming from PICAXE, you may want to look at using Swordfish Basic or Amicus/proton Basic on PICs.  Swordfish is very similar in structure to Visual Basic and very fast.  It works on the 18F series.  The "special edition" is free, but limited (quite generous) in code size.
 

Offline Jakob2803

  • Contributor
  • Posts: 10
  • Country: dk
Re: From the Picaxe to - what?
« Reply #12 on: March 19, 2013, 09:58:25 am »
Coming from PICAXE, you may want to look at using Swordfish Basic or Amicus/proton Basic on PICs.  Swordfish is very similar in structure to Visual Basic and very fast.  It works on the 18F series.  The "special edition" is free, but limited (quite generous) in code size.
Thanks for the input. :) I am looking for a board first!   :)

You can go out an buy $1 ATmega8 chips, put arduino code on them, and put  them on a board that is otherwise of your own design.
That sounds very nice, do you know any good guides, or the minimal programming circuits and such?
« Last Edit: March 19, 2013, 10:12:21 am by Jakob2803 »
 

Offline Jon Chandler

  • Frequent Contributor
  • **
  • Posts: 545
    • Throw Away PIC
Re: From the Picaxe to - what?
« Reply #13 on: March 19, 2013, 11:57:41 am »
Coming from PICAXE, you may want to look at using Swordfish Basic or Amicus/proton Basic on PICs.  Swordfish is very similar in structure to Visual Basic and very fast.  It works on the 18F series.  The "special edition" is free, but limited (quite generous) in code size.
Thanks for the input. :) I am looking for a board first!   :)


Oh, sorry I overlooked that detail.  Funny actually, because that's exactly where I was at a few years ago.  I wanted a cheap board that had the essentials for an embedded project, but cheap enough that I could dedicate the board to a project and not give it a second thought.  That's where my ThrowAwayPic idea was born.  The TAP-28 board supports many 28 pin, PIC18F-series micros, has 4 LEDs and 2 pushbuttons on the board and header connectors for I2C/SPI, UART, ADCs and PWMs.  The connectors allow reliable connections to the real world without the rat's nest of jumpers typical of many Arduino projects.

More information can be found here.  Many applications and a lot of projects using Swordfish Basic can be found at Digital-DIY.

I don't have many of the TAP-28 boards left and I'm not sure if I'll be making more.  The TAP-28 came about before the availability of cheap boards from iTead and Seeed; there's not as much need now to commit to large orders to get the price down.  Send me a PM to check on availability.  I'm also happy to share the Gerber files for personal use or to use the boards as part of a larger system (meaning that you can't use the Gerbers to create boards to sell on eBay).  Again, send me a PM if you're interested in the Gerbers.

 

Offline bingo600

  • Super Contributor
  • ***
  • Posts: 1700
  • Country: dk
Re: From the Picaxe to - what?
« Reply #14 on: March 19, 2013, 03:26:56 pm »
Jakob have a look here (i think he's still 10€ in ship to DK only 15dkk more than inside dk shipping) - or ebay
http://www.watterott.com/de/Boards-Kits/

Programmer for raw chips
http://www.watterott.com/de/Pocket-AVR-Programmer

Get 1 or 2 of these for the breadboard & raw chips.
http://www.watterott.com/de/AVR-ISP-Programmieradapter



None of the boards can be programmed in C# (that's M$ only) , but can be in C/C++.

I have never used a Pic  but AVR's , i made that decision when i discovered that AVR had a free C-Compiler (avr-gcc) , and was linear in the address space.

I'd suggest an arduino board & a programmer from the above for starters , and then supply with a few other Atmel MCU's from here
http://www.csd-electronics.de/  (also think it's 10€ ship)

You don't need the programmer if you just use the ardino board , but it will come in handy when you start using chips you have bought your self.

Most og the above can be had on ebay cheaper , (remember you can buy for 80 DKK) from china and get it into DK , without paying VAT. So buying an arduino from one seller , and a programmer from another seller wil prob make it legal.
A lot of the chinese ebay sellers have free shipping , if you're willing to wait 3 weeks for it to arrive.

Edit:
I just got an arduino clone from here (ditch the usb cable thet comes with , it sucks)
But the duino is ok , uses a profilic chip though , but it works fine on linux.
http://www.aliexpress.com/item/Free-shipping-BTE-ROBOT-Main-Control-Board-Compatible-with-Arduino-duemilanove-2009-ATMEGA328-USB-cable/587638761.html


/Bingo
« Last Edit: March 19, 2013, 04:03:17 pm by bingo600 »
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 3839
  • Country: us
Re: From the Picaxe to - what?
« Reply #15 on: March 19, 2013, 04:20:43 pm »
   
Quote
Quote
You can go out an buy $1 ATmega8 chips, put arduino code on them, and put  them on a board that is otherwise of your own design.
That sounds very nice, do you know any good guides, or the minimal programming circuits and such?
That's the sort of question where if you've asked it, you're not ready for the actual answer.  Any of the usual AVR programmers would work, and the usual minimal AVR configurations.  There are a lot of tutorials on getting Arduino running on a breadboard.  (here's one: http://www.gammon.com.au/forum/?id=11637 )

However, for your initial efforts, I think it would be worthwhile to buy a 'real' Arduino board.  I has a cost/price comparable to the initial bare-chip setup (programmer + USB/Serial cable) for all but the most risky frugal alternatives.  And then the 'real arduino' is sufficient to burn additional bare chips.  (yeah, you can get a $3 Nokia USB/Serial adaptor and a $5 AVRASP clone from eBay.  But they come without community support or a favorable return policy.)
 

Offline Jakob2803

  • Contributor
  • Posts: 10
  • Country: dk
Re: From the Picaxe to - what?
« Reply #16 on: March 20, 2013, 07:34:34 pm »
   
Quote
Quote
You can go out an buy $1 ATmega8 chips, put arduino code on them, and put  them on a board that is otherwise of your own design.
That sounds very nice, do you know any good guides, or the minimal programming circuits and such?
That's the sort of question where if you've asked it, you're not ready for the actual answer.  Any of the usual AVR programmers would work, and the usual minimal AVR configurations.  There are a lot of tutorials on getting Arduino running on a breadboard.  (here's one: http://www.gammon.com.au/forum/?id=11637 )

However, for your initial efforts, I think it would be worthwhile to buy a 'real' Arduino board.  I has a cost/price comparable to the initial bare-chip setup (programmer + USB/Serial cable) for all but the most risky frugal alternatives.  And then the 'real arduino' is sufficient to burn additional bare chips.  (yeah, you can get a $3 Nokia USB/Serial adaptor and a $5 AVRASP clone from eBay.  But they come without community support or a favorable return policy.)
The arduino seems better and better. :) Does anyone have some info on the PIC? It seems like it has a high start-up cost, while the arduino is cheap and works out of the box.
 

Offline blewisjr

  • Frequent Contributor
  • **
  • Posts: 301
From the Picaxe to - what?
« Reply #17 on: March 20, 2013, 07:49:00 pm »
With pic you can get dev boards and eval boards ready to go but you still need a programmer to program the chip.  If you want to use C they have a free version of the compiler but they force it to generate bad code to get people to buy the $450 compiler.  The ide is great.  If you don't mind a bread board setup you can get started for around $50
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 3839
  • Country: us
Re: From the Picaxe to - what?
« Reply #18 on: March 21, 2013, 08:24:47 am »
Quote
Does anyone have some info on the PIC?
PIC boards similar to Arduino in cost and start-up ease include:
PIC32: "ChipKit"  Arduino-near-compatible, including IDE and shield connections.
  http://www.digilentinc.com/Products/Catalog.cfm?NavPath=2,892&Cat=18  Starting at $25
PIC24: "MicroStick" development system, available in several varieties starting at about $25.
  http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en548414
  "MicroStick 2" (about $35) includes 4 different CPU chips; PIC24, PIC33, PIC32...
PIC18:   "USB Bit Whacker" (About $25) https://www.sparkfun.com/products/762
  This design predates Arduino (several DIY varieties and PCB exist in addition to the sparkfun product), and does nearly everything that Arduino does.  USB connectable with bootloader, etc.  Why it didn't enjoy success is a bit of a mystery.  I suppose the lack of an easy-to-use development environment has something to do with it.  You can also look up "JALuino" and "Pinguino."  JAL is an alternative HLL for PICs; pretty nice (but lacking the portability of C)  Jaluino seems to have died, but JAL is still doing OK.
PIC16:  Don't bother.   Really.   Start on a PIC18 (which is "moderately similar"), and if you find it usable and really want to do things with the 8 and 6-pin PICs, THEN you can think about getting a PICKit or ICD or similar.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf