From the Picaxe to - what? - Page 1
Forum section: electronics / general

author: Jakob2803
author_rank: Contributor
timestamp: March 18, 2013, 06:20:50 pm
content: 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 shitstormWith 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?

author: Plecharts
author_rank: Contributor
timestamp: March 18, 2013, 07:40:11 pm
content: 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.

author: Jakob2803
author_rank: Contributor
timestamp: March 18, 2013, 08:18:30 pm
content: Quote from: Plecharts on March 18, 2013, 07:40:11 pmThanks 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?

author: AndyC_772
author_rank: Super Contributor
timestamp: March 18, 2013, 08:19:20 pm
content: 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.

author: AndyC_772
author_rank: Super Contributor
timestamp: March 18, 2013, 08:20:39 pm
content: Quote from: Jakob2803 on March 18, 2013, 08:18:30 pmGet yourself a PICKIT 3 Debug Express and follow the tutorials. Gooligum Electronics also have some great training packages.

author: RjSa
author_rank: Contributor
timestamp: March 18, 2013, 08:24:02 pm
content: 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.

author: ve7xen
author_rank: Super Contributor
timestamp: March 18, 2013, 08:34:18 pm
content: 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.

author: Jakob2803
author_rank: Contributor
timestamp: March 18, 2013, 09:03:12 pm
content: Quote from: AndyC_772 on March 18, 2013, 08:20:39 pmThis one?http://www.microchipdirect.com/ProductSearch.aspx?Keywords=DV164131Damn, that's expensive! :OQuote from: RjSa on March 18, 2013, 08:24:02 pmYes the arduino community seems to be very good. I don't care much for the shields though. Might as well breadboard something.Quote from: ve7xen on March 18, 2013, 08:34:18 pmWhat about MPLAB? It's free and coming from the chip manufacturer it must be good.Yes, the more I read, the better Arduino seems.

author: ve7xen
author_rank: Super Contributor
timestamp: March 18, 2013, 09:15:21 pm
content: Quote from: Jakob2803 on March 18, 2013, 09:03:12 pmAs 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.

author: AndyC_772
author_rank: Super Contributor
timestamp: March 18, 2013, 09:19:38 pm
content: 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.

author: westfw
author_rank: Super Contributor
timestamp: March 19, 2013, 03:18:55 am
content: Quotecompletely 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.QuoteI'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=postMaybe 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."

author: Jon Chandler
author_rank: Frequent Contributor
timestamp: March 19, 2013, 08:10:17 am
content: 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.

author: Jakob2803
author_rank: Contributor
timestamp: March 19, 2013, 09:58:25 am
content: Quote from: Jon Chandler on March 19, 2013, 08:10:17 amThanks for the input.I am looking for a board first!Quote from: westfw on March 19, 2013, 03:18:55 amThat sounds very nice, do you know any good guides, or the minimal programming circuits and such?

author: Jon Chandler
author_rank: Frequent Contributor
timestamp: March 19, 2013, 11:57:41 am
content: Quote from: Jakob2803 on March 19, 2013, 09:58:25 amOh, 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 myThrowAwayPicidea 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 foundhere. Many applications and a lot of projects using Swordfish Basic can be found atDigital-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.

author: bingo600
author_rank: Super Contributor
timestamp: March 19, 2013, 03:26:56 pm
content: Jakob have a look here (i think he's still 10€ in ship to DK only 15dkk more than inside dk shipping) - or ebayhttp://www.watterott.com/de/Boards-Kits/Programmer for raw chipshttp://www.watterott.com/de/Pocket-AVR-ProgrammerGet 1 or 2 of these for the breadboard & raw chips.http://www.watterott.com/de/AVR-ISP-ProgrammieradapterNone 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 herehttp://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

author: westfw
author_rank: Super Contributor
timestamp: March 19, 2013, 04:20:43 pm
content: QuoteThat'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.)

author: Jakob2803
author_rank: Contributor
timestamp: March 20, 2013, 07:34:34 pm
content: Quote from: westfw on March 19, 2013, 04:20:43 pmThe 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.

author: blewisjr
author_rank: Frequent Contributor
timestamp: March 20, 2013, 07:49:00 pm
content: 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

author: westfw
author_rank: Super Contributor
timestamp: March 21, 2013, 08:24:47 am
content: QuotePIC 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=18Starting at $25PIC24: "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/762This 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.